Skip to content

Revert "Treat varargs as legal context in default lambda argument" #2790

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 1 commit into from
Feb 1, 2017

Conversation

gvanrossum
Copy link
Member

Reverts #2770

Here's a snippet that now crashes:

import warnings
warnings.warn = lambda *args, **kwargs: None

(This is literally from our codebase, except there we have a # type: ignore too.)

@gvanrossum gvanrossum merged commit ed7d0c0 into master Feb 1, 2017
@gvanrossum gvanrossum deleted the revert-2770-varargs_context_lambda branch February 1, 2017 19:36
@gvanrossum
Copy link
Member Author

Sorry @elazarg and @JukkaL -- this was getting in the way of our internal CI. I'm sure it's easy enough to figure out an improved version given the example.

elazarg added a commit to elazarg/mypy that referenced this pull request Feb 2, 2017
JukkaL pushed a commit that referenced this pull request Feb 6, 2017
…2796)

* treat varargs as legal context

* add test for #2790 and fix crash

* check vararg without type_override

* return the parameter for type_override
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.

1 participant