request type hints in new contributions

This commit is contained in:
Damien Elmes 2020-01-13 21:39:57 +10:00
parent 8946ad5483
commit e98327f10d

View file

@ -34,6 +34,8 @@ pragmatism is advised. Anki's codebase is old and of varying quality, and
there are parts that are difficult to type properly. Don't feel the need to there are parts that are difficult to type properly. Don't feel the need to
avoid 'Any' when a proper type is impractical. avoid 'Any' when a proper type is impractical.
Please use type hints in any new code that you are contributing.
When running 'make check', Anki uses mypy to typecheck the code. Mypy only When running 'make check', Anki uses mypy to typecheck the code. Mypy only
checks parts of the code that have type signatures, so adding more type checks parts of the code that have type signatures, so adding more type
signatures to the code improves code coverage. signatures to the code improves code coverage.