Skip to content

Use Generator instead of Iterator for 3rd-party context managers #12481

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 4 commits into from
Aug 12, 2024

Conversation

max-muoto
Copy link
Contributor

@max-muoto max-muoto commented Aug 3, 2024

This PR (taken from the advice of @srittau in this comment) moves all of the third-party context manager stubs to use Generator as opposed to Iterator. Additionally this PR switches out cases of Generator[None, None, None] to utilize the now simplified Generator[None], which makes usage of type var defaults.

Copy link
Contributor

github-actions bot commented Aug 3, 2024

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

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@srittau srittau merged commit 37807d7 into python:main Aug 12, 2024
71 checks passed
max-muoto added a commit to max-muoto/typeshed that referenced this pull request Aug 17, 2024
max-muoto added a commit to max-muoto/typeshed that referenced this pull request Sep 8, 2024
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.

2 participants