Skip to content

Commit

Permalink
Merge branch 'pre-commit-ci-update-config' of github.com:sourmash-bio…
Browse files Browse the repository at this point in the history
…/sourmash into pre-commit-ci-update-config
  • Loading branch information
ctb committed May 7, 2024
2 parents 9a46bb2 + 8dd4544 commit 674d426
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/sourmash/nodegraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ def calc_expected_collisions(graph, force=False, max_false_pos=0.2):
print("** Do not use these results!!", file=sys.stderr)
print("**", file=sys.stderr)
print(
"** (estimated false positive rate of %.3f;" % fp_all,
f"** (estimated false positive rate of {fp_all:.3f};",
file=sys.stderr,
end=" ",
)
print("max recommended %.3f)" % max_false_pos, file=sys.stderr)
print(f"max recommended {max_false_pos:.3f})", file=sys.stderr)
print("**", file=sys.stderr)

if not force:
Expand Down
2 changes: 1 addition & 1 deletion src/sourmash/sbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def popitem(self):
# we just need to select the maximum key/node id
(key, _) = max(c for c in common if c[1] == count)
except IndexError:
msg = "%s is empty" % self.__class__.__name__
msg = f"{self.__class__.__name__} is empty"

Check warning on line 105 in src/sourmash/sbt.py

View check run for this annotation

Codecov / codecov/patch

src/sourmash/sbt.py#L105

Added line #L105 was not covered by tests
raise KeyError(msg) from None
else:
value = self.pop(key)
Expand Down
2 changes: 1 addition & 1 deletion src/sourmash/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class RustObject:
_shared = False

def __init__(self):
raise TypeError("Cannot instanciate %r objects" % self.__class__.__name__)
raise TypeError(f"Cannot instanciate {self.__class__.__name__!r} objects")

@classmethod
def _from_objptr(cls, ptr, shared=False):
Expand Down

0 comments on commit 674d426

Please sign in to comment.