Skip to content

Commit daa0882

Browse files
committed
Update pre-commit tools
1 parent e130977 commit daa0882

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
repos:
22
- repo: https://github.com/charliermarsh/ruff-pre-commit
3-
rev: v0.0.224
3+
rev: v0.0.247
44
hooks:
55
- id: ruff
66
args:
77
- --fix
8-
- --force-exclude
98
- repo: https://github.com/pre-commit/pre-commit-hooks
109
rev: v4.4.0
1110
hooks:

babel/messages/catalog.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ def get_close_matches(word, possibilities, n=3, cutoff=0.6):
3838
It just passes ``autojunk=False`` to the ``SequenceMatcher``, to work
3939
around https://github.com/python/cpython/issues/90825.
4040
"""
41-
if not n > 0:
42-
raise ValueError("n must be > 0: %r" % (n,))
43-
if not 0.0 <= cutoff <= 1.0:
44-
raise ValueError("cutoff must be in [0.0, 1.0]: %r" % (cutoff,))
41+
if not n > 0: # pragma: no cover
42+
raise ValueError(f"n must be > 0: {n!r}")
43+
if not 0.0 <= cutoff <= 1.0: # pragma: no cover
44+
raise ValueError(f"cutoff must be in [0.0, 1.0]: {cutoff!r}")
4545
result = []
4646
s = SequenceMatcher(autojunk=False) # only line changed from difflib.py
4747
s.set_seq2(word)

0 commit comments

Comments
 (0)