Add mypy to style target (for non-driver code)

My patience with mypy is very thin, but it does catch some stuff that
other checkers don't, even outside the realm of typing. This should
at least make sure any type annotations we _do_ get are correct.

There are a lot of errors in the drivers, so limit this to just the
core code for now.
This commit is contained in:
Dan Smith 2024-02-13 16:33:20 -08:00 committed by Dan Smith
parent 4b482efb00
commit 9260e3a8e1
2 changed files with 7 additions and 0 deletions

5
.mypy.ini Normal file
View File

@ -0,0 +1,5 @@
[mypy]
disable_error_code=import-untyped,var-annotated,import-not-found
[mypy-chirp.drivers.*]
disable_error_code=assignment

View File

@ -23,8 +23,10 @@ sitepackages = False
deps =
pep8
flake8
mypy
commands =
python ./tools/cpep8.py {posargs}
mypy --config-file .mypy.ini chirp --exclude='/drivers/*' --exclude='chirp/share/*'
[textenv:py3clean]
commands =