liberapay.com
liberapay.com copied to clipboard
Type checking of Python code
Looks like we didn't have an issue for this yet, so here's one.
Good type checking can eliminate entire classes of bugs, but neither the Python language nor Liberapay's code were designed to be type checked, so it's not easy.
- [ ] Add a mypy check to Liberapay's tests.
- [ ] Add type annotations to the code so that mypy will actually do something. This should be done gradually, not all at once. MonkeyType might help get this done faster.
Relevant Aspen issues: https://github.com/AspenWeb/aspen.py/issues/27 and https://github.com/AspenWeb/state_chain.py/issues/27.