python-template
python-template copied to clipboard
Type hints support
For library users it is beneficial if typings in the library are available. It will make writing code in an IDE much richer and less error prone. Having typing from the start will help library developers take typings into account.
Adding support could involve:
- [ ] Typings in my_module.py with docstring without types
- [ ] Include
py.typed
file besides my_module.py, see PEP-561 - [ ] Command to check typings are correct, for example
mypy
orpytype
orpyre
orprospector[with_mypy]
orpytest-mypy
- [ ] Show types in api docs, see for example
sphinx-autodoc-typehints
- [ ] Run static type check on CI
- [ ] Optionally, use runtime type checking with typeguard