Category : sphinx-napoleon

For module level functions, is there a way to auto generate content that frequently appears, namely ‘Returns: None’ , so that it wouldn’t be repeatedly written in many docstrings? I’ve seen some formatting using napoleon_custom_sections, but that doesn’t seem to be my direct use case. Example would be if the following generated documentation that contained ..

Read more

I’ve been reading through this guide to writing Google-style and Numpy-style docstrings with type hints for numpy ndarrays. In the Numpy-style docstring example, type hints are abbreviated as "np.ndarray". However, in the corresponding Google-style example, the type is written as "numpy.ndarray". Is it possible to use "np.ndarray" as a type in a Google-style docstring, or ..

Read more

Intersphinx is a very nice tool in order to put cross-references into package documentations. However, one issue is that the way these cross-references are written results in reduced legibility of the docstrings when read with help(function) in the terminal or function? in a jupyter-notebook. Consider the following example: def time2int(ds: Series) -> Series: """Convert :class:`~pandas.Series` ..

Read more