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

bug: "Returns:" section is not shown #9

Closed
shunichironomura opened this issue Feb 7, 2024 · 2 comments
Closed

bug: "Returns:" section is not shown #9

shunichironomura opened this issue Feb 7, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@shunichironomura
Copy link

Description of the bug

The "Returns:" section is not displayed for a function with the return value annotated.

To Reproduce

Run the following commands:

git clone https://github.com/mkdocstrings/griffe-typingdoc.git
cd griffe-typingdoc/
make setup

Append the following lines to the docs/examples/simple.py:

def return_value(
    param: Annotated[int, Doc("Parameter")],
) -> Annotated[int, Doc("Returned value.")]:
    """Showing off return values."""

Then serve the documentation:

make docs

Full traceback

Not applicable. See the additional context section for the screenshot of the generated documentation.

Expected behavior

In the documentation section for return_value function, the "Returns:" section is displayed with the description of the return value "Returned value."

Environment information

python -m griffe_typingdoc.debug  # | xclip -selection clipboard
  • System: Linux-5.15.133.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
  • Python: cpython 3.12.1
  • Environment variables:
  • Installed packages:
    • griffe-typingdoc v0.2.4+editable

Additional context

Screenshot of the generated documentation:

image

@pawamoy
Copy link
Member

pawamoy commented Feb 7, 2024

Thanks for the report, I was able to confirm. Fixing ASAP!

@pawamoy pawamoy added the bug Something isn't working label Feb 7, 2024
pawamoy added a commit that referenced this issue Feb 8, 2024
@pawamoy
Copy link
Member

pawamoy commented Feb 8, 2024

Fixed in v0.2.5 🙂

@pawamoy pawamoy closed this as completed Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants