Skip to content

Commit eeb57e2

Browse files
authored
fix: return set instead of list when just --quiet (#2829)
### Description Fixes #2825. `parse_quietness` should return a set since that is what `setup_logger()` expects. ### QC <!-- Make sure that you can tick the boxes below. --> * [x] The PR contains a test case for the changes or the changes are already covered by an existing test case. * [x] The documentation (`docs/`) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).
1 parent cec0041 commit eeb57e2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

snakemake/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1767,7 +1767,7 @@ def parse_args(argv):
17671767
def parse_quietness(quietness) -> Set[Quietness]:
17681768
if quietness is not None and len(quietness) == 0:
17691769
# default case, set quiet to progress and rule
1770-
quietness = [Quietness.PROGRESS, Quietness.RULES]
1770+
quietness = {Quietness.PROGRESS, Quietness.RULES}
17711771
else:
17721772
quietness = Quietness.parse_choices_set(quietness)
17731773
return quietness

snakemake/logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ def setup_logger(
746746
quiet = set()
747747
elif not isinstance(quiet, set):
748748
raise ValueError(
749-
"Unsupported value provided for quiet mode (either bool, None or list allowed)."
749+
"Unsupported value provided for quiet mode (either bool, None or set allowed)."
750750
)
751751

752752
logger.log_handler.extend(handler)

0 commit comments

Comments
 (0)