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 ..
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 ..
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` ..
I have a project with some functions documented in the napoleon numpy style. In the spirit of numpyness, I have a bunch of function arguments that are of the class array-like. Here is an example: def foo(x, y): """ Foo the arguments together to make a bar. Parameters ———- x : array-like This is an ..
Let’s consider the following function: def f(x: int, y: int) -> int: """Get sum of two integers. Parameters ———- x : int first integer y : int second integer Returns ——- int sum of the provided integers """ return x + y While documenting with Sphinx (v3.2.1), the documentation is generated in the following form: ..