diff options
author | Aarni Koskela <akx@iki.fi> | 2023-02-20 17:27:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 17:27:36 +0200 |
commit | 373a52f0425d0af1e578e8562a8db93fc3a02488 (patch) | |
tree | 301ff0dbc877b7ef7f1fd5c844c90efaebb7a82e | |
parent | c76f1d4bc574c4885b7a1afa90da3ca5026153ec (diff) | |
download | babel-373a52f0425d0af1e578e8562a8db93fc3a02488.tar.gz |
Renovate CI tools a bit (#972)
* Update GitHub Actions versions
* Update pre-commit tools
-rw-r--r-- | .github/workflows/test.yml | 2 | ||||
-rw-r--r-- | .pre-commit-config.yaml | 3 | ||||
-rw-r--r-- | babel/messages/catalog.py | 8 |
3 files changed, 6 insertions, 7 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c584fd9..e87f23e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,7 @@ jobs: BABEL_CLDR_QUIET: "1" steps: - uses: actions/checkout@v3 - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: cldr key: cldr-${{ hashFiles('scripts/*cldr*') }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4c3eb9c..d1935c0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,10 @@ repos: - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.224 + rev: v0.0.247 hooks: - id: ruff args: - --fix - - --force-exclude - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: diff --git a/babel/messages/catalog.py b/babel/messages/catalog.py index a500e77..47b9e62 100644 --- a/babel/messages/catalog.py +++ b/babel/messages/catalog.py @@ -38,10 +38,10 @@ def get_close_matches(word, possibilities, n=3, cutoff=0.6): It just passes ``autojunk=False`` to the ``SequenceMatcher``, to work around https://github.com/python/cpython/issues/90825. """ - if not n > 0: - raise ValueError("n must be > 0: %r" % (n,)) - if not 0.0 <= cutoff <= 1.0: - raise ValueError("cutoff must be in [0.0, 1.0]: %r" % (cutoff,)) + if not n > 0: # pragma: no cover + raise ValueError(f"n must be > 0: {n!r}") + if not 0.0 <= cutoff <= 1.0: # pragma: no cover + raise ValueError(f"cutoff must be in [0.0, 1.0]: {cutoff!r}") result = [] s = SequenceMatcher(autojunk=False) # only line changed from difflib.py s.set_seq2(word) |