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

Make ZipFile.__enter__ return self #5675

Merged
merged 2 commits into from
Jun 22, 2021
Merged

Make ZipFile.__enter__ return self #5675

merged 2 commits into from
Jun 22, 2021

Conversation

JelleZijlstra
Copy link
Member

No description provided.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

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

@srittau srittau merged commit 73b4c21 into master Jun 22, 2021
@srittau srittau deleted the JelleZijlstra-patch-1 branch June 22, 2021 15:01
@srittau
Copy link
Collaborator

srittau commented Jun 22, 2021

I suggest that in the future we shouldn't accept __enter__() methods returning self anymore that don't use a type var.

@JelleZijlstra
Copy link
Member Author

Yes, and perhaps we can audit the existing ones. git grep 'def __enter__(self) -> [A-Z]' shows a number of candidates.

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