Exclude Y037 in .flake8 config, for now (#7600)

Unblocks https://github.com/PyCQA/flake8-pyi/pull/202
This commit is contained in:
Alex Waygood
2022-04-06 17:24:02 +01:00
committed by GitHub
parent 71d80efa43
commit 536f783a82

View File

@@ -25,16 +25,19 @@
# 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).
[flake8]
per-file-ignores =
*.py: E203, E501
*.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F822, Y026
*.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F822, Y026, Y037
# 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 '...'
stubs/*.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F822, Y026, Y027
stdlib/typing.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F811, F822, Y026, Y034
stubs/*.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F822, Y026, Y027, Y037
stdlib/typing.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F811, F822, Y026, Y034, Y037
exclude = .venv*,.git,*_pb2.pyi,stdlib/@python2/*