KEMBAR78
Fix misindented `del` statement by gvanrossum · Pull Request #3954 · python/mypy · GitHub
Skip to content

Conversation

gvanrossum
Copy link
Member

Fixes #3892.

Everywhere we infer the correct type for a partially-typed variable,
we do two things: set var.type and delete var from partial_tyes.
However in one place (try_infer_partial_type_from_indexed_assignment())
the var.type assignment was skipped if the current node was deferred
but the deletion was done unconditionally. This caused the partial
type to remain in a place where serialization could not handle it.

Fixes python#3892.

Everywhere we infer the correct type for a partially-typed variable,
we do two things: set var.type and delete var from partial_tyes.
However in one place (try_infer_partial_type_from_indexed_assignment())
the var.type assignment was skipped if the current node was deferred
but the deletion was done unconditionally.  This caused the partial
type to remain in a place where serialization could not handle it.
@gvanrossum gvanrossum merged commit 3db1451 into python:master Sep 14, 2017
@gvanrossum gvanrossum deleted the fix-3892 branch September 14, 2017 02:49
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