MuMoT
MuMoT copied to clipboard
Add type hints
As of Python 3.5 one can annotate function definitions with the types of parameters and return values: https://docs.python.org/3/library/typing.html
Benefits of including type hints in Python code:
- A better understanding of what a function does can be gained from reading just the function declaration.
- Static type checking tooling e.g.
mypycan warn of type incompatibilities, saving you from discovering type issues at runtime. Many IDEs now include mypy support (e.g. VS Code) - Tooling exists to insert typing info into API docs, negating the need to include type info as essentially free text in docstrings.
I think MuMoT would benefit from adopting type hints