Skip to content

Produce mypyc errors when encountering bug #5423 - #7482

Merged
msullivan merged 1 commit into
masterfrom
error-none-var
Sep 9, 2019
Merged

msullivan merged 1 commit into
masterfrom
error-none-var

Conversation

@msullivan

Copy link
Copy Markdown
Collaborator

Currently when we encounter #5423 (when someting is incorrectly
inferred as None), we generate code that casts a variable to None
incorrectly since we are confused about the real type.

Now produce an error message saying to add an annotation when we
detect it.

Fix up the places in mypy this caused errors.

Currently when we encounter #5423 (when someting is incorrectly
inferred as None), we generate code that casts a variable to None
incorrectly since we are confused about the real type.

Now produce an error message saying to add an annotation when we
detect it.

Fix up the places in mypy this caused errors.

@ilevkivskyi ilevkivskyi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Also thanks for the clean-up!

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.

2 participants