Skip to content

Commit 348f464

Browse files
authored
flake8: Enable F822 (python#10144)
1 parent 99375e1 commit 348f464

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

.flake8

+3-9
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,24 @@
2020
# E701 multiple statements on one line (colon) -- disallows "..." on the same line
2121
# F401 imported but unused -- does not recognize re-exports
2222
# https://github.com/PyCQA/pyflakes/issues/474
23-
# F822 undefined name in __all__ -- flake8 does not recognize 'foo: Any'
24-
# https://github.com/PyCQA/pyflakes/issues/533
2523

2624
# Rules that are out of the control of stub authors:
2725
# E741 ambiguous variable name
2826
# F403 import *' used; unable to detect undefined names
2927
# F405 defined from star imports
3028

31-
# Ignored to workaround pyflakes issues with stub files
32-
# (the bugs this rule catches are caught by our other tests anyway):
33-
# F821 undefined name
34-
3529
[flake8]
3630
extend-ignore = A, D, N8, SIM, RST, TYP, E301, E302, E305, E501
3731
per-file-ignores =
3832
*.py: E203
39-
*.pyi: B, E701, E741, F401, F403, F405, F822
33+
*.pyi: B, E701, E741, F401, F403, F405
4034
# Since typing.pyi defines "overload" this is not recognized by flake8 as typing.overload.
4135
# Unfortunately, flake8 does not allow to "noqa" just a specific error inside the file itself.
4236
# https://github.com/PyCQA/flake8/issues/1079
4337
# F811 redefinition of unused '...'
44-
stdlib/typing.pyi: B, E701, E741, F401, F403, F405, F811, F822
38+
stdlib/typing.pyi: B, E701, E741, F401, F403, F405, F811
4539
# Generated protobuf files include docstrings
46-
# *_pb2.pyi: B, E701, E741, F401, F403, F405, F822, Y021, Y026, Y053, Y054
40+
# *_pb2.pyi: B, E701, E741, F401, F403, F405, Y021, Y026, Y053, Y054
4741

4842
# TODO: Re-enable flake8 on generated protobuf files
4943
# after https://github.com/nipunn1313/mypy-protobuf/issues/523 is resolved

0 commit comments

Comments
 (0)