Skip to content

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

@shunichironomura

Description

@shunichironomura

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions