Skip to main content

Inline documentation of parameters, returns, and raises

Project description


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!

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sigdoc-0.0.1.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

sigdoc-0.0.1-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page