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

dict.pop: Remove default for second argument #7481

Merged
merged 1 commit into from
Mar 13, 2022
Merged

Conversation

JelleZijlstra
Copy link
Member

The first overload takes care of the case where there is only one argument, so there should be no default in the second overload.

The first overload takes care of the case where there is only one argument, so there should be no default in the second overload.
@github-actions
Copy link
Contributor

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

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Sounds good. This is mainly aesthetic / doesn't cause any issue as was right?

@srittau srittau merged commit 3e3cc2a into master Mar 13, 2022
@srittau srittau deleted the JelleZijlstra-patch-1 branch March 13, 2022 12:11
@srittau
Copy link
Collaborator

srittau commented Mar 13, 2022

Sounds good. This is mainly aesthetic / doesn't cause any issue as was right?

I believe so, although in theory it could make a difference when return types from multiple overloads get merged.

@JelleZijlstra
Copy link
Member Author

I got here from jab/bidict#242 (comment) because I thought the extra default was confusing mypy's incompatible override check. Seems like that was something else, but this change is still a little more hygienic.

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