Import generics from standard modules in all third-party stubs (#7791)

This commit is contained in:
Alex Waygood
2022-05-07 09:35:50 +01:00
committed by GitHub
parent 6c6c669ada
commit 5c6178a821
26 changed files with 76 additions and 59 deletions

View File

@@ -18,9 +18,6 @@
# F405 defined from star imports
# Rules that we'd like to enable in the future:
# Y027 Disallow importing typing.ContextManager, typing.OrderedDict &
# typing_extensions.OrderedDict (cannot be globally enabled while typeshed
# still contains stubs supporting Python 2).
# Y034 Detect common errors where certain methods are annotated as having a fixed
# return type, despite returning self at runtime (temporarily disabled for
# typing.pyi, enabled elsewhere).
@@ -36,7 +33,6 @@ per-file-ignores =
# 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 '...'
stubs/*.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F822, Y027, Y037
stdlib/typing.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F811, F822, Y034, Y037
exclude = .venv*,.git,*_pb2.pyi,stdlib/@python2/*