Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

First Check

  • I added a very descriptive title here.
  • I used the GitHub search to find a similar question and didn't find it.
  • I searched in the documentation/README.
  • I already searched in Google "How to do X" and didn't find any information.
  • I already read and followed all the tutorial in the docs/README and didn't find an answer.

Commit to Help

  • I commit to help with one of those options 👆

Example Code

Example using pyrefly for fast type checking in a large-scale project
The `pyrefly check` command is much faster than `mypy` in large codebases

# Install pyrefly:

pip install pyrefly && pyrefly init


Run type check with pyrefly in backend folder
```python
pyrefly check app

Description

I have a large-scale project, and over time, the mypy type checking started to take significantly longer as the codebase expanded. To address this issue, I switched to pyrefly, 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 pyrefly as an alternative to mypy for type checking in codebases. It's faster, more efficient, and better suited for projects where mypy may struggle with performance due to their size. I believe this could help improve type-checking workflows, particularly for teams working on large repositories.

Screenshot from 2025-11-11 12-11-43

The image above presents a side-by-side comparison of type-checking performance between mypy and pyrefly on 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

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.