Skip to content

Commit 5d0eae6

Browse files
committed
import linting
1 parent 1867637 commit 5d0eae6

File tree

5 files changed

+11
-15
lines changed

5 files changed

+11
-15
lines changed

tests/test_ann_index.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
import json
33
import sqlite3
44
from typing import List, Tuple
5-
65
import numpy as np
76
import pytest
87
from matchms import Spectrum
9-
108
from ms2query.database import ANNIndex
119
from ms2query.database.spectra_merging import ensure_merged_tables
1210

11+
1312
# --- small helpers for array <-> BLOB used in tests (mirrors the production helpers) ---
1413

1514
def _ndarray_to_blob(arr: np.ndarray) -> bytes:

tests/test_compound_database.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@
44
import numpy as np
55
import pandas as pd
66
import pytest
7-
8-
# >>> adjust to your package/module path
97
from ms2query.database.compound_database import (
108
CompoundDatabase,
119
SpecToCompoundMap,
12-
map_from_spectraldb_metadata,
10+
compute_fingerprints, # returns List[Optional[(bits, counts)]]
1311
get_unique_compounds_from_spectraldb,
14-
compute_fingerprints, # returns List[Optional[(bits, counts)]]
1512
inchikey14_from_full,
13+
map_from_spectraldb_metadata,
1614
)
1715

16+
1817
# -------------------------
1918
# Helpers
2019
# -------------------------

tests/test_fingerprint_computation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import numpy as np
22
import pytest
3-
43
from ms2query.fingerprint_computation import (
54
FingerprintGenerator,
65
SparseFingerprintGenerator,
7-
get_mol_from_smiles,
8-
prepare_sparse_vector,
96
compute_fingerprints_from_smiles,
10-
count_fingerprint_keys,
117
compute_idf,
8+
count_fingerprint_keys,
9+
get_mol_from_smiles,
10+
prepare_sparse_vector,
1211
)
1312

13+
1414
# -----------------------
1515
# Test doubles / fakes
1616
# -----------------------

tests/test_merging_utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# test_merge_spectra.py
22
import numpy as np
33
import pytest
4-
from numpy.testing import assert_allclose
54
from matchms import Spectrum
6-
7-
# Adjust if your module name is different:
85
from ms2query.spectral_processing.merging_utils import (
9-
normalize_spectrum_sum,
106
_merge_cluster_to_consensus,
117
get_merged_spectra,
8+
normalize_spectrum_sum,
129
)
10+
from numpy.testing import assert_allclose
11+
1312

1413
# ---------- helpers ----------
1514

tests/test_spectral_database.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import pandas as pd
44
import pytest
55
from matchms import Spectrum
6-
76
from ms2query.database.spectral_database import SpectralDatabase
87

98

0 commit comments

Comments
 (0)