8000 `tempfile.SpooledTemporaryFile`: fix overloads by AlexWaygood · Pull Request #9627 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

tempfile.SpooledTemporaryFile: fix overloads #9627

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 1 commit into from
Jan 31, 2023
Merged

Conversation

AlexWaygood
Copy link
Member
@AlexWaygood AlexWaygood commented Jan 30, 2023

We want the type checker to always pick the _BytesMode overload if no value is passed for the mode parameter, so specifying a default value for the other overloads is incorrect. Fixing this unfortunately requires adding two new overloads.

Refs #9608.

@github-actions
Copy link
Contributor

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

@JelleZijlstra JelleZijlstra merged commit 81463b9 into main Jan 31, 2023
@JelleZijlstra JelleZijlstra deleted the tempfile-overloads branch January 31, 2023 01:04
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
0