From 09cd67c5f77530b3a37eb9d4b023f287b3ebb2ef Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Tue, 17 Sep 2024 15:44:26 -0500 Subject: [PATCH] Update flake8 to 7.1.1. (#327) We need to update flake8 to fix a false-positive that appears with older flake8 versions on Python 3.12. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - James Lamb (https://github.com/jameslamb) - Ben Frederickson (https://github.com/benfred) URL: https://github.com/rapidsai/cuvs/pull/327 --- .pre-commit-config.yaml | 2 +- python/cuvs/cuvs/test/test_doctests.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3e3623f24..439b42959 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: # Explicitly specify the pyproject.toml at the repo root, not per-project. args: ["--config", "pyproject.toml"] - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + rev: 7.1.1 hooks: - id: flake8 args: ["--config=.flake8"] diff --git a/python/cuvs/cuvs/test/test_doctests.py b/python/cuvs/cuvs/test/test_doctests.py index bd8ed1a6d..4407bda52 100644 --- a/python/cuvs/cuvs/test/test_doctests.py +++ b/python/cuvs/cuvs/test/test_doctests.py @@ -100,7 +100,7 @@ def _find_doctests_in_obj(obj, finder=None, criteria=None): def _test_name_from_docstring(docstring): filename = Path(docstring.filename).name.split(".")[0] - return f"{filename}:{docstring.name}" # noqa: E231 + return f"{filename}:{docstring.name}" @pytest.mark.parametrize( @@ -121,5 +121,5 @@ def test_docstring(docstring): results = runner.summarize() assert not results.failed, ( f"{results.failed} of {results.attempted} doctests failed for " - f"{docstring.name}:\n{doctest_stdout.getvalue()}" # noqa: E231 + f"{docstring.name}:\n{doctest_stdout.getvalue()}" )