Provides the infrastructure for mypy usage via pytest-mypy. Uses a loose configuration that effectively makes typehinting optional. Adds hints to an oauth handler as an example.
I'm not 100% on this. Given the lack of typing in the Invenio and wider Flask ecosystems (Flask itself is typed) there are some questions about how much value we would derive.
Some pros:
more informative function signatures - the oauth handler example is fairly pertinent as much of the code in the project will be handler functions plugged into the frameworks, the hints give at least some clue what data structures are being passed in although these are not being checked.
Flask itself is typed so may be possible to derive more value on view functions (could consider tightening requirements for relevant modules).
Some cons:
lots of modules will need to be added to the ignores in pyproject.toml.
hints could end up being actively misleading if not checked.
Provides the infrastructure for mypy usage via
pytest-mypy
. Uses a loose configuration that effectively makes typehinting optional. Adds hints to an oauth handler as an example.I'm not 100% on this. Given the lack of typing in the Invenio and wider Flask ecosystems (Flask itself is typed) there are some questions about how much value we would derive.
Some pros:
Some cons:
pyproject.toml
.