From 9cd5a7ba393cbc29133f092d1770bde5cd407fdf Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Thu, 6 Jun 2024 12:54:19 +0200 Subject: [PATCH 1/2] make sure that skip list does not get [''] when nothing is given (the empty default string in `ctx.global_config` was split to `['']`) --- planemo/lint.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/planemo/lint.py b/planemo/lint.py index 5b85022de..deceb2d66 100644 --- a/planemo/lint.py +++ b/planemo/lint.py @@ -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: From 05c44a7c15c9ed558de840fa080903d86f6c6173 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Thu, 6 Jun 2024 18:28:53 +0200 Subject: [PATCH 2/2] fix typo xref https://github.com/galaxyproject/galaxy/pull/18339" --- planemo/lint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planemo/lint.py b/planemo/lint.py index deceb2d66..c14247e7a 100644 --- a/planemo/lint.py +++ b/planemo/lint.py @@ -34,7 +34,7 @@ def build_lint_args(ctx, **kwds): continue skip_types.append(line) - linters = Linter.list_listers() + linters = Linter.list_linters() invalid_skip_types = list(set(skip_types) - set(linters)) if len(invalid_skip_types): error(f"Unknown linter type(s) {invalid_skip_types} in list of linters to be skipped. Known linters {linters}")