release_notes/release-notes-v1.1.0.md
Release date: June 17, 2026
Pyrefly v1.1.0 bundles 250 commits from 25 contributors.
TypedDict types after isinstance(x, dict) checks, treating them as runtime dict instances while preserving field information in the positive branch.TypeVars has been significantly improved. isinstance checks now correctly narrow Self and bounded type variables via their disjoint-base representatives, and negative narrowing on bounded TypeVars no longer produces false positives.TypeVars are now preserved through method calls and binary operations, so T & int where T: (int, str) correctly returns T & int instead of losing the TypeVar.@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.@override decorator, and a new quick fix can automatically add the decorator for you.self and cls) when determining class variance, fixing false invariance reports for container-like classes.ignore crate with parallel traversal, making initial indexing 2-3x faster and dramatically reducing wall-clock time for large projects.homeassistant-core and transformers.bytes to keep type representations bounded.c[0]), showing the __getitem__ signature instead of garbled output.d[) and half-typed subscripts (d["), suggesting known keys from TypedDicts and narrowed facets.from X import Y statements now falls back to the module file when the imported name can't be resolved (e.g., for non-Python modules like .thrift files).\n, preventing mixed line endings.typing classes and TypeVars instead of opaque builtins, so hovering over special forms like Literal, Final, and ParamSpec now shows the correct name instead of Unknown.Unknown.unknown sentinel in TSP responses instead of uppercase Unknown.typeServer/getExpectedType request actually useful.None hint in error messages now only suggests narrowing when it makes sense (e.g., in conditionals) and only suggests adding | None when you control the type.tensor-shapes config option has been removed. Tensor shape support is now automatically derived from whether shape_extensions is resolvable for the module being checked.$MYPY_CONFIG_FILE_DIR when migrating mypy configs, stripping it to produce portable relative paths./ separators (not OS-specific separators) for cross-platform consistency.We closed 89 bug issues this release 👏
__get__ method is itself a descriptor. Pyrefly now detects this self-referential case and terminates instead of recursing indefinitely.NamedTuple in constructor defaults. Pyrefly now calls ensure_expr on the default value to avoid panicking during binding.sympy/core/expr.py in the LSP. The lambda parameter cache is now keyed by (ModuleName, ModulePath, LambdaParamId) to distinguish in-memory and on-disk module versions.incompatible-overload-residual error on functools.reduce(operator.*, ...). The overload resolves correctly; the spurious diagnostic has been removed.unsupported-operation errors when matching on overloads. Protocol conformance now filters overloads by self: type, so a timedelta receiver correctly selects the matching overload instead of erroneously picking the first one.@dataclass decorators on NamedTuple classes, matching CPython's runtime behavior which raises a TypeError.try: import a except ImportError: a = None are no longer reported as untyped by pyrefly coverage.from __future__ import annotations is active, matching CPython's behavior.pyrefly coverage report no longer includes definitions from if __name__ == "__main__" guards, as those aren't importable at runtime.Foo[Bar] under from __future__ import annotations now binds Bar as static type information when Foo is a known class, avoiding false "uninitialized" diagnostics.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.
pip install --upgrade pyrefly==1.1.0
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-errorspyrefly check --remove-unused-ignoresThis 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.
@rchen152, @grievejia, @kinto0, @yangdanny97, @jorenham, @samwgoldman, @connernilsen, @stroxler, @shobhitmehro, @asukaminato0721, @javabster, @NathanTempest, David Tolnay, @mikeleppane, @maggiemoss, @arthaud, Eric Hou, Gregory Carlin, @thatfunkymunki, @hrolfurgylfa, @nitishagar, @tobyh-canva, @vivekjm, @QEDady, @rchiodo
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.