Skip to content

Commit 82b4a0a

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 6367a12 commit 82b4a0a

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

src/sourmash/commands.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ def gather(args):
944944
databases = [LazyLinearIndex(db) for db in databases]
945945
elif 1:
946946
# @CTB foo revindex
947-
print('XXX NOTE: using RevIndex for ZipFileLinearIndex')
947+
print("XXX NOTE: using RevIndex for ZipFileLinearIndex")
948948
from sourmash.index.revindex import RevIndex
949949
from sourmash.index import ZipFileLinearIndex
950950

src/sourmash/index/__init__.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,13 @@ def counter_gather(self, query, threshold_bp, **kwargs):
320320
# tada!
321321
return counter
322322
else:
323-
print('XXX NOTE: Using RevIndex CounterGather')
323+
print("XXX NOTE: Using RevIndex CounterGather")
324324
from .revindex import RevIndex_CounterGather, RevIndex
325325

326326
revindex = RevIndex(template=prefetch_query.minhash)
327-
cg = RevIndex_CounterGather(prefetch_query, revindex, threshold_bp,
328-
allow_insert=True)
327+
cg = RevIndex_CounterGather(
328+
prefetch_query, revindex, threshold_bp, allow_insert=True
329+
)
329330

330331
n_added = 0
331332
for result in self.prefetch(prefetch_query, threshold_bp, **kwargs):

src/sourmash/index/revindex.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ def _init_inner(self):
6767
template_ptr,
6868
)
6969

70-
for n, (orig_ss, stored_ss) in enumerate(zip(self._signatures,
71-
self.signatures())):
70+
for n, (orig_ss, stored_ss) in enumerate(
71+
zip(self._signatures, self.signatures())
72+
):
7273
self._orig_signatures[stored_ss.md5sum()] = orig_ss
7374

74-
7575
def signatures(self):
7676
self._init_inner()
7777

@@ -196,9 +196,7 @@ def search(self, query, *args, **kwargs):
196196
if match.score >= threshold:
197197
match_md5 = match.signature.md5sum()
198198
orig_ss = self._orig_signatures[match_md5]
199-
results.append(
200-
IndexSearchResult(match.score, orig_ss, match.location)
201-
)
199+
results.append(IndexSearchResult(match.score, orig_ss, match.location))
202200

203201
return results
204202

tests/test_sourmash.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4281,7 +4281,7 @@ def approx_equal(a, b, n=5):
42814281
# double check -- should match 'search --containment'.
42824282
# (this is kind of useless for a 1.0 contained_by, I guess)
42834283
filename = row["filename"]
4284-
print('trying load from:', row["filename"])
4284+
print("trying load from:", row["filename"])
42854285
match = load_one_signature(filename, ksize=21)
42864286
assert match.contained_by(combined_sig) == 1.0
42874287

0 commit comments

Comments
 (0)