qir-alliance / pyqir

PyQIR is a set of APIs for generating, parsing, and evaluating Quantum Intermediate Representation (QIR).
https://qir-alliance.github.io/pyqir
MIT License
54 stars 24 forks source link

Improve Mypy checking in CI #152

Closed bamarsha closed 2 years ago

bamarsha commented 2 years ago

The CI was not running Mypy on most of our Python files, and it was not using strict mode. This PR fixes both of those issues and also makes it easier to use Mypy locally by adding a configuration file.

I actually found a bug in pyqir-parser using mypy: QirArrayType defined a property element_types(self) -> List[QirType] but it should have been element_type(self) -> QirType.