Skip to content

Docstring not showing when using the type statement.  #247

Open
@oliversheridanmethven

Description

@oliversheridanmethven

When I use the type statement introduced in Python 3.12, the docstring does not show. However, when I drop this the docstring shows up. Seems like a bug:

foo = list[str]
"""This docstring shows up."""

type bar = list[str]
"""This docstring does not show up."""

Activity

changed the title [-]bug:[/-] [+]Docstring not showing when using the `type` statement. [/+] on Feb 9, 2025
pawamoy

pawamoy commented on Feb 9, 2025

@pawamoy
Member

Hi @oliversheridanmethven, thanks for the report!

It's a feature request rather than a bug (the language evolves and we have to keep up with it) 🙂 Good news, it's almost already supported, see mkdocstrings/griffe#348 and #221.

added
featureNew feature or request
and removed
unconfirmedThis bug was not reproduced yet
on Feb 9, 2025
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

      Participants

      @pawamoy@oliversheridanmethven

      Issue actions

        Docstring not showing when using the `type` statement. · Issue #247 · mkdocstrings/python