Add Y027 to list of ignored .flake8 error codes (#6962)

Refs https://github.com/PyCQA/flake8-pyi/pull/104
This commit is contained in:
Alex Waygood
2022-01-19 15:17:30 +00:00
committed by GitHub
parent 3d1014f389
commit fe6233a8c3
2 changed files with 8 additions and 2 deletions

View File

@@ -19,6 +19,9 @@
# Rules that we'd like to enable in the future:
# Y026 Use typing_extensions.TypeAlias for type aliases (blocked by #4913)
# Y027 Disallow importing typing.ContextManager, typing.OrderedDict &
# typing_extensions.OrderedDict (cannot be globally enabled while typeshed
# still contains stubs supporting Python 2).
[flake8]
per-file-ignores =
@@ -28,7 +31,10 @@ 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 '...'
typing.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F811, F822, Y026
stubs/*.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F822, Y026, Y027
stdlib/@python2/*.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F822, Y026, Y027
stdlib/@python2/typing.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F811, F822, Y026, Y027
stdlib/typing.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F811, F822, Y026
# We are checking with Python 3 but many of the stubs are Python 2 stubs.
builtins = buffer,file,long,raw_input,unicode,xrange