]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Renovate CI tools a bit (#972)
authorAarni Koskela <akx@iki.fi>
Mon, 20 Feb 2023 15:27:36 +0000 (17:27 +0200)
committerGitHub <noreply@github.com>
Mon, 20 Feb 2023 15:27:36 +0000 (17:27 +0200)
* Update GitHub Actions versions

* Update pre-commit tools

.github/workflows/test.yml
.pre-commit-config.yaml
babel/messages/catalog.py

index c584fd983b0bdaaf5c5a8cae3be08572681e0b11..e87f23e5f041145326d155d21b360696d3f19249 100644 (file)
@@ -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*') }}
index 4c3eb9c302e43461ee69c4bd048ccb307080ab3b..d1935c00604859958fd0a25ab6f4be2aeafa7c6c 100644 (file)
@@ -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:
index a500e77b78566cf44d0146bf5423bd1cf83d9b2f..47b9e62ea1b198124766750dbebe4a37f8c16ff2 100644 (file)
@@ -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)