Add Y027 to list of ignored .flake8 error codes#6962
Add Y027 to list of ignored .flake8 error codes#6962JelleZijlstra merged 3 commits intopython:masterfrom
.flake8 error codes#6962Conversation
Refs PyCQA/flake8-pyi#104 There are a number of stubs in typeshed that still support Python 2. Each subdirectory of stubs specifies whether or not it supports Python 2 in the `METADATA.toml` file. However, there's no easy way for flake8 to read those files, and I don't particularly like the idea of duplicating that information in the `.flake8` config file. As such, I think it's easiest if we just globally ignore this check for the whole of typeshed. We can still keep the equivalent check in `check_new_syntax.py`, where it's easier to dynamically specific filepaths that we want to check things for.
|
The Python 3-only stdlib is the most important chunk of typeshed. What if we just ignore it in all of |
Yes, that's a better idea! |
|
Thanks! Looking at https://github.com/PyCQA/flake8-pyi/runs/4869311453?check_suite_focus=true you may need a noqa in contextlib.pyi, do you want to do that in this PR? |
Oh whoops, you're right, thanks! |
|
Also, can you add Y027 in the list around line 20 of this file? |
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Refs PyCQA/flake8-pyi#104
There are a number of stubs in typeshed that still support Python 2. Each subdirectory of stubs specifies whether or not it supports Python 2 in the
METADATA.tomlfile. However, there's no easy way for flake8 to read those files, and I don't particularly like the idea of duplicating that information in the.flake8config file. As such, I think it's easiest if we just globally ignore this check for the whole of typeshed. We can still keep the equivalent check incheck_new_syntax.py, where it's easier to dynamically specific filepaths that we want to check things for.