diff --git a/pyproject.toml b/pyproject.toml index cf6e5adec..8605e5bae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -145,7 +145,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) - "B023", # Function definition does not bind loop variable `warning` "B028", # No explicit `stacklevel` keyword argument found # pycodestyle ignore # pytest can do weird low-level things, and we usually know diff --git a/testing/test_recwarn.py b/testing/test_recwarn.py index e2b2eb8a2..5045c781e 100644 --- a/testing/test_recwarn.py +++ b/testing/test_recwarn.py @@ -228,7 +228,7 @@ class TestDeprecatedCall: for warning in other_warnings: def f(): - warnings.warn(warning("hi")) + warnings.warn(warning("hi")) # noqa: B023 with pytest.warns(warning): with pytest.raises(pytest.fail.Exception):