You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Google-style docstrings with sphinx.ext.napoleon and sphinx_autodoc_typehints, I see both a Yields: row and a Return type: row in the Parameters table for generator methods.
fromtypingimportOptional, GeneratorclassFoo:
deffunc(
self,
arg1: Optional[int] =None,
arg2: Optional[int] =None,
) ->Generator[tuple, None, None]:
"""Summary of the func A sligntly longer description Args: arg1: this is argument 1 arg2: this is argument 2 Yields: tuple: strings of things Raises: IndexError: If bad stuff happens """pass
Output from sphinx-build -a -b html docs docs/build:
Removing sphinx_autodoc_typehints results in the following output, but obviously loses the type hints in the parameters table:
The text was updated successfully, but these errors were encountered:
Using Google-style docstrings with
sphinx.ext.napoleon
andsphinx_autodoc_typehints
, I see both a Yields: row and a Return type: row in the Parameters table for generator methods.Reproducer:
docs/index.rst:
docs/conf.py:
foo/__init.py:
Output from
sphinx-build -a -b html docs docs/build
:Removing
sphinx_autodoc_typehints
results in the following output, but obviously loses the type hints in the parameters table:The text was updated successfully, but these errors were encountered: