Enable flake8-pyi's Y034 check in stdlib/typing.pyi (#8530)

This commit is contained in:
Alex Waygood
2022-08-11 09:57:31 +01:00
committed by GitHub
parent 5a24bf8e1f
commit 556f6a10f6
2 changed files with 12 additions and 14 deletions

View File

@@ -18,9 +18,6 @@
# F405 defined from star imports
# Rules that we'd like to enable in the future:
# 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).
# Y037 Use PEP 604 syntax instead of `typing.Union` and `typing.Optional`.
# Currently can't be enabled due to a few lingering bugs in mypy regarding
# PEP 604 type aliases (see #4819).
@@ -33,6 +30,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 '...'
stdlib/typing.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F811, F822, Y034, Y037
stdlib/typing.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F811, F822, Y037
exclude = .venv*,.git,*_pb2.pyi