Sourced from pyrefly's releases.
v0.56.0
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 Anynow yieldsAny(notbool), matching gradual typing expectations and avoiding overly-confident boolean resultsLanguage Server - IDE diagnosticModenow includes an experimental workspace mode. When set toworkspace, Pyrefly publishes diagnostics for all files in a project once any file from that project is opened. - Support added for the TSPtypeServer/getPythonSearchPathsmessage. - Relative imports now work for go-to-definition and completions (including site-packages), reducing “can’t resolve import” / missing navigation casesType Errors - Default severities have been tuned to reduce noise: implicit-importerrors downgraded to warning;unreachableandredundant-conditionerrors default to warning (are configurable back to errors if desired) - New error code `non-convergent-recursion`, read the docsPerformance 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:
... (truncated)
7bf1ed3
Support extracting narrow checks for all (literal) facet chains029b612
fix Support Enum with custom __new__ #2747
(#2763)f6a2117
Fix double-counting cls with class_getitem and @classmethod (#2772)7ec2f40
Fix variance inference fixpoint to correctly propagate inherited
contravariance65741ef
Add failing variance inference testcaseff72f08
fix PANIC Sorry, Pyrefly crashed, this is always a bug in Pyrefly itself
#272...86d8a0a
Extend facet narrowing cross-check to attr chainsada95d5
Add file stats to SubTaskTelemetryad6cd62
fix Unary operator for int not applicable for Literal of bool #2750
(#2762)65bb170
Add telemetry for newly added code actions