Bump flake8-bugbear; ignore flake8-bugbear in stub files (#9069)

This commit is contained in:
Alex Waygood
2022-11-02 19:18:00 +00:00
committed by GitHub
parent 401a7b929e
commit d1d1afbe3a
3 changed files with 14 additions and 13 deletions

View File

@@ -6,6 +6,7 @@
# E501 line too long
# Some rules are considered irrelevant to stub files:
# B All flake8-bugbear rules are .py-specific
# E701 multiple statements on one line (colon) -- disallows "..." on the same line
# F401 imported but unused -- does not recognize re-exports
# https://github.com/PyCQA/pyflakes/issues/474
@@ -29,14 +30,14 @@
[flake8]
per-file-ignores =
*.py: E203, E301, E302, E305, E501
*.pyi: E301, E302, E305, E501, E701, E741, NQA102, F401, F403, F405, F822, Y037
*.pyi: B, E301, E302, E305, E501, E701, E741, NQA102, F401, F403, F405, F822, Y037
# Since typing.pyi defines "overload" this is not recognized by flake8 as typing.overload.
# Unfortunately, flake8 does not allow to "noqa" just a specific error inside the file itself.
# https://github.com/PyCQA/flake8/issues/1079
# F811 redefinition of unused '...'
stdlib/typing.pyi: E301, E302, E305, E501, E701, E741, NQA102, F401, F403, F405, F811, F822, Y037
stdlib/typing.pyi: B, E301, E302, E305, E501, E701, E741, NQA102, F401, F403, F405, F811, F822, Y037
# Generated protobuf files include docstrings
*_pb2.pyi: E301, E302, E305, E501, E701, NQA102, Y021, Y026
*_pb2.pyi: B, E301, E302, E305, E501, E701, NQA102, Y021, Y026
exclude = .venv*,.git
noqa_require_code = true