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

Corrects minor lint issues #523

Merged
merged 2 commits into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
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
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