Suggesting pyrefly as a type-checking alternative to mypy #1979
Unanswered
camilotabaresj
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
I have a large-scale project, and over time, the
mypytype checking started to take significantly longer as the codebase expanded. To address this issue, I switched topyrefly, a type checker written in Rust by Meta's team, which offers substantial performance improvements and full integration with typing. It's notably faster, especially when working with large projects, and provides a more responsive experience overall.I would like to propose
pyreflyas an alternative tomypyfor type checking in codebases. It's faster, more efficient, and better suited for projects wheremypymay struggle with performance due to their size. I believe this could help improve type-checking workflows, particularly for teams working on large repositories.The image above presents a side-by-side comparison of type-checking performance between
mypyandpyreflyon the full PyTorch codebase.I have full disposition to implement this, obviously if the community agrees
Operating System
Linux
Operating System Details
Ubuntu 24
Python Version
Python 3.12.3
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions