mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Lint py files
This commit is contained in:
parent
3e871efed8
commit
b756b2d7d0
2 changed files with 8 additions and 3 deletions
|
|
@ -381,7 +381,9 @@ if __name__ == "__main__":
|
|||
if apis:
|
||||
for api in apis:
|
||||
endpoint_data = api.endpoint.replace("http://", "").split(":")
|
||||
err = db.add_instance(endpoint_data[0], endpoint_data[1].replace("/", ""), api.host)
|
||||
err = db.add_instance(
|
||||
endpoint_data[0], endpoint_data[1].replace("/", ""), api.host
|
||||
)
|
||||
|
||||
if err:
|
||||
logger.warning(err)
|
||||
|
|
|
|||
|
|
@ -70,9 +70,12 @@ def is_cached_file(
|
|||
return is_cached and cached_file
|
||||
|
||||
|
||||
def get_file_in_db(file: Union[str, Path], db, *, job_name: Optional[str] = None) -> Optional[bytes]:
|
||||
def get_file_in_db(
|
||||
file: Union[str, Path], db, *, job_name: Optional[str] = None
|
||||
) -> Optional[bytes]:
|
||||
cached_file = db.get_job_cache_file(
|
||||
job_name or basename(getsourcefile(_getframe(1))).replace(".py", ""), normpath(file)
|
||||
job_name or basename(getsourcefile(_getframe(1))).replace(".py", ""),
|
||||
normpath(file),
|
||||
)
|
||||
if not cached_file:
|
||||
return None
|
||||
|
|
|
|||
Loading…
Reference in a new issue