Skip to content

Commit 50cb79a

Browse files
committed
ruff all
1 parent b7d05ae commit 50cb79a

29 files changed

+182
-74
lines changed

docs/gen_ref_pages.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"""Generate the code reference pages."""
2-
from functools import partial
32
from pathlib import Path
43

54
import mkdocs_gen_files

pyhdx/batch_processing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from pyhdx.config import cfg
1414
from pyhdx.fileIO import read_dynamx
1515
from pyhdx.models import HDXMeasurement, HDXMeasurementSet
16-
from pyhdx.process import correct_d_uptake, apply_control, filter_peptides
16+
from pyhdx.process import correct_d_uptake, apply_control
1717

1818

1919
time_factors = {"s": 1, "m": 60.0, "min": 60.0, "h": 3600, "d": 86400}

pyhdx/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ def fetch(num: int = typer.Option(10, min=1, help="Maximum number of datasets to
8686
print("All datasets already downloaded")
8787

8888
if failed:
89-
print(f"Failed to download: {' ,'.join(failed)}")
89+
print(f"Failed to download: {', '.join(failed)}")
9090
if success:
91-
print(f"Downloaded: {' ,'.join(success)}")
91+
print(f"Downloaded: {', '.join(success)}")
9292

9393

9494
@datasets_app.command()

pyhdx/fitting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
from collections import namedtuple
4-
from dataclasses import dataclass, field
4+
from dataclasses import dataclass
55
from functools import partial
66
from typing import Union, Optional, Any, Literal
77

pyhdx/fitting_torch.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from scipy import constants, linalg
88

99
from pyhdx.fileIO import dataframe_to_file
10-
from pyhdx.config import cfg
1110

1211

1312
# TORCH_DTYPE = t.double

pyhdx/local_cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def blocking_cluster():
105105
n_workers = cfg.cluster.n_workers
106106
local_cluster = LocalCluster(scheduler_port=port, n_workers=n_workers)
107107
print(f"Started local cluster at {local_cluster.scheduler_address}")
108-
except OSError as e:
108+
except OSError:
109109
print(f"Could not start local cluster with at port: {port}")
110110
raise
111111
try:

pyhdx/models.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import os
44
import textwrap
55
import warnings
6-
from functools import partial
76
from numbers import Number
87
from typing import Optional, Any, Union, TYPE_CHECKING
98

@@ -19,7 +18,7 @@
1918
from pyhdx.alignment import align_dataframes
2019
from pyhdx.fileIO import dataframe_to_file
2120
from pyhdx.process import verify_sequence, parse_temperature, correct_d_uptake, apply_control
22-
from pyhdx.support import reduce_inter, dataframe_intersection, array_intersection
21+
from pyhdx.support import reduce_inter, dataframe_intersection
2322
from pyhdx.config import cfg
2423

2524
if TYPE_CHECKING:

pyhdx/output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class FitReport(FitResultPlotBase):
5151

5252
def __init__(self, fit_result, title=None, doc=None, add_date=True, temp_dir=None, **kwargs):
5353
super().__init__(fit_result)
54-
self.title = title or f"Fit report"
54+
self.title = title or "Fit report"
5555
self.doc = doc or self._init_doc(add_date=add_date)
5656
self._temp_dir = temp_dir or self.make_temp_dir()
5757
self._temp_dir = Path(self._temp_dir)

pyhdx/process.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from __future__ import annotations
22

3-
from functools import reduce
43
import warnings
54
from typing import Optional, Literal, Union
65

pyhdx/support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ def make_monomer(input_file, output_file):
666666
if line.startswith("COMPND") and "CHAIN" in line:
667667
res = re.findall(":(.*);", line)[0]
668668
line = line.replace(res + ";", " A;" + " " * (len(res) - 2))
669-
if line.startswith("ATOM") and not " A " in line:
669+
if line.startswith("ATOM") and " A " not in line:
670670
continue
671671
elif line.startswith("HETATM") and "HOH" in line:
672672
continue

0 commit comments

Comments
 (0)