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

Fix misindented `del` statement #3954

Merged
merged 1 commit into from Sep 14, 2017

Conversation

Projects
None yet
1 participant
@gvanrossum
Member

gvanrossum commented Sep 14, 2017

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.

Fix misindented `del` statement.
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.

@gvanrossum gvanrossum merged commit 3db1451 into python:master Sep 14, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gvanrossum gvanrossum deleted the gvanrossum:fix-3892 branch Sep 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment