diff --git a/cvat-sdk/cvat_sdk/core/downloading.py b/cvat-sdk/cvat_sdk/core/downloading.py index c2be936c9aa..2e826337335 100644 --- a/cvat-sdk/cvat_sdk/core/downloading.py +++ b/cvat-sdk/cvat_sdk/core/downloading.py @@ -58,8 +58,15 @@ def download_file( except ValueError: file_size = None - with atomic_writer(output_path, "wb") as fd, pbar.task( - total=file_size, desc="Downloading", unit_scale=True, unit="B", unit_divisor=1024 + with ( + atomic_writer(output_path, "wb") as fd, + pbar.task( + total=file_size, + desc="Downloading", + unit_scale=True, + unit="B", + unit_divisor=1024, + ), ): while True: chunk = response.read(amt=CHUNK_SIZE, decode_content=False) diff --git a/tests/python/shared/fixtures/init.py b/tests/python/shared/fixtures/init.py index aa1192a0acf..b29c5c30528 100644 --- a/tests/python/shared/fixtures/init.py +++ b/tests/python/shared/fixtures/init.py @@ -300,9 +300,10 @@ def dump_db(): def create_compose_files(container_name_files): for filename in container_name_files: - with open(filename.with_name(filename.name.replace(".tests", "")), "r") as dcf, open( - filename, "w" - ) as ndcf: + with ( + open(filename.with_name(filename.name.replace(".tests", "")), "r") as dcf, + open(filename, "w") as ndcf, + ): dc_config = yaml.safe_load(dcf) for service_name, service_config in dc_config["services"].items():