Skip to content

Commit

Permalink
make sure that skip list does not get ['']
Browse files Browse the repository at this point in the history
when nothing is given (the empty default string in
`ctx.global_config` was split to `['']`)
  • Loading branch information
bernt-matthias committed Jun 6, 2024
1 parent cb2321b commit 9cd5a7b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions planemo/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ def build_lint_args(ctx, **kwds):
"""Handle common report, error, and skip linting arguments."""
report_level = kwds.get("report_level", "all")
fail_level = kwds.get("fail_level", "warn")
skip = kwds.get("skip", None)
skip = kwds.get("skip", ctx.global_config.get("lint_skip"))
if skip is None:
skip = ctx.global_config.get("lint_skip", "")
if isinstance(skip, list):
skip = ",".join(skip)
skip_types = [s.strip() for s in skip.split(",")]
skip = []
if isinstance(skip, list):
skip_types = skip
else:
skip_types = [s.strip() for s in skip.split(",")]

for skip_file in kwds.get("skip_file", []):
with open(skip_file) as f:
Expand Down

0 comments on commit 9cd5a7b

Please sign in to comment.