Skip to content

Commit

Permalink
Updated args['trsh'] if condition
Browse files Browse the repository at this point in the history
.

.
  • Loading branch information
calvinp0 committed Dec 13, 2023
1 parent 2b5e18d commit dccf3ca
Showing 1 changed file with 10 additions and 1 deletion.
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 @@ def run_job(self,
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

0 comments on commit dccf3ca

Please sign in to comment.