Skip to content

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

Merged
srittau merged 4 commits into
python:mainfrom
max-muoto:use-generator-for-context-managers
Aug 12, 2024
Merged

srittau merged 4 commits into
python:mainfrom
max-muoto:use-generator-for-context-managers

Conversation

@max-muoto

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

Copy link
Copy Markdown
Contributor

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.

@github-actions

github-actions Bot commented Aug 3, 2024

Copy link
Copy Markdown
Contributor

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

@srittau srittau left a comment

Copy link
Copy Markdown
Collaborator

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
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