Skip to content

bug: PEP695 type MyAlias = int not included in docs while MyAlias: TypeAlias = int works fine #298

Description

@mzebrak

Description of the bug

When the PEP695 syntax is used for type alias declaration, no docstring is gathered.

it should be treated the same way as:

from typing import TypeAlias

SomeType: TypeAlias = int
"""Type alias docstring"""

To Reproduce

type SomeType = int
"""Type alias docstring"""

Expected behavior

Should gather type alias and show it on the mkdocs site like when TypeAlias is used:

Image

Environment information

python -m mkdocstrings_handlers.python._internal.debug  # | xclip -selection clipboard
  • System: Linux-6.2.6-76060206-generic-x86_64-with-glibc2.39
  • Python: cpython 3.12.3 (/workspace/clive/venv/bin/python)
  • Environment variables:
  • Installed packages:
    • mkdocstrings-python v1.16.12

Additional context

https://peps.python.org/pep-0695/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions