Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 15, 2024
1 parent ba3ea49 commit 23230e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/sourmash/cli/sig/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ def subparser(subparsers):
subparser.add_argument(
"--flatten", action="store_true", help="remove abundances from all signatures"
)
subparser.add_argument("--set-name", "--name",
help="rename merged signature")
subparser.add_argument("--set-name", "--name", help="rename merged signature")

Check warning on line 46 in src/sourmash/cli/sig/merge.py

View check run for this annotation

Codecov / codecov/patch

src/sourmash/cli/sig/merge.py#L46

Added line #L46 was not covered by tests
subparser.add_argument(
"-f", "--force", action="store_true", help="try to load all files as signatures"
)
Expand Down
6 changes: 2 additions & 4 deletions src/sourmash/sig/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,7 @@ def intersect(args):

intersect_mh = intersect_mh.inflate(abund_sig.minhash)

intersect_sigobj = sourmash.SourmashSignature(intersect_mh,
name=args.set_name)
intersect_sigobj = sourmash.SourmashSignature(intersect_mh, name=args.set_name)

Check warning on line 585 in src/sourmash/sig/__main__.py

View check run for this annotation

Codecov / codecov/patch

src/sourmash/sig/__main__.py#L585

Added line #L585 was not covered by tests

with sourmash_args.SaveSignaturesToLocation(args.output) as save_sigs:
save_sigs.add(intersect_sigobj)
Expand Down Expand Up @@ -705,8 +704,7 @@ def subtract(args):

subtract_mh = subtract_mh.inflate(abund_sig.minhash)

subtract_sigobj = sourmash.SourmashSignature(subtract_mh,
name=args.set_name)
subtract_sigobj = sourmash.SourmashSignature(subtract_mh, name=args.set_name)

Check warning on line 707 in src/sourmash/sig/__main__.py

View check run for this annotation

Codecov / codecov/patch

src/sourmash/sig/__main__.py#L707

Added line #L707 was not covered by tests

with sourmash_args.SaveSignaturesToLocation(args.output) as save_sigs:
save_sigs.add(subtract_sigobj)
Expand Down
6 changes: 2 additions & 4 deletions tests/test_cmd_signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,7 @@ def test_sig_intersect_1_rename(runtmp):
sig47 = utils.get_test_data("47.fa.sig")
sig63 = utils.get_test_data("63.fa.sig")
sig47and63 = utils.get_test_data("47+63-intersect.fa.sig")
runtmp.run_sourmash("sig", "intersect", sig47, sig63,
"--set-name", "footest")
runtmp.run_sourmash("sig", "intersect", sig47, sig63, "--set-name", "footest")

# stdout should be new signature
out = runtmp.last_result.out
Expand Down Expand Up @@ -821,8 +820,7 @@ def test_sig_subtract_1_name(runtmp):
# subtract of 63 from 47; rename
sig47 = utils.get_test_data("47.fa.sig")
sig63 = utils.get_test_data("63.fa.sig")
runtmp.run_sourmash("sig", "subtract", sig47, sig63,
"--set-name", "footest")
runtmp.run_sourmash("sig", "subtract", sig47, sig63, "--set-name", "footest")

# stdout should be new signature
out = runtmp.last_result.out
Expand Down

0 comments on commit 23230e4

Please sign in to comment.