Inline documentation of parameters, returns, and raises

pip install sigdoc==0.0.2



pypi downloads versions license CI codecov

Inline documentation of parameters, returns, and raises.

Documenting function parameters and returns in docstrings is tedious - type hints need to be duplicated, the order is hard to maintain, and added/removed params and returns easily get out of sync.

sigdoc provides helpers to automatically extend docstrings at runtime by annotating a function's parameter and return type hints "inline". This inline notation greatly increases the locality of the code and documentation, reducing the maintenance burden.

As this relies on runtime generation, the full docstring will only be visible to runtime inspection. Luckily, this includes help(...) in python, ipython, and jupyter (including Shift+Tab). Static analysis tools (such as many IDEs) won't know how to decipher the full docstring, but often show the function's signature, which will still have all of the useful information included.


sigdoc can be installed from PyPI on python 3.9+ with pip install sigdoc.


Everyone is welcome to contribute - feel free to open an issue or PR!