Skip to content

Commit

Permalink
Add review remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
Horofic committed Jul 18, 2024
1 parent 6b19fb5 commit 40379dd
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions acquire/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,14 +328,15 @@ def check_and_set_acquire_args(
if not args.children and args.skip_parent:
raise ValueError("--skip-parent can only be set with --children")

if args.output_type == "zip" and args.compress_method not in ZIP_COMPRESSION_METHODS:
raise ValueError(
f"Invalid compression method for zip, allowed are: {', '.join(ZIP_COMPRESSION_METHODS.keys())}"
)
if args.output_type == "tar" and args.compress_method not in TAR_COMPRESSION_METHODS:
raise ValueError(
f"Invalid compression method for tar, allowed are: {', '.join(TAR_COMPRESSION_METHODS.keys())}"
)
if args.compress:

Check warning on line 331 in acquire/utils.py

View check run for this annotation

Codecov / codecov/patch

acquire/utils.py#L331

Added line #L331 was not covered by tests
if (args.output_type == "zip" and args.compress_method) and args.compress_method not in ZIP_COMPRESSION_METHODS:
raise ValueError(
f"Invalid compression method for zip, allowed are: {', '.join(ZIP_COMPRESSION_METHODS.keys())}"
)

Check warning on line 335 in acquire/utils.py

View check run for this annotation

Codecov / codecov/patch

acquire/utils.py#L334-L335

Added lines #L334 - L335 were not covered by tests
if (args.output_type == "tar" and args.compress_method) and args.compress_method not in TAR_COMPRESSION_METHODS:
raise ValueError(
f"Invalid compression method for tar, allowed are: {', '.join(TAR_COMPRESSION_METHODS.keys())}"
)

Check warning on line 339 in acquire/utils.py

View check run for this annotation

Codecov / codecov/patch

acquire/utils.py#L338-L339

Added lines #L338 - L339 were not covered by tests


def get_user_name() -> str:
Expand Down

0 comments on commit 40379dd

Please sign in to comment.