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
Add support for PEP 695's explicit type aliases #11561
Comments
PR welcome! A |
Should we add a bit of guidance to this issue, for anyone who might attempt it? Like, where would they need to make code changes, or where would they start? |
Likely this would be a new |
There's a lot of types that render as |
PEP 695 introduces (at least what I've discovered) two problems:
|
Support was added in pyright / pylance via microsoft/pyright#6647 by treating a type alias definition the same as a regular assignment when it comes to docstrings. |
Is your feature request related to a problem? Please describe.
sphinx cannot document
typing.TypeAliasType
nortyping_extensions.TypeAliasType
.https://peps.python.org/pep-0695/
Describe the solution you'd like
automodule
should document exportedTypeAliasType
s without needing a preceding#:
comment, the same way that classes and functions do not need a preceding#:
.References to such a type used in the signatures of other functions, types, classes, etc should hyperlink to the type's declaration, the same way that references to a class will hyperlink to the declaration of that class.
The declaration should render similar to how older style type aliases render today, saying "alias of ..."
Describe alternatives you've considered
Additional context
#8934
#11438
The text was updated successfully, but these errors were encountered: