Skip to content
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

Docstring not showing when using the type statement. #247

Open
oliversheridanmethven opened this issue Feb 9, 2025 · 1 comment
Open
Assignees
Labels
feature New feature or request

Comments

@oliversheridanmethven
Copy link

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."""
@oliversheridanmethven oliversheridanmethven added the unconfirmed This bug was not reproduced yet label Feb 9, 2025
@oliversheridanmethven oliversheridanmethven changed the title bug: Docstring not showing when using the type statement. Feb 9, 2025
@pawamoy
Copy link
Member

pawamoy commented Feb 9, 2025

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.

@pawamoy pawamoy added feature New feature or request and removed unconfirmed This bug was not reproduced yet labels Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants