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

Updated args['trsh'] if condition #721

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion arc/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,16 @@
self.deduce_job_adapter(level=Level(repr=level_of_theory), job_type=job_type)
args = {'keyword': {}, 'block': {}}
if trsh:
args['trsh'] = {'trsh': trsh}
if isinstance(trsh, (str, list)):
args['trsh'] = {'trsh': trsh}

Check warning on line 788 in arc/scheduler.py

View check run for this annotation

Codecov / codecov/patch

arc/scheduler.py#L788

Added line #L788 was not covered by tests
elif isinstance(trsh, dict) and 'trsh' in args:
for key, value in trsh.items():
if isinstance(args['trsh'][key], list) and isinstance(value, list) and key in args['trsh']:
args['trsh'][key].extend(value)

Check warning on line 792 in arc/scheduler.py

View check run for this annotation

Codecov / codecov/patch

arc/scheduler.py#L792

Added line #L792 was not covered by tests
else:
args['trsh'][key] = value

Check warning on line 794 in arc/scheduler.py

View check run for this annotation

Codecov / codecov/patch

arc/scheduler.py#L794

Added line #L794 was not covered by tests
else:
args['trsh'] = trsh

Check warning on line 796 in arc/scheduler.py

View check run for this annotation

Codecov / codecov/patch

arc/scheduler.py#L796

Added line #L796 was not covered by tests
if shift:
args['shift'] = shift
if scan_trsh:
Expand Down
Loading