Skip to content

Conversation

@sgt0
Copy link
Contributor

@sgt0 sgt0 commented Nov 5, 2025

For reviewers

  • I did not use AI
  • I used AI and thorougly reviewed every code/docs change

Description of the change

Given a module like this:

# __init__.py

from ._typing import *
# _typing.py

__all__ = ("TA1", "TA2")

type TA1 = list[int]
TA2 = list[int]

One can access my_module.TA1 at runtime (Python 3.12):

>>> import my_module
>>> my_module.TA1.__value__
list[int]

So TypeAliass should be marked as being available at runtime.

Relevant resources

Copy link
Member

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@pawamoy pawamoy merged commit 9debb52 into mkdocstrings:main Nov 5, 2025
25 checks passed
@sgt0 sgt0 deleted the typealias-runtime branch November 6, 2025 02:04
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.

2 participants