Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

docstrings/numpy: Support cross-refs for types in "Returns" sections #16

Closed
pawamoy opened this issue Feb 3, 2022 · 0 comments
Closed
Labels
feature New feature or request griffe: docstrings Related to docstring parsing griffe: numpy Related to Numpydoc-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 Numpy parser should be able to parse the types in "Returns" 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: numpy Related to Numpydoc-style docstrings labels Feb 3, 2022
pawamoy added a commit that referenced this issue Apr 3, 2022
@pawamoy pawamoy closed this as completed Apr 3, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature New feature or request griffe: docstrings Related to docstring parsing griffe: numpy Related to Numpydoc-style docstrings
Projects
None yet
Development

No branches or pull requests

1 participant