github facebook/pyrefly 0.55.0
Pyrefly v0.55.0

9 hours ago

Status : Released
Release date: March 03, 2026

Pyrefly v0.55.0 bundles 166 commits from 27 contributors.


✨ New & Improved

Area What’s new
Type Checking - Pyrefly now supports Annotated types and treats them as their base type for most purposes to better conform with the typing specification

- Pyrefly now infers `Self` when constructing a class using `cls()`, also improving typing specification improvements

- Pyrefly can now evaluate `os.name`, similar to existing `sys.platform` support, reducing false positives.

- The `(*args: Any, **kwargs: Any)` syntax is now correctly treated as equivalent to the gradual signature `...`, aligning with Python's typing specification.

- Improved handling when star-unpacking arguments to reduce false positives and improving typing specification conformance
Language Server - Hover results for generic overloads now include type parameters.

- New “Type source” section on hover that reports narrowing and first‑use inference origins
Documentation / Tooling - pyrefly report now measures type completeness and annotation completeness for functions and their parameters.
Performance Improvements - improved performance of concurrent rechecks, reducing latency for LSP requests like hover

🐛 bug fixes

We closed 35 bug issues this release 👏

  • #2406: Fixed an issue where unbound-name errors were incorrectly reported when using NoReturn.
  • #2512: Subclasses of Any are no longer flagged as not callable.
  • #2363: Passing unpacked tuples of types as type arguments to type parameters with a variable number of type arguments now works correctly.
  • #2560: Dynamically computed __all__ is now handled correctly, avoiding false positives.
  • #1197: False positives when calling imported functions that shadow globals or built-ins are now fixed.
  • #2518: The override check for empty tuples has been made more permissive, aligning with other type checkers.
  • #2498: Pyrefly now correctly handles implicit type aliases with the | operator.
  • And more! #2513, #1837, #2532, #2479, #2166, #2546, #2564, #2530, #2499, #417, #714, #832, #1137, #1369, #1708, #1774, #2055, #769, #2588, #2426, #2521, #757, #2537, #2595, #2511, #2528, #958

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.55.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 Pyrefly documentation


🖊️ Contributors this release

@yangdanny97, @migeed-z, @rchen152, @grievejia, @kinto0, @stroxler, @samwgoldman, @jvansch1, @asukaminato0721, @fangyi-zhou, @arthaud, David Tolnay, @connernilsen, @ndmitchell, @javabster, @rubmary, @Adist319, @rchiodo, @DanielNoord, Ben Carr, @avikchaudhuri, @terror, @disrupted, @MarcoGorelli, @hanzel-sc


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.