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

Basic support for typing_extensions.Annotated. #7292

Merged
merged 2 commits into from Aug 6, 2019

Conversation

@brandtbucher
Copy link
Member

commented Aug 6, 2019

Closes #7021. This adds basic support for typing_extensions.Annotated. Currently, we just discard all annotations and resolve to the inner type.

Plugins can use get_type_analyze_hook to try to intervene before this step, but most of the arguments that aren't just names or Literal-able values will have already been mangled by this point. Nothing other than the type sees any sort of validation, either. See the issue discussion for more on this.

Copy link
Collaborator

left a comment

Thanks! This looks great. We'll need to package up the expressions into a RawExpressionType like discussed in the issue before this is likely to be truly useful to things that actually want to use Annotated, but accepting it is an important first step.

@msullivan msullivan merged commit f67c3ee into python:master Aug 6, 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
@brandtbucher brandtbucher deleted the brandtbucher:annotated branch Aug 6, 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.