Skip to content
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

Support type alias as Literal #8014

Merged
merged 5 commits into from Nov 26, 2019
Merged

Conversation

@TH3CHARLie
Copy link
Contributor

TH3CHARLie commented Nov 26, 2019

resolves #7996

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

TH3CHARLie added 2 commits Nov 26, 2019
fix
Copy link
Collaborator

ilevkivskyi left a comment

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

test-data/unit/check-literal.test Outdated Show resolved Hide resolved
test-data/unit/check-literal.test Show resolved Hide resolved
mypy/semanal.py Outdated Show resolved Hide resolved
@TH3CHARLie

This comment has been minimized.

Copy link
Contributor Author

TH3CHARLie commented Nov 26, 2019

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
Collaborator

ilevkivskyi left a comment

Thanks! Couple minor suggestions, otherwise looks good.

test-data/unit/check-literal.test Outdated Show resolved Hide resolved
mypy/semanal.py Outdated Show resolved Hide resolved
@ilevkivskyi ilevkivskyi merged commit 596cde6 into python:master Nov 26, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@TH3CHARLie TH3CHARLie deleted the TH3CHARLie:fix-alias-as-literal branch Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.