Skip to content

Switch to Pyrefly for type checking instead of mypy #1399

Description

@mhucka

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?

  1. Use Pyrefly's facility for creating a configuration based on an existing mypy configuration
  2. Run Pyrefly to find and fix whatever problems it flags
  3. Add a Pyrefly hook configuration to .pre-commit-config.yaml
  4. Replace the type check in CI with a Pyrefly-based one

How urgent is this for you?

P2 – needed within two quarters

Metadata

Metadata

Assignees

Labels

area/healthInvolves code and/or project healtharea/pythonInvolves Python code

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions