Skip to content

Commit 5811631

Browse files
committed
chore: ruff
1 parent 7a56351 commit 5811631

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

docs/examples/dataset_exploration.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,7 @@ def simple_loading_fn(raw_data: Any) -> dict:
231231
data=interfaces_df,
232232
name="interfaces_dataset",
233233
# We use a pre-built loader that takes in a list of column names and returns a loader function
234-
loader=create_loader_with_query_pn_units(
235-
pn_unit_iid_colnames=["pn_unit_1_iid", "pn_unit_2_iid"]
236-
),
234+
loader=create_loader_with_query_pn_units(pn_unit_iid_colnames=["pn_unit_1_iid", "pn_unit_2_iid"]),
237235
transform=pipe,
238236
)
239237

src/atomworks/io/tools/rdkit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import io
55
import logging
66
from collections import Counter
7-
from collections.abc import Callable, Generator
7+
from collections.abc import Callable
88
from functools import cache, wraps
99
from os import PathLike
1010
from pathlib import Path

src/atomworks/io/utils/bonds.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def get_struct_conn_bonds(
337337
`struct_conn.conn_type_id <https://mmcif.wwpdb.org/dictionaries/mmcif_pdbx_v50.dic/Items/_struct_conn.conn_type_id.html>`_
338338
"""
339339

340-
def match_or_wildcard(array, value):
340+
def match_or_wildcard(array: np.ndarray, value: str) -> np.ndarray:
341341
if value == "*":
342342
return np.ones_like(array, dtype=bool)
343343
return array == value
@@ -424,7 +424,7 @@ def match_or_wildcard(array, value):
424424
# For non-polymers, we use the auth_seq_id if available and valid (i.e., not "." or "?"); otherwise we use the label_seq_id
425425
# (Required to avoid ambiguity, since if using `label` only we may have multiple residue within a
426426
# chain with the same label_seq_id and the same res_name; see: 6MUB)
427-
427+
428428
res_id1 = int(
429429
row["ptnr1_label_seq_id"]
430430
if ((chain_id1 in relevant_polymer_chain_identifiers) or ("ptnr1_auth_seq_id" not in row))

tests/io/tools/test_rdkit.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
get_morgan_fingerprint_from_rdkit_mol,
1414
smiles_to_rdkit,
1515
)
16-
from atomworks.io.utils.ccd import atom_array_from_ccd_code
1716
from atomworks.io.utils.io_utils import load_any
1817
from tests.io.conftest import TEST_DATA_IO
1918

@@ -230,7 +229,5 @@ def test_chriality_in_spoofed_rdkit_molecules():
230229
assert Chem.FindMolChiralCenters(mol_ala_inverted) == [(1, "R")]
231230

232231

233-
234-
235232
if __name__ == "__main__":
236233
pytest.main(["-v", "-x", __file__])

0 commit comments

Comments
 (0)