cylc-flow
cylc-flow copied to clipboard
Flake8: Turn on B038
(Requires closure of https://github.com/PyCQA/flake8-bugbear/issues/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 https://github.com/PyCQA/flake8-bugbear/issues/451.
https://github.com/PyCQA/flake8-bugbear/releases/tag/24.1.17
B038 has been changed to an optional "opinionated" warning B909 - https://github.com/PyCQA/flake8-bugbear/pull/456