Skip to content

Flake8: Turn on B038 #5931

@wxtim

Description

@wxtim

(Requires closure of PyCQA/flake8-bugbear#451)

#5925 Turned of Flake8-Bugbear B038 because it was causing failures. We should fix these failures/decide that they are OK and remove the exception from tox.ini.

  • The two cases in async_util are probably legitimate exceptions to the rule, parly because they are while loops using the modification to empty an object.
  • The one in broadcast_report is also using a while loop, but might not need to: It's not a quick fix though - it's 9 YO code and as far as I can see has no unit tests. IMO needs a suite of unit tests existing behaviour before changing. Not a quick win.
  • The one is in network/scan.py and option_parsers.py are the result of the bug recorded at B038 false positive in 24.1.15 + 24.1.16 PyCQA/flake8-bugbear#451.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions