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

Removes incorrect override check on overloaded methods #4810

Merged
merged 2 commits into from Mar 28, 2018

Conversation

Projects
None yet
3 participants
@Michael0x2a
Copy link
Collaborator

Michael0x2a commented Mar 28, 2018

This commit fixes #4565

Currently, when we override a method and annotate the implementation, mypy appears to check the legality of the override twice: once for the overloads, and once for the implementation.

This second check is unnecessary and causes a spurious error.

Removes incorrect override check on overloaded methods
This commit fixes #4565

Currently, when we override a method and annotate the implementation,
mypy appears to check the legality of the override twice: once for
the overloads, and once for the implementation.

This second check is unnecessary and causes a spurious error.
@msullivan
Copy link
Collaborator

msullivan left a comment

Looks good!

@ilevkivskyi
Copy link
Collaborator

ilevkivskyi left a comment

I would actually add a test where overloaded types are actually incompatible and this generates "Incompatible with supertype error". It looks like we only have few such tests for stubs, not for source files where implementation is required.

@Michael0x2a

This comment has been minimized.

Copy link
Collaborator Author

Michael0x2a commented Mar 28, 2018

@ilevkivskyi I added another test -- let me know if you think I should add more.

@ilevkivskyi
Copy link
Collaborator

ilevkivskyi left a comment

Thanks!

@ilevkivskyi ilevkivskyi merged commit 8100581 into python:master Mar 28, 2018

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@Michael0x2a Michael0x2a deleted the Michael0x2a:fix-bad-overload-implementation-signature-check branch Jul 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.