```python def some_fn(*_) -> None: ... for _ in range(1): foo = 0 some_fn(lambda: foo) ``` Since `foo` is a local variable in the loop, `B023` shouldn't happen here (unless I am mistaken about something). Running `flake8==6.0.0` with `flake8-bugbear==23.7.10` on this: ```bash > flake8 a.py a.py:7:21: B023 Function definition does not bind loop variable 'foo'. ``` I think this relates to https://github.com/PyCQA/flake8-bugbear/issues/269 or https://github.com/PyCQA/flake8-bugbear/issues/380.