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

docstrings/sphinx: Support cross-refs for types in "Raises" sections #22

Closed
pawamoy opened this issue Feb 3, 2022 · 1 comment
Closed
Labels
feature New feature or request griffe: docstrings Related to docstring parsing griffe: sphinx Related to Sphinx-style docstrings

Comments

@pawamoy
Copy link
Member

pawamoy commented Feb 3, 2022

Is your feature request related to a problem? Please describe.
The goal is to have a common set of features between all parsers.

Describe the solution you'd like
The Sphinx parser should be able to parse the types in "Raises" section in order to enable automatic cross-references.

from griffe.docstrings.utils import parse_annotation

# annotation is a string
annotation = parse_annotation(annotation, docstring)
# annotation is unchanged, or becomes a Name or Expression! cross-refs enabled
@pawamoy pawamoy added help wanted feature New feature or request griffe: docstrings Related to docstring parsing griffe: sphinx Related to Sphinx-style docstrings labels Feb 3, 2022
@pawamoy
Copy link
Member Author

pawamoy commented May 29, 2022

Closing for cleanup, but if you'd like to work on this, just ask and I'll reopen!

@pawamoy pawamoy closed this as completed May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request griffe: docstrings Related to docstring parsing griffe: sphinx Related to Sphinx-style docstrings
Projects
None yet
Development

No branches or pull requests

1 participant