Skip to content

Commit

Permalink
Exclude Y037 in .flake8 config, for now (#7600)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored Apr 6, 2022
1 parent 71d80ef commit 536f783
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -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/*

0 comments on commit 536f783

Please sign in to comment.