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 12, 2024
1 parent 9a45829 commit 2c98573
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/sourmash/sig/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,18 @@ def overlap(args):
)
sig1 = list(sig1)
if len(sig1) != 1:
notify(f"ERROR: 'sig overlap' needs exactly one signature per file; found {len(sig1)} in '{args.signature1}'")
notify(

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

View check run for this annotation

Codecov / codecov/patch

src/sourmash/sig/__main__.py#L392

Added line #L392 was not covered by tests
f"ERROR: 'sig overlap' needs exactly one signature per file; found {len(sig1)} in '{args.signature1}'"
)
sys.exit(-1)

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

View check run for this annotation

Codecov / codecov/patch

src/sourmash/sig/__main__.py#L395

Added line #L395 was not covered by tests
sig2 = sourmash.load_file_as_signatures(
args.signature2, ksize=args.ksize, select_moltype=moltype
)
sig2 = list(sig2)
if len(sig2) != 1:
notify(f"ERROR: 'sig overlap' needs exactly one signature per file; found {len(sig2)} in '{args.signature2}'")
notify(

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

View check run for this annotation

Codecov / codecov/patch

src/sourmash/sig/__main__.py#L401

Added line #L401 was not covered by tests
f"ERROR: 'sig overlap' needs exactly one signature per file; found {len(sig2)} in '{args.signature2}'"
)
sys.exit(-1)

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

View check run for this annotation

Codecov / codecov/patch

src/sourmash/sig/__main__.py#L404

Added line #L404 was not covered by tests

sig1 = sig1[0]
Expand Down Expand Up @@ -663,7 +667,9 @@ def subtract(args):
)
from_sigobj = list(from_sigobj)
if len(from_sigobj) != 1:
notify(f"ERROR: 'sig subtract' needs exactly one signature per file; found {len(from_sigobj)} in '{from_sigfile}'")
notify(

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

View check run for this annotation

Codecov / codecov/patch

src/sourmash/sig/__main__.py#L670

Added line #L670 was not covered by tests
f"ERROR: 'sig subtract' needs exactly one signature per file; found {len(from_sigobj)} in '{from_sigfile}'"
)
sys.exit(-1)

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

View check run for this annotation

Codecov / codecov/patch

src/sourmash/sig/__main__.py#L673

Added line #L673 was not covered by tests
from_sigobj = from_sigobj[0]

Expand Down Expand Up @@ -715,7 +721,9 @@ def subtract(args):
)
abund_sig = list(abund_sig)
if len(abund_sig) != 1:
notify(f"ERROR: 'sig subtract' needs exactly one signature per file; found {len(abund_sig)} in '{args.abundances_from}'")
notify(

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

View check run for this annotation

Codecov / codecov/patch

src/sourmash/sig/__main__.py#L724

Added line #L724 was not covered by tests
f"ERROR: 'sig subtract' needs exactly one signature per file; found {len(abund_sig)} in '{args.abundances_from}'"
)
sys.exit(-1)

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

View check run for this annotation

Codecov / codecov/patch

src/sourmash/sig/__main__.py#L727

Added line #L727 was not covered by tests
abund_sig = abund_sig[0]

Expand Down

0 comments on commit 2c98573

Please sign in to comment.