Skip to content

Stdlib: fix three trivial issues with parameter defaults #9618

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 2 commits into from
Jan 30, 2023

Conversation

AlexWaygood
Copy link
Member

Refs #9608.

  • _dummy_threading.stack_size: the size parameter can be None, and the default is None
  • gettext.find: the default value for the all parameter is False, so the = ... for the all parameter in the Literal[True] overload is incorrect. We only want type checkers to select the Literal[True] overload(s) if the user has actually passed a value in for that parameter.
  • mailbox.Mailbox.pop: the _T TypeVar will go unsolved if the second overload is selected and no value is passed in for the default value. The first overload covers the case where no value is specified for the default parameter, so the = ... for the second overload is incorrect and unnecessary.

@github-actions
Copy link
Contributor

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

@JelleZijlstra JelleZijlstra merged commit 6011cac into python:main Jan 30, 2023
@AlexWaygood AlexWaygood deleted the misc-overloads branch January 30, 2023 09:30
Avasam pushed a commit to Avasam/typeshed that referenced this pull request Feb 1, 2023
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