Remove unnecessary ellipsis expressions (#9976)

Ignore flake8 F821 warnings in stub files
This commit is contained in:
Sebastian Rittau
2023-03-29 13:28:06 +02:00
committed by GitHub
parent 8df767f163
commit 027460f11a
29 changed files with 287 additions and 294 deletions

10
.flake8
View File

@@ -28,18 +28,22 @@
# F403 import *' used; unable to detect undefined names
# F405 defined from star imports
# Ignored to workaround pyflakes issues with stub files
# (the bugs this rule catches are caught by our other tests anyway):
# F821 undefined name
[flake8]
extend-ignore = A, D, N8, SIM, RST, TYP, E301, E302, E305, E501
per-file-ignores =
*.py: E203
*.pyi: B, E701, E741, F401, F403, F405, F822
*.pyi: B, E701, E741, F401, F403, F405, F821, 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, E701, E741, F401, F403, F405, F811, F822
stdlib/typing.pyi: B, E701, E741, F401, F403, F405, F811, F821, F822
# Generated protobuf files include docstrings
*_pb2.pyi: B, E701, E741, F401, F403, F405, F822, Y021, Y026, Y053, Y054
*_pb2.pyi: B, E701, E741, F401, F403, F405, F821, F822, Y021, Y026, Y053, Y054
exclude = .venv*,.git
noqa_require_code = true