Skip to content

Commit

Permalink
Merge pull request #523 from joaomcteixeira/minorlints2
Browse files Browse the repository at this point in the history
Corrects minor lint issues
  • Loading branch information
joaomcteixeira committed Aug 3, 2022
2 parents 7410498 + 885db18 commit dcb1b6f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/compare_runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def error_1(l1, l2):
is_in_l1 = set(l1).difference(set(l2))
is_in_l2 = set(l2).difference(set(l1))

if not(is_in_l1) and not(is_in_l2):
if not is_in_l1 and not is_in_l2:
raise AssertionError(
"BUG FOUND: at least one of these sets should have values"
)
Expand Down
12 changes: 6 additions & 6 deletions src/haddock/clis/cli_dmn.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
)

ap.add_argument(
'--short-first',
dest='short_first',
'--sort-first',
dest='sort_first',
help=(
'Sort jobs by size in ascending order. If not given jobs are order by '
'size in descending order: the biggest first.'
Expand Down Expand Up @@ -242,7 +242,7 @@ def main(
job_limit=10,
manager='slurm',
restart=False,
short_first=False,
sort_first=False,
):
"""
Execute the benchmark daemon.
Expand Down Expand Up @@ -274,9 +274,9 @@ def main(
Whether to restart the `RUNNING` jobs that might have been halted
in previous daemon runs. Defaults to False.
short_first : bool
sort_first : bool
Whether to sort jobs by their size in ascending manner. That is,
the shorted jobs first. Defaults to False, the longer first.
the sorted jobs first. Defaults to False, the longer first.
"""
# lists of all the job files in the benchmark_path folder
job_list = list(benchmark_path.glob('*/jobs/*.job'))
Expand All @@ -286,7 +286,7 @@ def main(
sys.exit('+ ERROR! No jobs found in folder: {str(benchmark_path)!r}')

# sorts the job list
job_list.sort(key=calc_size, reverse=not(short_first))
job_list.sort(key=calc_size, reverse=not(sort_first)) # noqa: E275

# create the job objects according to the queue managing systme
_jobsys = workload_manager_launch[manager]
Expand Down
2 changes: 1 addition & 1 deletion src/haddock/gear/prepare_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ def populate_topology_molecule_params(topoaa):
# well. `prot_segid` is the only one differing per molecule.
for i in range(1, len(topoaa["molecules"]) + 1):
mol = f"mol{i}"
if not(mol in topoaa and "prot_segid" in topoaa[mol]):
if not (mol in topoaa and "prot_segid" in topoaa[mol]):
topoaa_dft["mol1"]["prot_segid"] = uppers.pop()

topoaa[mol] = recursive_dict_update(
Expand Down

0 comments on commit dcb1b6f

Please sign in to comment.