Skip to content

Commit

Permalink
fix style checks on Python 3.12 (#328)
Browse files Browse the repository at this point in the history
After merging rapidsai/ci-imgs#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.
  • Loading branch information
jameslamb committed Sep 17, 2024
1 parent a6b71d7 commit e58b1d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/cuvs/cuvs/test/test_doctests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
)

0 comments on commit e58b1d0

Please sign in to comment.