Skip to content

Use conditional overloads to simplify several stdlib functions #7540

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

Merged
merged 5 commits into from
Mar 25, 2022

Conversation

AlexWaygood
Copy link
Member

This feature is now supported by pyright and, as of version 0.940, mypy (python/mypy#10712). Not sure whether pytype supports it or not, but wanted to see what the CI thought about it.

@AlexWaygood AlexWaygood marked this pull request as ready for review March 23, 2022 21:18
@github-actions
Copy link
Contributor

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

@AlexWaygood
Copy link
Member Author

AlexWaygood commented Mar 24, 2022

@rchen152, does pytype support this feature? (No rush to do so, if not — it's more of a "nice to have" than a "need to have" :)

@rchen152
Copy link
Collaborator

Yeah, this should work with pytype! (I played around with the example in python/mypy#10712, and pytype's parsing output looks fine.)

@AlexWaygood
Copy link
Member Author

Yeah, this should work with pytype! (I played around with the example in python/mypy#10712, and pytype's parsing output looks fine.)

Awesome!

@srittau srittau merged commit b63c963 into python:master Mar 25, 2022
@AlexWaygood AlexWaygood deleted the overloads branch March 25, 2022 08:33
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.

3 participants