-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
If we write documentation on the #[violation] macro:
/// ### What it does
/// Checks for `self.assertRaises(Exception)`.
///
/// ## Why is this bad?
/// `assertRaises(Exception)` can lead to your test passing even if the
/// code being tested is never executed due to a typo.
///
/// Either assert for a more specific exception (builtin or custom), use
/// `assertRaisesRegex` or the context manager form of `assertRaises`.
#[violation]
pub struct NoAssertRaisesException;This explanation shows up with ruff rule B017, and in the docs:
- https://github.com/charliermarsh/ruff/blob/main/docs/rules/assert-raises-exception.md
- https://beta.ruff.rs/docs/rules/assert-raises-exception/
We'll track progress here:
-
airflow -
eradicate -
flake8-2020 -
flake8-annotations -
flake8-async -
flake8-bandit -
flake8-blind-except -
flake8-boolean-trap -
flake8-bugbear -
flake8-builtins -
flake8-commas -
flake8-comprehensions -
flake8-copyright -
flake8-datetimez -
flake8-debugger -
flake8-django -
flake8-errmsg -
flake8-executable -
flake8-fixme -
flake8-future-annotations -
flake8-gettext -
flake8-implicit-str-concat -
flake8-import-conventions -
flake8-logging-format -
flake8-no-pep420 -
flake8-pie -
flake8-print -
flake8-pyi -
flake8-pytest-style -
flake8-quotes -
flake8-raise -
flake8-return -
flake8-self -
flake8-simplify -
flake8-slots -
flake8-tidy-imports -
flake8-todos -
flake8-type-checking -
flake8-unused-arguments -
flake8-use-pathlib -
flynt -
isort -
mccabe -
numpy -
pandas-vet -
pep8-naming -
perflint -
pycodestyle -
pydocstyle -
pyflakes -
pygrep-hooks -
pylint -
pyupgrade -
ruff -
tryceratops
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation