Skip to content

Commit

Permalink
fix: extra args check (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
tedil authored Nov 25, 2024
1 parent a45b319 commit 7d6d649
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions snappy_pipeline/workflows/somatic_variant_calling/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,8 @@ def argument(args: list[str]) -> list[str]:
def _is_valid_argument(arg: str) -> bool:
return arg.startswith("--")

if any(_is_valid_argument(arg) for arg in args):
raise ValueError(
f"invalid arguments: {list(filter(lambda x: not _is_valid_argument(x), args))}"
)
if invalid_args := list(filter(lambda x: not _is_valid_argument(x), args)):
raise ValueError(f"invalid arguments: {invalid_args}")
return args


Expand Down

0 comments on commit 7d6d649

Please sign in to comment.