From e4036043d36e35be917d0aeaed925cd2ebf2a1a3 Mon Sep 17 00:00:00 2001 From: haiqi96 <14502009+haiqi96@users.noreply.github.com> Date: Thu, 11 Jul 2024 10:49:14 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Junhao Liao --- .../clp-package-utils/clp_package_utils/scripts/decompress.py | 4 ++-- .../clp_package_utils/scripts/native/decompress.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/clp-package-utils/clp_package_utils/scripts/decompress.py b/components/clp-package-utils/clp_package_utils/scripts/decompress.py index 5daca3f1a..f1b4c4e23 100755 --- a/components/clp-package-utils/clp_package_utils/scripts/decompress.py +++ b/components/clp-package-utils/clp_package_utils/scripts/decompress.py @@ -165,13 +165,13 @@ def handle_extraction(parsed_args, clp_home: pathlib.Path, default_config_file_p # fmt: on if parsed_args.orig_file_id: extract_cmd.append("--orig-file-id") - extract_cmd.append(str(parsed_args.target_size)) + extract_cmd.append(str(parsed_args.orig_file_id)) else: extract_cmd.append("--path") extract_cmd.append(str(parsed_args.path)) if parsed_args.target_uncompressed_size: extract_cmd.append("--target-uncompressed-size") - extract_cmd.append(str(parsed_args.target_size)) + extract_cmd.append(str(parsed_args.target_uncompressed_size)) cmd = container_start_cmd + extract_cmd subprocess.run(cmd, check=True) diff --git a/components/clp-package-utils/clp_package_utils/scripts/native/decompress.py b/components/clp-package-utils/clp_package_utils/scripts/native/decompress.py index 52c1bcf81..41ae7c8ca 100755 --- a/components/clp-package-utils/clp_package_utils/scripts/native/decompress.py +++ b/components/clp-package-utils/clp_package_utils/scripts/native/decompress.py @@ -76,7 +76,7 @@ def submit_and_monitor_ir_extraction_job_in_db( db_config: Database, orig_file_id: str, msg_ix: int, - target_uncompressed_size: int | None, + target_uncompressed_size: Optional[int], ) -> None: """ Submits an IR extraction job to the scheduler database and @@ -106,7 +106,7 @@ async def do_extract( db_config: Database, orig_file_id: str, msg_ix: int, - target_uncompressed_size: int | None, + target_uncompressed_size: Optional[int], ): await run_function_in_process( submit_and_monitor_ir_extraction_job_in_db,