Sourced from pyrefly's releases.
Pyrefly v1.1.1
Release date: June 18, 2026
Pyrefly v1.1.1 is a patch release with a single bug fix.
🐛 Bug fixes
- #3867: Fixed a regression introduced in 1.1.0 where
isinstance()narrowing of a union variable silently stopped working when an earlier sibling branch in the sameif/elif/elsechain narrowed a different variable withisinstance()and returned. The later narrowing left the union untouched, producing falsemissing-attributeerrors on code that checked correctly in 1.0.0.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==1.1.1How 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: ignorecomments 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.
Pyrefly v1.1.0
Release date: June 17, 2026
Pyrefly v1.1.0 bundles 250 commits from 25 contributors.
✨ New & Improved
Type Checking
- Pyrefly now correctly narrows
TypedDicttypes afterisinstance(x, dict)checks, treating them as runtimedictinstances while preserving field information in the positive branch.- Type narrowing for bounded and constrained
TypeVars has been significantly improved.isinstancechecks now correctly narrowSelfand bounded type variables via their disjoint-base representatives, and negative narrowing on bounded TypeVars no longer produces false positives.- Constrained
TypeVars are now preserved through method calls and binary operations, soT & intwhereT: (int, str)correctly returnsT & intinstead of losing the TypeVar.- Classes decorated with
@dataclass(slots=True)are now recognized as PEP 800 disjoint bases when they synthesize non-empty__slots__, enabling proper multiple-inheritance conflict detection and type narrowing.- Pyrefly now detects when methods override parent class methods without using the
@overridedecorator, and a new quick fix can automatically add the decorator for you.
... (truncated)
b87de05
cut 1.1.1a297847
release notes for v1.1.14be8673
Fix isinstance narrowing silently breaking after a sibling branch
narrows ano...67a11d4
cut 1.1.06eb38a7
Handle empty name invalid syntax54f61bc
Resolve type-alias refs against their own module, not typingfc495dc
add test for resolving type alias references33de466
Resolve real source locations by reusing the query transaction (#3829)3fd550d
Teach the type converter to resolve export locations86f0da7
Lazy materialize implicit builtins