Skip to content

Render aliases declared with typing_extensions.TypeAliasType - #912

Open
Boulea7 wants to merge 1 commit into
mitmproxy:mainfrom
Boulea7:fix/backported-type-alias-docs
Open

Boulea7 wants to merge 1 commit into
mitmproxy:mainfrom
Boulea7:fix/backported-type-alias-docs

Conversation

@Boulea7

@Boulea7 Boulea7 commented Dec 3, 2026

Copy link
Copy Markdown

Refs #420.

On supported Python versions where typing_extensions.TypeAliasType is a separate class, pdoc can display the self-reference ArrayLike = ArrayLike and leave variable annotations that use the alias unlinked. Recognizing both alias classes renders the real definition and links variable annotations to it. The typing_extensions import is optional.

I verified the generated HTML with NumPy 1.26.4 on Python 3.11. The CLI regression passed on Python 3.10 through 3.14. The full Python 3.14 suite passed all 348 tests with 100% statement coverage.

I used Codex to help implement and test this change.

This branch has not been deployed

No deployments
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.

1 participant