Cirq icon indicating copy to clipboard operation
Cirq copied to clipboard

Move from mypy to better type checker

Open daxfohl opened this issue 2 years ago • 2 comments

Description of the issue Newer type checkers, such as pyright, pytype, pyre are faster, able to infer types implicitly, and catch more errors. Pyright in particular is also incremental, so doesn't have to recheck the whole project on each change, and plugs in well to provide autocomplete in vscode and other.

daxfohl avatar Oct 22 '23 21:10 daxfohl

@mpharrigan To investigate the different options in Qualtran and develop an opinion. We can then decide to migrate Cirq if we find an easy to migrate and obviously better option.

tanujkhattar avatar Nov 08 '23 18:11 tanujkhattar

Note that we do not follow pyright's convention for re-exporting public symbols https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#library-interface and indeed that is the source of many of the errors flagged from qualtran

mpharrigan avatar Nov 08 '23 20:11 mpharrigan