Status : BETA
Release date: 09 February 2026
Pyrefly v0.52.0 bundles 250 commits from 23 contributors.
📈 Performance Improvements
As we’ve been watching Winter Olympic athletes racing for gold, we’ve been inspired by their dedication to keep pushing our own bobsled towards our goals of making Pyrefly as performant as possible. Just as milliseconds count in speed skating, they also matter when it comes to type checking diagnostics! With this release, Pyrefly users can benefit from a range of speed and memory improvements, which we’ve summarised below. But this is just the first lap, the race isn’t over! We’re committed to ongoing performance improvements and adding robust testing to prevent regressions, so stay tuned for more performance updates coming soon.
18x Faster Updated Diagnostics After Saving a File
We’ve significantly improved the speed at which type errors and diagnostics appear in your editor after saving a file. Thanks to fine-grained dependency tracking and streaming diagnostics, Pyrefly now updates error messages almost instantly,even in large codebases. In edge cases that previously took several seconds, updates now typically complete in under 200ms. For a deep dive into how we achieved this, check out our latest blog post.
2–3x Faster Initial Indexing Time
The initial indexing process (i.e. when Pyrefly scans your project and builds its internal type map) has been optimized for speed. This means you can start working with type-aware features much sooner, even in massive repositories.
40–60% Less Memory Usage
We’ve made significant improvements to Pyrefly’s memory efficiency. The language server now uses 40–60% less RAM during both initial indexing and incremental type checking. This allows Pyrefly to scale to larger projects and run more smoothly on resource-constrained machines.
Edge case exponential memory blow up contained
A critical bug that caused exponential memory usage when handling unions of dictionary types has been resolved. This fix ensures that Pyrefly remains stable and performant, even when working with complex type structures.
✨ New & Improved
| Area | What’s new |
|---|---|
| Type System | Added support for template strings (PEP 750) Type narrowing enhancements: dict.get narrowing and safer negative narrowing
|
| Language Server | Users can now automatically transform from ... import * statements into explicit imports for names used in the file Improved auto-complete for match Literal patterns Further support for type hierarchy now available in IDE Go-to definition on __all__ entries now brings you to the definition See all of the new features in more detail in our updated IDE supported features page
|
🐛 bug fixes
We closed 13 bug issues this week 👏
- #713 - Fixed unsound narrowing for
isinstanceandtype[T] - #289 - Expanded key-existence narrowing to dict-like types so "key" in mapping now makes
mapping.get("key") return the value type (notNone). - #2248 - Fixed augmented assignment (
+=) when__iadd__is missing to correctly fall back to__add__and ignore__getattr__, aligning with Python runtime semantics. - And more!
Thank-you to all our contributors who found these bugs and reported them! Did you know this is one of the most helpful contributions you can make to an open-source project? If you find any bugs in Pyrefly we want to know about them! Please open a bug report issue here
📦 Upgrade
pip install --upgrade pyrefly==0.52.0
How to safely upgrade your codebase
Upgrading the version of Pyrefly you're using or a third-party library you depend on can reveal new type errors in your code. Fixing them all at once is often unrealistic. We've written scripts to help you temporarily silence them. After upgrading, follow these steps:
pyrefly check --suppress-errors- run your code formatter of choice
pyrefly check --remove-unused-ignores- Repeat until you achieve a clean formatting run and a clean type check.
This will add # pyrefly: ignore comments to your code, enabling you to silence errors and return to fix them later. This can make the process of upgrading a large codebase much more manageable.
Read more about error suppressions in the Pyefly documentation
🖊️ Contributors this release
@ndmitchell, @rchen152, @stroxler, @kinto0, @asukaminato0721, @yangdanny97, @grievejia, @migeed-z, @jvansch1, @samwgoldman, @avikchaudhuri, @maggiemoss, @arthaud, @AryanBagade, @connernilsen, @diliop, @fangyi-zhou, @javabster, @robertoaloi, @tianhan0, @dtolnay, Carlos Fernandez, Miles Conn
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed. Highlights from patch release changes that were shipped after the previous minor release are incorporated here as well.