8000 Fix #1081. When comparing template to actual arg types, stop at shortest. by gvanrossum · Pull Request #1085 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Fix #1081. When comparing template to actual arg types, stop at shortest. #1085

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

Closed
wants to merge 1 commit into from
Closed

Conversation

gvanrossum
Copy link
Member

Another crash fix. (I'm not sure if I put the test in the right place or if this is even the right fix, but it does stop the crash and return a reasonable error.)

@JukkaL
Copy link
Collaborator
JukkaL commented Dec 29, 2015

Rebased and pushed. This fix works around the problem and doesn't cause bad things.

A slightly better option would be to not infer any constraints at all if the numbers of arguments differ. We should also check argument kinds and match arguments more cleverly -- if one of the functions has *args, it could match multiple arguments in the other signature. We could probably reuse similar logic from the function call checker.

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