Switch from mypy to pyright for static type checking #2451
Labels
CI
Related to continuous integration
proposal
Proposals that need to be decided upon before implementation
refactoring ♻️
Improving an implementation without adding new functionality
static type checking
Description of improvement
We recently added mypy as a static type checker in our suite of continuous integration tests. This issue proposes to switch to pyright for static type checking instead.
Motivation
Before adding mypy to the CI suite, I didn't really look into alternatives to mypy. From the information discussions I've seen online, generally there seems to be a preference for pyright over mypy with respect to quality of error messages, performance, quality of the code base, and responsiveness of the maintainers to bug reports. The quality of error messages is particularly important because we have a lot of new contributors.
Implementation strategy
The documentation for pyright discusses getting started.
# type: ignore[mypy-error-code]
commentsAdditional context
Original issue for mypy: #268.
The text was updated successfully, but these errors were encountered: