You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Switch to Pyrefly for type checking instead of mypy #1399
Is your feature request related to a use case or problem?
A number of other projects are switching from mypy to Pyrefly for type checking Python code. We should do the same for Quantumlib projects if possible. Pyrefly is much faster than mypy and has better IDE support.
What solution or approach do you envision?
Use Pyrefly's facility for creating a configuration based on an existing mypy configuration
Run Pyrefly to find and fix whatever problems it flags
Add a Pyrefly hook configuration to .pre-commit-config.yaml
Replace the type check in CI with a Pyrefly-based one
@rosspeili - if possible, please use ASCII characters instead of ツンデレ as your author name in git commits, which will make them easier to find in git logs.
Activity
rosspeili commentedon Jul 11, 2026
@mhucka when @pavoljuhas is back, and if you guys agree, I can pick this both for Cirq and OpenFermion.
mhucka commentedon Jul 24, 2026
@rosspeili Pyrefly is a "go". Thanks for volunteering!
rosspeili commentedon Jul 24, 2026
Thanks @mhucka, I will start with OpenFermion, and if you like the approach, feel free to assign the relevant Cirq issue as well. 🙏
pavoljuhas commentedon Jul 24, 2026
@rosspeili - if possible, please use ASCII characters instead of
ツンデレas your author name in git commits, which will make them easier to find in git logs.rosspeili commentedon Jul 25, 2026
Hey @pavoljuhas added the username as prefix. Hope this works better. <3
Switch type checking from mypy to Pyrefly (quantumlib#1399)
rosspeili commentedon Jul 25, 2026
Migration pr is in #1433, and CI looks green. Lmk how this looks @mhucka / @pavoljuhas and if I am missing something. Thanks <3
Switch type checking from mypy to Pyrefly (quantumlib#1399)