Skip to content

Fix type aliases with unicode in Python 2 - #2516

Merged
ddfisher merged 1 commit into
masterfrom
fix-unicode-type-alias
Dec 1, 2016
Merged

ddfisher merged 1 commit into
masterfrom
fix-unicode-type-alias

Conversation

@ddfisher

@ddfisher ddfisher commented Dec 1, 2016

Copy link
Copy Markdown
Collaborator

This is especially important for unicode_literals files.

Comment thread mypy/exprtotype.py
return TypeList([expr_to_unanalyzed_type(t) for t in expr.items],
line=expr.line, column=expr.column)
elif isinstance(expr, (StrExpr, BytesExpr)):
elif isinstance(expr, (StrExpr, BytesExpr, UnicodeExpr)):

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.

Can you search to see if there are other places that might have a similar bug?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Will do!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

From a quick grep it looks like there might be -- I'll take a closer look tomorrow!

@ddfisher
ddfisher merged commit f4ee753 into master Dec 1, 2016
@ddfisher
ddfisher deleted the fix-unicode-type-alias branch December 1, 2016 01:55
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