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 e654428
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion arc/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,19 @@ 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 key in args['trsh']:
if isinstance(args['trsh'][key], list) and isinstance(value, list):
args['trsh'][key].extend(value)

Check warning on line 793 in arc/scheduler.py

View check run for this annotation

Codecov / codecov/patch

arc/scheduler.py#L793

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

Check warning on line 795 in arc/scheduler.py

View check run for this annotation

Codecov / codecov/patch

arc/scheduler.py#L795

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

Check warning on line 797 in arc/scheduler.py

View check run for this annotation

Codecov / codecov/patch

arc/scheduler.py#L797

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

Check warning on line 799 in arc/scheduler.py

View check run for this annotation

Codecov / codecov/patch

arc/scheduler.py#L799

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

0 comments on commit e654428

Please sign in to comment.