Skip to content

Commit bb16e55

Browse files
[pre-commit.ci] pre-commit autoupdate (#3492)
<!--pre-commit.ci start--> updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.1](astral-sh/ruff-pre-commit@v0.8.6...v0.9.1) <!--pre-commit.ci end--> --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 81ca6ff commit bb16e55

16 files changed

+37
-37
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
- id: check-toml
1111
- id: debug-statements
1212
- repo: https://github.com/astral-sh/ruff-pre-commit
13-
rev: v0.8.6
13+
rev: v0.9.1
1414
hooks:
1515
- id: ruff-format
1616
- id: ruff

src/sourmash/cli/compare.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def subparser(subparsers):
9292
subparser.add_argument(
9393
"--csv",
9494
metavar="F",
95-
help="write matrix to specified file in CSV format (with column " "headers)",
95+
help="write matrix to specified file in CSV format (with column headers)",
9696
)
9797
subparser.add_argument(
9898
"--labels-to",

src/sourmash/cli/compute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def subparser(subparsers):
105105
type=str,
106106
default="",
107107
metavar="FILE",
108-
help="merge all input files into one signature file with the " "specified name",
108+
help="merge all input files into one signature file with the specified name",
109109
)
110110
file_args.add_argument(
111111
"--name-from-first",

src/sourmash/cli/gather.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ def subparser(subparsers):
100100
subparser.add_argument(
101101
"--save-matches",
102102
metavar="FILE",
103-
help="save gather matched signatures from the database to the "
104-
"specified file",
103+
help="save gather matched signatures from the database to the specified file",
105104
)
106105
subparser.add_argument(
107106
"--save-prefetch",

src/sourmash/cli/prefetch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ def subparser(subparsers):
5858
subparser.add_argument(
5959
"--save-unmatched-hashes",
6060
metavar="FILE",
61-
help="output unmatched query hashes as a signature to the " "specified file",
61+
help="output unmatched query hashes as a signature to the specified file",
6262
)
6363
subparser.add_argument(
6464
"--save-matching-hashes",
6565
metavar="FILE",
66-
help="output matching query hashes as a signature to the " "specified file",
66+
help="output matching query hashes as a signature to the specified file",
6767
)
6868
subparser.add_argument(
6969
"--md5", default=None, help="select the signature with this md5 as query"

src/sourmash/command_compute.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ def compute(args):
7878
notify("Computing both nucleotide and protein signatures.")
7979
num_sigs = 2 * len(ksizes)
8080
elif args.dna and args.dayhoff:
81-
notify("Computing both nucleotide and Dayhoff-encoded protein " "signatures.")
81+
notify("Computing both nucleotide and Dayhoff-encoded protein signatures.")
8282
num_sigs = 2 * len(ksizes)
8383
elif args.dna and args.hp:
84-
notify("Computing both nucleotide and hp-encoded protein " "signatures.")
84+
notify("Computing both nucleotide and hp-encoded protein signatures.")
8585
num_sigs = 2 * len(ksizes)
8686
elif args.dna:
8787
notify("Computing only nucleotide (and not protein) signatures.")
@@ -91,11 +91,11 @@ def compute(args):
9191
num_sigs = len(ksizes)
9292
elif args.dayhoff:
9393
notify(
94-
"Computing only Dayhoff-encoded protein (and not nucleotide) " "signatures."
94+
"Computing only Dayhoff-encoded protein (and not nucleotide) signatures."
9595
)
9696
num_sigs = len(ksizes)
9797
elif args.hp:
98-
notify("Computing only hp-encoded protein (and not nucleotide) " "signatures.")
98+
notify("Computing only hp-encoded protein (and not nucleotide) signatures.")
9999
num_sigs = len(ksizes)
100100

101101
if args.protein or args.dayhoff or args.hp:
@@ -269,7 +269,7 @@ def _compute_individual(args, signatures_factory):
269269
save_sigs_to_location(sigs, save_sigs)
270270

271271
notify(
272-
f"calculated {len(sigs)} signatures for {n+1} sequences in {filename}"
272+
f"calculated {len(sigs)} signatures for {n + 1} sequences in {filename}"
273273
)
274274

275275
# if not args.output, close output for every input filename.
@@ -443,7 +443,7 @@ def to_param_str(self):
443443
kstr = [f"k={k}" for k in self.ksizes]
444444
else:
445445
# for protein, divide ksize by three.
446-
kstr = [f"k={k//3}" for k in self.ksizes]
446+
kstr = [f"k={k // 3}" for k in self.ksizes]
447447
assert kstr
448448
pi.extend(kstr)
449449

src/sourmash/command_sketch.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def _execute_sketch(args, signatures_factory):
207207
error("error: sourmash only supports CC0-licensed signatures. sorry!")
208208
sys.exit(-1)
209209

210-
notify(f'computing signatures for files: {", ".join(args.filenames)}')
210+
notify(f"computing signatures for files: {', '.join(args.filenames)}")
211211

212212
if args.merge and not args.output:
213213
error("ERROR: must specify -o with --merge")
@@ -353,7 +353,7 @@ def _compute_sigs(to_build, output, *, check_sequence=False):
353353
save_sigs.add(sig)
354354

355355
notify(
356-
f"calculated {len(sigs)} signatures for {n+1} sequences in {filename}"
356+
f"calculated {len(sigs)} signatures for {n + 1} sequences in {filename}"
357357
)
358358

359359
save_sigs.close()
@@ -768,7 +768,7 @@ def _compute_individual(args, signatures_factory):
768768
save_sigs_to_location(sigs, save_sigs)
769769

770770
notify(
771-
f"calculated {len(sigs)} signatures for {n+1} sequences in {filename}"
771+
f"calculated {len(sigs)} signatures for {n + 1} sequences in {filename}"
772772
)
773773

774774
# if not args.output, close output for every input filename.
@@ -942,7 +942,7 @@ def to_param_str(self):
942942
kstr = [f"k={k}" for k in self.ksizes]
943943
else:
944944
# for protein, divide ksize by three.
945-
kstr = [f"k={k//3}" for k in self.ksizes]
945+
kstr = [f"k={k // 3}" for k in self.ksizes]
946946
assert kstr
947947
pi.extend(kstr)
948948

src/sourmash/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ def gather(args):
10771077
)
10781078

10791079
print_results(
1080-
f"the recovered matches hit {sum_f_uniq_found*100:.1f}% of the query k-mers (unweighted)."
1080+
f"the recovered matches hit {sum_f_uniq_found * 100:.1f}% of the query k-mers (unweighted)."
10811081
)
10821082

10831083
print_results("")
@@ -1345,7 +1345,7 @@ def multigather(args):
13451345
)
13461346

13471347
print_results(
1348-
f"the recovered matches hit {sum_f_uniq_found*100:.1f}% of the query k-mers (unweighted)."
1348+
f"the recovered matches hit {sum_f_uniq_found * 100:.1f}% of the query k-mers (unweighted)."
13491349
)
13501350
print_results("")
13511351

src/sourmash/distance_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
def check_distance(dist):
1818
if not 0 <= dist <= 1:
19-
raise ValueError(f"Error: distance value {dist :.4f} is not between 0 and 1!")
19+
raise ValueError(f"Error: distance value {dist:.4f} is not between 0 and 1!")
2020
else:
2121
return dist
2222

src/sourmash/plugins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def list_all_plugins():
198198
notify(
199199
f"{'plugin type':<20s} {'from python module':<30s} {'v':<5s} {'entry point name':<20s}"
200200
)
201-
notify(f"{'-'*20} {'-'*30} {'-'*5} {'-'*20}")
201+
notify(f"{'-' * 20} {'-' * 30} {'-' * 5} {'-' * 20}")
202202

203203
for plugin in plugins:
204204
name = plugin.name

0 commit comments

Comments
 (0)