Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We can't see any reason to have two type checkers: pyright (part of pylance) and also mypy. So we've defaulted to "pyright" and removed "mypy". This way, if we fix the errors in VSCode, we don't expect to see them when we run `make types` or `make check`. Also, they should run fine in Github Actions too. There's good reasons to use pyright over mypy [1], including: - Speed. pyright is 3x - 5x faster than mypy when checking large code bases. Not that this should be a reason in and of itself. - Consistency. pyright generally tries to adhere to mypy's behaviour unless there is a compelling justification for deviating. - Ease. pylance includes pyright already in the VS Code extension. So not much thinking required to do type checking. - Dogma. Our main reason is that pyright performs type checking for all code regardless of whether it contains type annotations. By default, mypy skills all functions or methods that do not have type annotations. We believe that type hints are "hints", and should not be enforced. We wish to be productive not dogmatic. [1] https://github.com/microsoft/pyright/blob/main/docs/mypy-comparison.md
- Loading branch information