Added mypy to GitHub workflows as a static type checker to raise code quality and safety bars. Fixed all mypy errors throughout codebase (type safety and actual bugs caught by mypy). Formatted using pyfmt. Added a PR template to guide developers towards writing and checking quality code locally prior to submitting PRs in a reproducible manner.
Summary
Added
mypy
to GitHub workflows as a static type checker to raise code quality and safety bars. Fixed all mypy errors throughout codebase (type safety and actual bugs caught bymypy
). Formatted usingpyfmt
. Added a PR template to guide developers towards writing and checking quality code locally prior to submitting PRs in a reproducible manner.Test Plan
Ran suite of checks in list below.
Before Submitting
pip3 install mypy==1.2.0
mypy --ignore-missing-imports torchsig
pip3 install flake8
flake8 --select=E9,F63,F7,F82 torchsig
pip3 install git+https://github.com/GooeeIOT/pyfmt.git
pyfmt torchsig
pytest --ignore-glob=*_figures.py --ignore-glob=*_benchmark.py