Pyrefly v0.56.0
Status : Beta
Release date: March 09, 2026
Pyrefly v0.56.0 bundles 248 commits from 22 contributors.
✨ New & Improved
| Area | What’s new |
|---|---|
| Type Checking | - Limit the width of inferred return types to prevent large unions. - Comparison checks involving Any now yields Any (not bool), matching gradual typing expectations and avoiding overly-confident boolean results
|
| Language Server | - IDE diagnosticMode now includes an experimental workspace mode. When set to workspace, Pyrefly publishes diagnostics for all files in a project once any file from that project is opened. - Support added for the TSP typeServer/getPythonSearchPaths message. - Relative imports now work for go-to-definition and completions (including site-packages), reducing “can’t resolve import” / missing navigation cases |
| Type Errors | - Default severities have been tuned to reduce noise: implicit-import errors downgraded to warning; unreachable and redundant-condition errors default to warning (are configurable back to errors if desired) - New error code `non-convergent-recursion`, read the docs |
| Performance Improvements | - Added dedicated thread pool for LSP operations to prevent blocking main thread during rechecks |
🐛 bug fixes
We closed 33 bug issues this release 👏
- #2612: Fixed an issue where lambda expressions with default parameters were not recognized in missing-argument checks.
- #2605: Fixed a false positive error in an untyped classmethod with *args.
- #2385: Prevented builtins wildcard imports from shadowing existing definitions during static scope setup.
- #2618: Fixed a
StrEnumclassmethod being treated as enum members. - #2590: Blocked subscripting generic functions/callables to prevent unsupported operations.
- #2514: Fixed a
not-callablefalse positive with enum methods. - #2609: Fixed a
bad-param-name-overridefalse positive forSequence.__contains__. - #2668: Fixed dict.setdefault on an unpinned dict always making the dict nullable.
- #2527: Fixed a
no-matching-overloadissue related to nested type aliases. - #2543: Fixed a problem when using
classdefinition on top of aClassVar. - 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.56.0How 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 Pyrefly documentation
🖊️ Contributors this release
@stroxler, @rchen152, @kinto0, @grievejia, @yangdanny97, @samwgoldman, @jvansch1, @asukaminato0721, @rubmary, @migeed-z, @connernilsen, @avikchaudhuri, @fangyi-zhou, @arthaud, @rchiodo, @Karman-singh15, @MarcoGorelli, @lolpack, @pswitchy, @michel-slm, Jaimin Brahmbhatt, @maggiemoss
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.