There are a few type errors raised by pyright that block its use in CI testing. Fix and re-enable pyright in `.pre-commit-config.yml`