Skip to content

Commit 4eb246d

Browse files
[flake8-bugbear] noqa B023 not bound by design
1 parent 41ff358 commit 4eb246d

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ ignore = [
145145
"B009", # Do not call `getattr` with a constant attribute value
146146
"B010", # [*] Do not call `setattr` with a constant attribute value.
147147
"B011", # Do not `assert False` (`python -O` removes these calls)
148-
"B023", # Function definition does not bind loop variable `warning`
149148
"B028", # No explicit `stacklevel` keyword argument found
150149
# pycodestyle ignore
151150
# pytest can do weird low-level things, and we usually know

testing/test_recwarn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def test_deprecated_call_specificity(self) -> None:
228228
for warning in other_warnings:
229229

230230
def f():
231-
warnings.warn(warning("hi"))
231+
warnings.warn(warning("hi")) # noqa: B023
232232

233233
with pytest.warns(warning):
234234
with pytest.raises(pytest.fail.Exception):

0 commit comments

Comments
 (0)