Extend syntax highlighting and completions for string types #2631
cdce8p
started this conversation in
Enhancement
Replies: 2 comments
-
Moving this issue to discussion as an enhancement request for comments and upvotes. |
Beta Was this translation helpful? Give feedback.
0 replies
-
+1 especially because using forward references in this context is pretty common when supporting Python < 3.10 in libraries. Using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think it's awesome that Pylance supports syntax highlighting and completions in string type annotations.
Would it be possible to extend that? Below
cast
andTypeVar
as example.NewType
is also similar.Lastly, type aliases. Variables explicitly annotated with
TypeAlias
should be strait forward. Some support for it seems to be implemented already. Implicit aliases are probably a bit more difficult. Although cases which can safely be inferred as alias might still be possible.Example code
Beta Was this translation helpful? Give feedback.
All reactions