KEMBAR78
Support type alias as Literal by TH3CHARLie · Pull Request #8014 · python/mypy · GitHub
Skip to content

Conversation

TH3CHARLie
Copy link
Collaborator

@TH3CHARLie TH3CHARLie commented Nov 26, 2019

resolves #7996

I'm not very sure about how effective the current testcase is, suggestions are welcomed.

Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

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

Thank you! Generally looks good, I have few comments here.

@TH3CHARLie
Copy link
Collaborator Author

Updated:

  • reveal_type() for all declared vars
  • rename original test to testAliasAsLiteral (I forgot to change the name when I decided to exclude the enum test)
  • add enum testcase testAliasForEnumTypeAsLiteral
  • update lookup_qualified logic, remove TODO in visit_member_expr

Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

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

Thanks! Couple minor suggestions, otherwise looks good.

@ilevkivskyi ilevkivskyi merged commit 596cde6 into python:master Nov 26, 2019
@TH3CHARLie TH3CHARLie deleted the fix-alias-as-literal branch November 27, 2019 00:32
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.

Variant of alias for enum type cannot be used as Literal

2 participants