Inline documentation of parameters, returns, and raises
Project description
sigdoc
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.
Installation
sigdoc
can be installed from PyPI on python 3.9+ with pip install sigdoc
.
Contributing
Everyone is welcome to contribute - feel free to open an issue or PR!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sigdoc-0.0.2.tar.gz
.
File metadata
- Download URL: sigdoc-0.0.2.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00110aa178e060d2968bb27b4aedcbe0541104e35cbb9e5d21f567b1f0913cd2 |
|
MD5 | 2d8e69fbfc7f0892ead145a36edc83f5 |
|
BLAKE2b-256 | 1bb66a5b490ce4e61959613744cafd5365a36d997a76532e012f20d569b18bb6 |
File details
Details for the file sigdoc-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: sigdoc-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbd3cb15dca0471a6026901d8821d19f1cb4287b4953e2effbb8c2caace46ec3 |
|
MD5 | 99b13c52a2e046510745e47d24fd6de6 |
|
BLAKE2b-256 | 536fd62d2c068818057be6c10a986dd3e0666ce64f49a91f0b834ed26990e325 |