* Add mypy to ci and precommit * Run precommit mypy in venv * Fix issues raised in latest version of mypy