Lint py files

This commit is contained in:
Théophile Diot 2023-06-20 10:45:49 -04:00
parent 3e871efed8
commit b756b2d7d0
No known key found for this signature in database
GPG key ID: E752C80DB72BB014
2 changed files with 8 additions and 3 deletions

View file

@ -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)

View file

@ -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