github facebook/pyrefly 0.54.0
Pyrefly v0.54.0

6 hours ago

Status: BETA
Release date: February 23, 2026

Pyrefly 0.54.0 bundles 93 commits from 18 contributors.

✨ New & Improved

Area What’s new
Type checker - Pyrefly now supports using type(X) in base class lists, enabling compatibility with codebases that use metaclass expressions (e.g. those wrapping C extensions)

- Added static evaluation support for more patterns of sys.platform and sys.version_info checks
Language Server - Autoimport and quickfix now surface explicit re-export paths, improving import suggestions for users working with re-exported symbols.

- Diagnostics can now be controlled independently for each workspace folder in multi-root setups, allowing users to customize diagnostics per project

- Enhanced "Generate code" quick fix actions in Pyrefly's LSP, which will now infer parameter types and annotations from call-site arguments

- Code completion and signature help now shows keyword argument and literal completions from all compatible overloads, not just the closest match

🐛 bug fixes

We closed 7 bug issues this release 👏

  • #2273 - Adjusted overload-to-Callable subtyping so single-parameter overloads can satisfy a union-parameter Callable, fixing assignment errors
  • #2398 - When matching a value against a union containing both bare TypeVars and wrapped TypeVars, Pyrefly now tries wrapped vars first, producing better TypeVar solutions and satisfying bounds
  • And more! #2398, #949, #2421, #2457, #1122, #2434, #787

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.54.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

@stroxler, @jvansch1, @rchen152, @samwgoldman, @arthaud, @asukaminato0721, @grievejia, @kinto0, @migeed-z, @avikchaudhuri, @rubmary, @alanhdu, @fangyi-zhou, @javabster, @dtolnay, Carlos Fernandez


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.

Don't miss a new pyrefly release

NewReleases is sending notifications on new releases.