Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Initialize assignments dictionary when setting rule-based resources #1154

Merged
merged 3 commits into from Aug 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion snakemake/__init__.py
Expand Up @@ -817,7 +817,9 @@ def parse_set_resources(args):
"VALUE being a positive integer or a string."
)

assignments = dict()
from collections import defaultdict

assignments = defaultdict(dict)
if args.set_resources is not None:
for entry in args.set_resources:
key, value = parse_key_value_arg(entry, errmsg=errmsg)
Expand Down