Ignore flake8 extensions stubbed by typeshed (#9715)

This commit is contained in:
Avasam
2023-02-19 07:42:03 -05:00
committed by GitHub
parent 1387a9efa9
commit 50acb57cda

19
.flake8
View File

@@ -1,3 +1,13 @@
# The following rules come from plugins that are not used by typeshed.
# Since typeshed stubs them, they can still be expected to be found in a
# developer's venv for intellisense and reference reasons
# A flake8-builtins
# D flake8-docstrings
# N8 pep8-naming
# SIM flake8-simplify
# RST flake8-rst-docstrings
# TYP flake8-typing-imports
# The following rules are incompatible with or enforced by black:
# E203 whitespace before ':' -- scripts only
# E301 expected 1 blank line
@@ -19,16 +29,17 @@
# F405 defined from star imports
[flake8]
extend-ignore = A, D, N8, SIM, RST, TYP, E301, E302, E305, E501
per-file-ignores =
*.py: E203, E301, E302, E305, E501
*.pyi: B, E301, E302, E305, E501, E701, E741, F401, F403, F405, F822
*.py: E203
*.pyi: B, E701, E741, F401, F403, F405, F822
# 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: B, E301, E302, E305, E501, E701, E741, F401, F403, F405, F811, F822
stdlib/typing.pyi: B, E701, E741, F401, F403, F405, F811, F822
# Generated protobuf files include docstrings
*_pb2.pyi: B, E301, E302, E305, E501, E701, Y021, Y026
*_pb2.pyi: B, E701, Y021, Y026
exclude = .venv*,.git
noqa_require_code = true