Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PEP 585 syntax in @python2/_ast, convert more TypeVars to _typeshed.Self, & # noqa a SQLAlchemy line #6954

Merged
merged 2 commits into from
Jan 18, 2022

Conversation

AlexWaygood
Copy link
Member

Part II of trying to get the CI green for PyCQA/flake8-pyi#97

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JelleZijlstra JelleZijlstra merged commit cd93461 into python:master Jan 18, 2022
@AlexWaygood AlexWaygood deleted the python2-fixes branch January 18, 2022 19:27
@hauntsaninja
Copy link
Collaborator

Does this definitely work? I.e. why did we skip Python 2 when we did this codemod previously?

@hauntsaninja
Copy link
Collaborator

#5872 just says "scripts did something weird", but looks like we switched Python 2 to use PEP 604 syntax in #5915 and nothing went wrong :-)

@AlexWaygood
Copy link
Member Author

AlexWaygood commented Jan 18, 2022

Does this definitely work? I.e. why did we skip Python 2 when we did this codemod previously?

From my perspective, it was because I didn't care about Python 2 stubs, and there would be fewer problems to fix after the script had run if I only ran the script on the Python-3-only stub :)

@Akuli
Copy link
Collaborator

Akuli commented Jan 18, 2022

I wrote "e.g. because scripts did something weird", and this particular reason isn't why I skipped @python2 stubs. I didn't touch @python2 simply because I don't care about what happens to Python 2 stubs.

Also, AlexWaygood's scripts tend to be of much better quality than my quick and dirty scripts, so they're less likely to ruin stub files and require manual work :)

@Akuli
Copy link
Collaborator

Akuli commented Jan 18, 2022

Another note: flake8-pyi uses typeshed's .flake8 file in its CI, so configuring flake8 to silence @python2 errors there is also an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants