cirq.Result
type validation for measurement argument
#3712
Labels
area/measurements
area/mypy
area/result
kind/health
For CI/testing/release process/refactoring/technical debt items
Milestone
mypy doesn't recognize numpy types.
All of this is accepted by default
I tried with
pip install data-science-types
- that project creates type stubs for numpy, matplotlib, pandas.With this, mypy catches the first three:
However, it generates a lot of other noise:
That includes errors due to missing type stubs in the package e.g.:
So I think we'll just have to live with this not being in mypy. Maybe we could / should do runtime type validation in the constructor though for the measurement argument!
Originally posted by @balopat in #3710 (comment)
The text was updated successfully, but these errors were encountered: