Config arguments can't be set to "None"

Create issue
Issue #1210 new
Chris Rands created an issue

By setting arguments to None by default it disallows specifying them as None. I suggest instead using default = object() and then assert v is not default unless there is a good reason not to?

Example:

$ snakemake -s test.snake --config arg1=None
Traceback (most recent call last):
File "path/snakemake", line 11, in <module>
load_entry_point('snakemake==5.3.0', 'console_scripts', 'snakemake')()
File "/path/python3.6/site-packages/snakemake/init.py", line 1375, in main
config = parse_config(args)
File "/path/python3.6/site-packages/snakemake/init.py", line 616, in parse_config
assert v is not None
AssertionError
$ cat test.snake
x = config['arg1']

Comments (1)

  1. Log in to comment