Skip to content

Conversation

@sixolet
Copy link
Collaborator

@sixolet sixolet commented May 3, 2017

This should fix #3312

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

It's fine as is but if you have a sec here are some style nits.

[builtins fixtures/list.pyi]

[case testAnonymousArgumentError]

Copy link
Member

Choose a reason for hiding this comment

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

Don't need this blank line.

mypy/messages.py Outdated
else:
msg = 'Missing positional arguments'
if callee.name and diff:
if callee.name and [d for d in diff if d is not None]:
Copy link
Member

Choose a reason for hiding this comment

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

This could just be if callee.name and any(diff): ... Or if that's too cryptic use any(d is not None for d in diff).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Heh. Should be all, thanks for the collaborative catch.

@sixolet
Copy link
Collaborator Author

sixolet commented May 3, 2017

... wow, who'd have thunk I'd get something so simple wrong so many times.

@gvanrossum gvanrossum merged commit 09e7b12 into python:master May 3, 2017
@gvanrossum
Copy link
Member

... wow, who'd have thunk I'd get something so simple wrong so many times.

It's the release pressure. Happens to me all the time. Also, this logic is pretty subtle. And thanks for fixing this under pressure!

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.

Crash when a function with anonymous args is missing an argument

2 participants