[flake8-bugbear] noqa B023 not bound by design
This commit is contained in:
parent
41ff3584d7
commit
4eb246d4e1
|
@ -145,7 +145,6 @@ ignore = [
|
||||||
"B009", # Do not call `getattr` with a constant attribute value
|
"B009", # Do not call `getattr` with a constant attribute value
|
||||||
"B010", # [*] Do not call `setattr` 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)
|
"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
|
"B028", # No explicit `stacklevel` keyword argument found
|
||||||
# pycodestyle ignore
|
# pycodestyle ignore
|
||||||
# pytest can do weird low-level things, and we usually know
|
# pytest can do weird low-level things, and we usually know
|
||||||
|
|
|
@ -228,7 +228,7 @@ class TestDeprecatedCall:
|
||||||
for warning in other_warnings:
|
for warning in other_warnings:
|
||||||
|
|
||||||
def f():
|
def f():
|
||||||
warnings.warn(warning("hi"))
|
warnings.warn(warning("hi")) # noqa: B023
|
||||||
|
|
||||||
with pytest.warns(warning):
|
with pytest.warns(warning):
|
||||||
with pytest.raises(pytest.fail.Exception):
|
with pytest.raises(pytest.fail.Exception):
|
||||||
|
|
Loading…
Reference in New Issue