From e7bab63537ab66f2f750e72627c8fef3ccfddc9f Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Fri, 2 Feb 2024 21:15:22 +0100 Subject: [PATCH] [flake8-bugbear] noqa all the useless comparison that are justified --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7adb20467..062970ca7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -146,7 +146,6 @@ ignore = [ "B009", # Do not call `getattr` with a constant attribute value "B010", # [*] Do not call `setattr` with a constant attribute value. "B011", # Do not `assert False` (`python -O` removes these calls) - "B015", # Pointless comparison. Did you mean to assign a value? "B017", # `pytest.raises(Exception)` should be considered evil "B023", # Function definition does not bind loop variable `warning` "B028", # No explicit `stacklevel` keyword argument found @@ -193,5 +192,6 @@ known-local-folder = ["pytest", "_pytest"] lines-after-imports = 2 [tool.ruff.lint.per-file-ignores] -"src/_pytest/_version.py" = ["I001"] "src/_pytest/_py/**/*.py" = ["B", "PYI"] +"src/_pytest/_version.py" = ["I001"] +"testing/python/approx.py" = ["B015"]