We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$ cat t.py import contextlib import pytest def test_(): with pytest.raises(Exception): pass with ( contextlib.nullcontext(), pytest.raises(Exception), ): pass $ ruff check --select B017 t.py t.py:6:10: B017 `pytest.raises(Exception)` should be considered evil | 5 | def test_(): 6 | with pytest.raises(Exception): | ^^^^^^^^^^^^^^^^^^^^^^^^ B017 7 | pass | Found 1 error.
This should report both occurrences of pytest.raises(Exception), but the second one is missing.
pytest.raises(Exception)
$ python --version --version Python 3.12.5 (v3.12.5:ff3bc82f7c9, Aug 7 2024, 05:32:06) [Clang 13.0.0 (clang-1300.0.29.30)] $ ruff --version ruff 0.6.8
The text was updated successfully, but these errors were encountered:
B017
7e3894f
Successfully merging a pull request may close this issue.
This should report both occurrences of
pytest.raises(Exception)
, but the second one is missing.The text was updated successfully, but these errors were encountered: