In pytorch/helion#1143, I successfully got pyrefly running as a pre-commit hook using pyrefly-typecheck-system. When I attempted to follow a reviewer suggestion to switch to pyrefly-typecheck-specific-version, pyrefly then produced 300+ import errors. Here's the working pre-commit set-up:
- repo: https://github.com/facebook/pyrefly-pre-commit
rev: 0.0.1
hooks:
- id: pyrefly-typecheck-system
name: Pyrefly (type checking)
pass_filenames: false
and here's the one that produces boatloads of import errors:
- repo: https://github.com/facebook/pyrefly-pre-commit
rev: 0.0.1
hooks:
- id: pyrefly-typecheck-specific-version
name: Pyrefly (type checking)
pass_filenames: false
additional_dependencies: ["pyrefly==0.42.0"]