Status : BETA
Release date: 26 January 2026
Pyrefly v0.50.0 bundles 183 commits from 27 contributors.
✨ New & Improved
| Area | What’s new |
|---|---|
| Language Server | - Hovering or requesting signature help for constructor calls now shows the instance type instead of -> None - Structured comment headers (e.g., # Title ----) now create hierarchical folding regions and outline symbols in editors. This can be enabled with the commentFoldingRanges setting that is now available in VSCode’s settings UI - Go-to-definition now works for intermediate submodule components (e.g., clicking on b or c in a.b.c.D), improving navigation in complex module hierarchies - Inlay hints now available for variables created from tuple unpacking (e.g. x, y = (a, b)) - Type variable bounds, constraints, and defaults are now shown when formatting generic types. - Previously, reveal_type showed identical signatures for functions with different type variable restrictions
|
| Type Checking | Type narrowing now works for TypedDict when using in/not in checks, including inherited keys and empty TypedDicts
|
| File Structure/Detection | Better support for detecting and renaming editable installed packages |
| Error Reporting | The suppress command now accepts JSON values, making error suppression more flexible and scriptable.
|
🐛 bug fixes
We closed 30 bug issues this week 👏
- #2175 - Prevents stack overflow during type checking of recursive type patterns by reducing recursion depth
- #2173 - Starred expressions inside list/tuple/set literals in membership checks no longer cause type errors.
- #2162 - Subclasses assigning a function to an abstract method attribute no longer trigger a bad-instantiation error.
- #2128 - Imports referenced only in
__all__are no longer incorrectly flagged as unused - And more - #2108, #2044, #2027, #2004, #1999, #1935, #1916, #1911, #1849, #1704, #1691, #1591, #1445, #115, #898, #782, #678, #552, #2141, #2171, #2170, #2167, #2163, #2200, #2197, #2187
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.50.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
@rchen152, @kinto0, @grievejia, @stroxler, @migeed-z, @yangdanny97, @connernilsen, @asukaminato0721, @maggiemoss, @rubmary, @samwgoldman, @Adist319, @arthaud, @AryanBagade, @jackulau, @self-sasi, @sgavriil01, @kv9898, @maifeeulasad, @maldoinc, @pawelstrzmeta, @robertoaloi, @jvansch1, @tianhan0, @dtolnay, Vladimir Matveev