From e58b1d04ec7b014065d39f6d9d7f6cec77c670b6 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 17 Sep 2024 11:33:37 -0500 Subject: [PATCH] fix style checks on Python 3.12 (#328) After merging https://github.com/rapidsai/ci-imgs/pull/188, style checks here started breaking like this: ```text python/cuvs/cuvs/test/test_doctests.py:103:24: E231 missing whitespace after ':' python/cuvs/cuvs/test/test_doctests.py:124:27: E231 missing whitespace after ':' ``` ([build link](https://github.com/rapidsai/cuvs/actions/runs/10905609739/job/30264867507?pr=325)) Looks like both of those are false positives (we really do intend to not have a space after the `:` on those lines). This proposes ignoring them with `#noqa` comments. --- python/cuvs/cuvs/test/test_doctests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cuvs/cuvs/test/test_doctests.py b/python/cuvs/cuvs/test/test_doctests.py index 4407bda52..bd8ed1a6d 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}" + return f"{filename}:{docstring.name}" # noqa: E231 @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()}" + f"{docstring.name}:\n{doctest_stdout.getvalue()}" # noqa: E231 )