Skip to content

Conversation

ilevkivskyi
Copy link
Member

Fixes #7126

@ilevkivskyi ilevkivskyi requested a review from JukkaL July 2, 2019 16:35
Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

Makes sense! Just one nit.

mypy/checker.py Outdated
@@ -2410,6 +2410,10 @@ def check_multi_assignment_from_tuple(self, lvalues: List[Lvalue], rvalue: Expre
reinferred_rvalue_type, context,
infer_lvalue_type)
return
if isinstance(reinferred_rvalue_type, AnyType) and self.current_node_deferred:
# Doing more inference in deferred nodes can be hard, so give up for now.
# TODO: should we try harder?
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think that we need the TODO, since doing inference in deferred nodes is pretty pointless.

@ilevkivskyi ilevkivskyi merged commit b279f4c into python:master Jul 2, 2019
@ilevkivskyi ilevkivskyi deleted the fix-deferral-lvalue branch July 2, 2019 19:23
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 on unpacking to member expression
2 participants