We currently don't run Pyright over our test/*.py files to type-check those, meaning we're not getting "coverage" of most of our type annotations, which results in issues like #963.
We should enable Pyright on these files. I suspect this will be a fairly big diff -- if so, we may want to opt the files in one by one in separate PRs to streamline review.