github facebook/pyrefly 0.50.0
Pyrefly v0.50.0

8 hours ago

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 👏

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:

  1. pyrefly check --suppress-errors
  2. run your code formatter of choice
  3. pyrefly check --remove-unused-ignores
  4. 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

Don't miss a new pyrefly release

NewReleases is sending notifications on new releases.