NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #1250 most downloaded on PyPI
A fast type checker and language server for Python with powerful IDE features
Latest stable
1.4.1
Last release 11 days ago
05 Nov 2026
Ships on a steady schedule
a new release about every 2 weeks
Most releases are documented
notes for 40 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
154 releases · first in 2025
Drag across the ruler to compare, or tap a release to open it.
Pyrefly v1.1.0 bundles 788 commits from 72 contributors.
Release date: June 17, 2026
Pyrefly v1.1.0 bundles 788 commits from 72 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, @mdbernard
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
> Dev releases (versions like X.Y.Z-dev.N) are non-stable snapshots cut periodically from trunk. They give early adopters a chance to try in-progress
Release date: June 10, 2026
About dev releases Dev releases (versions like
X.Y.Z-dev.N) are non-stable snapshots cut periodically from trunk. They give early adopters a chance to try in-progress features and surface issues before the next stable release, but they don't carry the same stability or compatibility guarantees as a stable release — don't pin production projects to a dev version.
Pyrefly v1.1.0-dev.2 bundles 250 commits from 37 contributors.
x: T = 0 now correctly validate their defaults against the type variable's constraints or bounds, and the default value is properly used when solving type variables in function calls.isinstance checks and binary operations now preserve the type variable while correctly narrowing to specific constraints, fixing several false positives and negatives.x.lower() where x: T with T constrained to bytes | str), the return type now correctly preserves the type variable when the method returns self's type.shape_extensions.shaped_array, including numpy.ndarray and jax.Array, not just PyTorch tensors.Literal type, the editor now suggests the valid literal values.typeServer/getExpectedType returns the contextually expected type at a cursor position (e.g., the parameter type for a call argument, the declared type for an assignment), enabling richer IDE features.from source import foo to from target import foo across the codebase..thrift files and other non-Python modules now navigates to the module file when the specific symbol can't be resolved.pyrefly coverage check command provides a user-friendly way to verify type coverage meets a threshold, with configurable output formats and fail-under percentage.__all__ in stubs more accurately, only treating imports as public re-exports when they appear in __all__ or use the as alias syntax.--output-format junit-xml option emits JUnit XML test reports, making it easier to integrate Pyrefly into CI dashboards.None-related type mismatches. When passing T | None where T is expected, the error now includes an actionable hint suggesting narrowing with is not None or widening the expected type.We closed 24 bug issues this release 👏
unknown-name errors after short-circuit boolean operations. Code like if SOMETHING_DEFINITELY_FALSE and A: no longer reports A as unknown, since it's unreachable.unknown-name false positive when a name is introduced via a walrus operator in a decorator. Names defined with := in decorator expressions are now visible after the decorated definition.x: T = 0 are now validated correctly and used when solving type variables in calls.__getitem__ resolution on type variables with constraints. Subscripting a type variable bounded by TypedDict or other subscriptable types now works correctly instead of falling back to object.__getitem__.TypedDict unions when using membership tests. Expressions like event["ph"] in ("X", "C") now correctly narrow the union to matching members.key in dict checks. When a TypedDict key is tested with in, subsequent subscript access no longer reports the key as possibly absent.from bar import func that work at runtime now resolve correctly even when a pyrefly.toml is present, via the new enable-fallback-search-path option.from __future__ import annotations is active.invalid-variance error location for overloaded methods. The error now appears on the offending overload signature rather than always pointing to the first overload.__get__ is itself a descriptor. Self-referential descriptor patterns now terminate gracefully instead of crashing.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-dev.2
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, @stroxler, @kinto0, @yangdanny97, @connernilsen, @grievejia, @NathanTempest, @jorenham, @samwgoldman, @asukaminato0721, David Tolnay, @lolpack, @mikeleppane, @maggiemoss, @MarcoGorelli, @JakobDegen, @arthaud, Anqi Wu, @terror, @bigfootjon, @aahanaggarwal, @rchiodo, @magic-akari, @SamB, @nitishagar, @ndmitchell, @NarxPal, Gregory Carlin, @javabster, @thatfunkymunki, @shobhitmehro, @hrolfurgylfa
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
…catches .item() GPU sync, redundant .to(device), deprecated .cuda(), and print(tensor).
Release date: May 27, 2026
> About dev releases > Dev releases (versions like X.Y.Z-dev.N) are non-stable snapshots cut periodically from trunk. They give early adopters a chance to try in-progress features and surface issues before the next stable release, but they don't carry the same stability or compatibility guarantees as a stable release — don't pin production projects to a dev version.
Pyrefly v1.1.0-dev.1 bundles 250 commits from 40 contributors.
---
## ✨ New & Improved
### Type Checking
New incompatible-comparison diagnostic catches comparisons like int == str where operand types can't overlap.
Classes whose metaclass extends ABCMeta are now correctly treated as abstract.
Frozen dataclasses reject manual __setattr__/__delattr__ overrides.
Annotation-only descriptor fields are recognized as descriptors — fixes false positives for SQLAlchemy Mapped and similar asymmetric descriptor types.
### Language Server
Code actions can convert dict literals to TypedDict, dataclass, or Pydantic model — with automatic imports.
Sphinx cross-references (`,,) in docstrings now render as clickable links in hover tooltips.
Inlay hints for class attributes defined in__init__` without explicit annotations.
Supports python.analysis.diagnosticMode, python.analysis.importFormat, and python.analysis.inlayHints settings — full interop with the Python VS Code ecosystem.
Added support for legacy pkgutil-style namespace packages
### Error Reporting
New explicit-any error kind (ignored by default) warns when Any appears in annotations or type alias bodies; includes migration support for mypy/pyright codebases.
Diagnostic paths in baseline.json are now relative and always use forward slashes — fixes baseline matching when CI checkout paths differ from local dev environments and across OSes.
The annotation-mismatch error kind has been removed (it was never emitted).
### Configuration
New all preset enables every error kind at error severity — for codebases that want comprehensive checking. Available in both the CLI and the VS Code python.pyrefly.typeCheckingMode setting.
New pytorch-efficiency-lints flag turns on PyTorch efficiency checks at warn severity: catches .item() GPU sync, redundant .to(device), deprecated .cuda(), and print(tensor).
### Tensor Shapes
Tensor shape operations now live in user-space stubs (torch/_shapes.pyi) via the new @uses_shape_dsl decorator.
DSL compile errors and shape-DSL type errors now emit proper diagnostics with precise source spans instead of panicking.
Recursive @shape_dsl_function definitions and invalid call signatures are caught at compile time.
### Stubgen
Stubgen now emits synthesized __init__ for dataclasses, preserving constructor signatures in generated stubs.
### Build & CI
Pyrefly now compiles on stable Rust — no more nightly toolchain dependency. GitHub CI workflows updated to match.
musllinux wheels are now built for Alpine and other musl-based distros.
Conformance test sources updated from upstream python/typing.
---
## 🐛 Bug fixes
We closed 34 bug issues this release 👏
#2798: Fixed false positive not-iterable error when iterating over a list stored in a dict that also contains non-iterable values. When a dict was built inside a loop with heterogeneous inner dicts (e.g., {"start": date, "tasks": []}), Pyrefly incorrectly inferred the inner dict's value type as date instead of date | list[...], causing spurious errors when accessing val["tasks"].
#3188: Fixed error suppression for multi-line implicit string concatenations. When a # pyrefly: ignore comment appeared above a multi-line implicit string concatenation, only the first error was covered. Pyrefly now reparses the AST to respect ignore comments for the entirety of the construct.
#3385: Fixed false positive missing-override-decorator when assigning to inherited properties. If a child class assigned to a property (with a setter) defined in a base class, Pyrefly incorrectly flagged it as an implicit override.
#3208: Fixed stubgen missing instance variables defined in __init__. Classes in generated stubs were missing attributes if those attributes were not explicitly annotated at the class level. Stubgen now emits synthesized __init__ for dataclasses, preserving constructor signatures.
#3237: Fixed cross-file references lost when CRLF/LF line endings differ. When files on disk used CRLF but the editor sent LF-normalized content via textDocument/didOpen, byte offsets diverged, causing exact byte-range comparisons to fail. Pyrefly now uses a line-number fallback to match definitions correctly.
#3378: Fixed exhaustive Enum variants not narrowing the type. When a Final Enum variant was checked with is not, the type was not narrowed out of the union, causing false positives in exhaustiveness checks.
#3413: Fixed strict mode insisting on @override for standard dunders. Pyrefly now skips missing-override-decorator for dunders inherited from object, as adding @override to __repr__, __eq__, etc., is pure noise.
#3455: Fixed crash when overload residual capture included PartialQuantified vars. The solver now correctly handles partial vars in overload residuals, preventing panics.
#3392: Fixed Self@[Enum] not being properly narrowed. For an exhaustive match on an enum type within an instance method, the self argument wasn't being narrowed as expected. Enum member subtraction now preserves and handles SelfType, allowing exhaustive enum match self fallbacks to narrow to Never.
#3299: Fixed incorrect type inference after __setitem__ / __getitem__. When a class's __setitem__ and __getitem__ signatures were asymmetric, Pyrefly incorrectly narrowed the assigned value. Subscript-assignment narrowing is now gated by symmetry checks, preventing false positives with custom container types.
And more! #3446, #3448, #3396, #1492, #2451, #3431, #3210, #3381, #2547, #3147, #3524, #3506, #3519, #3343, #3505, #3369, #3344, #3400, #3394, #3221, #3514, #3520, #3544, #3458
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](https://github.com/facebook/pyrefly/issues).
---
## 📦 Upgrade
`bash pip install --upgrade pyrefly==1.1.0-dev.1 `
### 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:
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](https://pyrefly.org/en/docs/error-suppressions/).
---
## 🖊️ Contributors this release
@stroxler, @rchen152, @ndmitchell, @yangdanny97, @kinto0, @jorenham, @asukaminato0721, @migeed-z, @samwgoldman, @lolpack, @grievejia, David Tolnay, @connernilsen, @arthaud, @maggiemoss, @NathanTempest, @f1sherFM, @mfish33, @lordhaa123, Anqi Wu, @javabster, @rexledesma, @MackDing, Brian Rosenfeld, @fylux, @YBJ0000, @arpitjain099, @EpicEric, @NarxPal, Philippe Bidinger, @knQzx, @yeetypete, @GHX5T-SOL, Tejesh Mehta, @fangyi-zhou, @LeSingh1, @P-r-e-m-i-u-m, @Arths17, @sjh9714, @mdbernard
---
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
Status: STABLE *Release date: 12 May 2026*
Status: STABLE Release date: 12 May 2026
We're thrilled to announce that Pyrefly has reached its stable 1.0.0 release! Since our beta release in November 2025, we've fixed hundreds of bugs, improved performance, and added lots of new functionality. Pyrefly is already the default type checker for Instagram at Meta and has been adopted by other large production codebases like PyTorch and JAX. Today, we're making it official: Pyrefly is production ready.
This would not have been possible without our amazing open-source community. To everyone who filed GitHub issues, submitted pull requests, gave us feedback at conferences, or joined us on Discord: thank you. Your contributions shaped this release.
These release notes cover the major highlights since our beta release. For the full history, see our past weekly release notes.
We've continued to push Pyrefly's performance since the speed improvements we shared in February. Since beta:
(Tested on an M4 Macbook Pro using open-source benchmarks from type_coverage_py and ty_benchmark.)
Compare the performance of Pyrefly and other Python type checkers on our regularly updated benchmarking suite, which runs against 53 popular Python packages.
A new preset configuration option provides named bundles of error severities and behavior settings.
| Preset | Description |
|---|---|
off |
Silences all diagnostics. Useful for IDE-only users or if you want total control of which errors are enabled. |
basic |
Low-noise, high-confidence diagnostics only (syntax errors, missing imports, unknown names, etc.). Ideal for unconfigured projects or IDE-first users. |
legacy |
For codebases migrating from mypy. Disables checks mypy doesn't have. pyrefly init now emits this preset automatically when migrating from a mypy config. |
default |
The standard Pyrefly experience. Equivalent to having no preset. |
strict |
Enables additional strict checks on top of the default preset. For users who want to avoid Any types in their codebase. |
See the configuration docs for details.
We’ve made improvements to the out-of-the-box experience for projects without a pyrefly.toml.
pyrefly init would commit to disk.)We've been hard at work making the type checker robust and feature-complete, with a focus on driving down false positives and improving type quality in real-world code bases. Here are some highlights:
source.fixAll.RootModel, pydantic-settings, and pydantic.dataclasses..ipynb IDE support has reached full parity with .py files, with rename, find references, code actions, and document symbols all supported.Pyrefly ships with tools to aid with adopting type checking in an existing codebase. Two new tools since beta:
pyrefly coverage report outputs a JSON report with annotation completeness and type completeness metrics per function, class, and module, so you can track coverage over time.Going forward, we’ll switch from a weekly to monthly cadence for minor (1.x.0) releases, with patch releases in between as-needed for critical fixes. We’ll continue providing release notes for minor versions, so you can see what’s new in each release.
The following people have directly contributed at least once to the development of Pyrefly since our first Alpha release.
@aahanaggarwal, @aaron-ang, @abdallhfattah, @Abel981, @abesto, @abhi-jha, @ABohra3, @Adamkaram, @Adist319, @adsi7698, @AHA705, @ahornby, @airvzxf, @ajaymiranda, @akmalsoliev, Alan Du, @Alex-Aron, Alok Priyadarshi, Alvaro Leiva Geisse, @AmalenduManoj, Anass Al-Wohoush, Anqi Wu, @ArchieBinnie, @arnav-jain1, @arosenber, @arthaud, @Arths17, @AryanBagade, @asm89, @asukaminato0721, @austin3dickey, @avikchaudhuri, Ben Carr, @bharath-2022, @bigfootjon, @bluetech, @bowiechen, @brchien, Brian Rosenfeld, @bv-saketha-rama, @capickett, Carlos Fernandez, @cbarrete, @cclauss, @charliecloudberry, @cjlongoria, Claudionor Santos, @connernilsen, @CookieComputing, @cooperlees, @cybardev, @DanielNoord, @danielocfb-test, @darricklaidin, David Tolnay, @davidbarsky, @ddrcoder, @dhleong, Dhruv Mongia, @diliop, @disrupted, @dluo, @Dogacel, @ducdetronquito, @ericweb2, @fangyi-zhou, @fannheyward, @fatelei, @github-main-user, @grantlouisherman, @grievejia, @gvozdvmozgu, @hanzel-sc, @hashiranhar, @hugovk, @iamPulakesh, @IDrokin117, @immanuel-peter, @Imran-S-heikh, @InSyncWithFoo, @ipr-ams, Ivan Loskutov, @j-piasecki, @jack-mcivor, @jackulau, @jagill, Jaimin Brahmbhatt, @JakobDegen, @javabster, @jchanke, Jess Wass, @jorenham, Jun Hao, @jvansch1, @K1T3K1, @KaranPradhan266, @Karman-singh15, Keito Uchiyama, @kinto0, @kitagry, @knQzx, @krathul, @krikera, @Krishnachaitanyakc, @kshitijgetsac, @kv9898, Li Shen, lianne, @lolpack, @Louisvranderick, @maggiemoss, @maifeeulasad, @maldoinc, @MarcoGorelli, @markmarkmarkthebest, @martindemello, @melvinhe, Miae Kim, @michaelcortese, @michel-slm, Mick Killianey, @migeed-z, Miles Conn, @mohesham88, Morgan Bartholomew, @MountainGod2, @mrsobakin, @mstykow, @mvanhorn, @NathanTempest, @ndmitchell, @nhawkes, @nikita-ashihmin, @nitinsingh-meta, @NSPC911, @ogios, @oopscompiled, @oriori1703, Owen Valentine, @oyarsa, @pavelzw, @pawelstrzmeta, @pawlowskialex, @PhilHem, @prasannavenkateshgit, @praskr-wisdom, @Prathamesh-tech-eng, @pswitchy, @pt2302, @QEDady, @QuantumManiac, @quark-zju, @Raf-Hs, @Rayahhhmed, @rchen152, @rchiodo, @regexyl, @rexledesma, @ricardoleal20, Robert Rusch, @robertoaloi, Ron Mordechai, @rubmary, @runlevel5, @salmanmkc, @salvatorebenedetto, @SamChou19815, @samwgoldman, @sandeshbhusal, @sargun, @Sehat1137, @self-sasi, @serephus, @sgavriil01, @shayne-fletcher, @shining44, @ship-it-ship-it, @shuv-amp, @sifex, @simonhollis, @singiamtel, @ska-kialo, @slawlor, @Solumin, @stanleyshen2003, @stroxler, Takuma Iwaki, @Tamchuk, @tannguyencse19, @tejasreddyvepala, @terror, @TheRustyPickle, @thomaspolasek, Tianhan Lu, @tkaleas, @tsembp, @ukautz, @Viicos, @vinnymeller, Vladimir Matveev, Weixi Ma, @Wilfred, Will Li, @willylau, @xaskii, @xl4624, @yamgent, @yangdanny97, @yeetypete, @yslim-030622, @zachmullen, @zanieb, @zbowling, @Zeko369, @zertosh, @zhuolix, @zpao, @zriser, @zsol
Full Changelog: https://github.com/facebook/pyrefly/compare/0.64.0...0.64.1
Full Changelog: https://github.com/facebook/pyrefly/compare/0.64.0...0.64.1
The legacy python.pyrefly.displayTypeErrors setting is now deprecated, with values transparently mapped to the new model. - A new python.pyrefly.disab…
Status : BETA Release date: May 05, 2026
Pyrefly v0.64.0 bundles 190 commits from 20 contributors.
| Area | What's new |
|---|---|
| Type Checking | - You can now pass generic or overloaded callables to higher-order functions and Pyrefly will preserve their structure in the return type. For example, identity(identity) now correctly returns a generic callable instead of degrading to Unknown. <br><br>- Same-scope class rebinds (like Real = Dummy after class Real) are now checked against the original class as if it were an implicit type[Real] annotation, preventing silent type changes and fixing spurious constructor-call errors. <br><br>- Generic classes with missing type arguments in lax mode now default to Any instead of raising variance errors, improving consistency with how we handle other incomplete types. <br><br>- Pydantic field_validator decorators with mode='before' and mode='plain' are now supported, allowing validators to accept broader input types before coercion. <br><br>- Spurious unpack diagnostics are no longer emitted when the right-hand side involves Never (e.g. a, b, c = never() or a, b = (never(), 1)). The unpack solver is now Never-aware, recognizing that the producing expression cannot complete and any error message at the unpack site would be misleading. <br><br>- assert statements now check that __bool__ is callable on the test expression, matching the behavior already in place for if, while, and ternary expressions (and aligning with mypy and pyright). |
| Language Server | - The language server now advertises both source.fixAll and source.fixAll.pyrefly code action kinds, enabling selective fix-on-save configuration across editors that implement the LSP protocol. <br><br>- Document highlights now correctly distinguish between read and write references, setting DocumentHighlightKind::WRITE for assignments and declarations. <br><br>- Go-to-definition on relative imports in site-packages files now correctly resolves to the package source instead of returning null when a pyproject.toml exists at the project root. <br><br>- Notebook cell index resolution has been fixed to prevent mismatches between code cells and markdown cells, eliminating panics and incorrect byte offset calculations in Jupyter notebooks. <br><br>- Cross-module "find references" (external references) is now enabled by default, returning references across the entire project rather than just the current file. <br><br>- A new quick fix turns the existing "Did you mean Foo.BAR?" diagnostic note for missing enum members into a code action that replaces the offending string literal with the proper enum member access. <br><br>- A new # pyrefly: ignore quick fix inserts a suppression comment for the diagnostic at the cursor, automatically merging into an existing pyrefly-ignore directive on the same line or on a comment-only line above when present. <br><br>- Numeric parameter defaults now preserve their source spelling (e.g. 0o777, 0xFF, 0b101) in hover and signature display rather than being normalized to decimal. <br><br>- Code actions documentation has been added to the IDE Supported Features page, covering quick fixes and source.fixAll.pyrefly configuration. |
| Onboarding & VS Code Extension | - A redesigned unconfigured-project experience: when no pyrefly.toml is found, Pyrefly auto-detects nearby mypy.ini, pyrightconfig.json, or [tool.mypy]/[tool.pyright] sections in pyproject.toml and synthesizes an in-memory configuration migrated from those settings (using the legacy or default preset respectively). With no detectable configuration, the new basic preset is used. <br><br>- A new python.pyrefly.typeCheckingMode workspace setting (auto / off / basic / legacy / default / strict, default auto) lets users pick a preset for files not covered by an explicit Pyrefly configuration, directly from the VS Code settings UI. The legacy python.pyrefly.displayTypeErrors setting is now deprecated, with values transparently mapped to the new model. <br><br>- A new python.pyrefly.disableTypeErrors workspace setting provides a clean per-workspace kill switch for diagnostics, independent of the type-checking mode. <br><br>- The VS Code status bar has been redesigned: it now shows the active preset (e.g. "Pyrefly (Legacy)", "Pyrefly (Basic)") and the tooltip explains why that preset was chosen and links to the relevant docs. <br><br>- After a pyrefly check on an unconfigured project, the CLI now prints a short upsell to stderr explaining what configuration was synthesized and pointing at pyrefly init. The message is routed to stderr so machine-readable stdout formats (e.g. --output-format json) remain untouched. |
| Configuration | - Configuration presets (off, basic, legacy, default, strict) are now available via the preset option, providing named collections of error severities and behavior settings as a base configuration that user settings can override. <br><br>- The legacy preset is now used by pyrefly init for mypy migration, disabling checks mypy doesn't have and setting looser inference defaults. <br><br>- The implicit-any error code has been split into sub-kinds (implicit-any-attribute, implicit-any-empty-container, implicit-any-parameter, implicit-any-type-argument) with implicit-any as the parent, allowing finer-grained control over where implicit Any is flagged. <br><br>- The unbound-name error is now disabled in the legacy preset to match mypy's default behavior, which does not flag possibly-undefined variables. |
| Error Reporting | - A new incompatible-overload-residual error kind has been introduced for cases where all branches of an overloaded callable are pruned during higher-order function analysis, making it easier to configure these errors independently. <br><br>- Error messages for all-pruned overload residuals now describe the incompatibility in terms of "solved type variables" rather than "solved type constraints" for better clarity. <br><br>- The pyrefly suppress command now correctly handles removal of unused ignores via the --remove-unused flag, which was previously broken. |
| Factory Boy Support | - Pyrefly now infers the correct model return types for create(), build(), create_batch(), and build_batch() methods on DjangoModelFactory subclasses by reading the inner Meta.model attribute. <br><br>- False-positive bad-override errors on the inner Meta class in factory-boy factories are now suppressed, matching how we handle Django and Marshmallow. |
| Reporting | - The pyrefly report JSON output now includes a path field on each ModuleReport, for compatibility with typestats and similar tooling. |
| Performance | - Deeply-nested dict literals no longer cause exponential memory growth during type inference. A depth-25 dict literal that previously consumed ~7.7 GB now uses ~239 MB by computing the union of field types on demand instead of storing it redundantly. <br><br>- Callable residual finalization has been optimized to avoid redundant type cloning and traversals, reducing memory churn in attribute-heavy code. <br><br>- Eliminated some bugs that caused Pyrefly to unnecessarily analyze dependencies, improving latency and memory use, especially in the IDE. |
We closed 15 bug issues this release 👏
+ operator was incorrectly flagging str as not assignable to LiteralString attributes. Pyrefly now preserves LiteralString style when adding two explicit string literals and uses implicit style otherwise.foo(x, y) with x: int | None and y: int | None no longer incorrectly narrows x to None when passed to a generic foo[T](a: T, b: T).pyrefly suppress --remove-unused which was not actually removing unused error suppressions. The command now correctly processes the --remove-unused flag.source.fixAll.pyrefly in addition to source.fixAll, allowing users to selectively enable or disable Pyrefly's fix-all actions in editors that support LSP code action kinds.RootModel in lax mode. Missing type arguments now degrade to Any instead of raising errors, matching our handling of other incomplete types.pyproject.toml existed at the project root.list["A|B"] was incorrectly rejected as not-a-type. Type argument subscripts are now bound as type expressions even in value context, allowing forward-ref strings to be parsed.bad-class-definition when a dataclass field was assigned inside a @classmethod or __init_subclass__. Pyrefly was incorrectly extracting these as dataclass fields, even though Python's dataclasses.dataclass ignores them at runtime.assert statements now flag a non-callable __bool__ on the test expression, closing a gap that previously only caught the issue inside if, while, and ternary expressions.urlunparse being inferred as returning Literal[b''] instead of str. The fix reworks as_superclass so tuple-like NamedTuple subclasses are upcast through their erased tuple element types, which stops ParseResult from spuriously matching Iterable[None] and selecting the bytes overload.Foo.BAR?" diagnostic note for missing enum members, turning the suggestion into a code action that rewrites the surrounding string literal.0o777) in hover and signature display rather than being normalized to a decimal value.path field to the pyrefly report JSON ModuleReport, restoring compatibility with typestats.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==0.64.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:
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](https://pyrefly.org/en/docs/error-suppressions/)
@stroxler, @rchen152, @migeed-z, @grievejia, @samwgoldman, @kinto0, @asukaminato0721, @jvansch1, @NathanTempest, @avikchaudhuri, @connernilsen, Carlos Fernandez, David Tolnay, @jorenham, @rexledesma, @arthaud, @pawlowskialex, @QuantumManiac, @knQzx, @QEDady
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.
Full Changelog: https://github.com/facebook/pyrefly/compare/0.63.0...0.63.1
Full Changelog: https://github.com/facebook/pyrefly/compare/0.63.0...0.63.1
Status : BETA *Release date: April 27, 2026*
Status : BETA Release date: April 27, 2026
Pyrefly v0.63.0 bundles 129 commits from 26 contributors.
| Area | What's new |
|---|---|
| Type Checking | - Enum member types are preserved even when the metaclass conflicts with EnumMeta, reducing noise in projects using custom metaclasses with enums. <br><br>- Constrained TypeVars no longer get pinned to a specific constraint when matched against Any, preventing false positives. <br><br>- Self/cls annotations on all methods and classmethods are validated to ensure they reference the defining class or a superclass, catching more annotation errors. |
| Language Server | - The LSP now reports unused-ignore diagnostics when configured to do so, helping you clean up stale suppression comments. <br><br>- Completions for attribute override definitions are available in class bodies, surfacing base-class members filtered by fuzzy match. <br><br>- The LSP server no longer crashes on Jupyter notebook cell URIs (vscode-notebook-cell:), with full support for resolving notebook cell paths and position offsets. <br><br>- Workspace symbol search uses the correct location for re-exported symbols, preventing panics on multi-byte UTF-8 characters. <br><br>- Inlay hints are clickable for built-in types like tuple, dict, and str, enabling go-to-definition directly from hint overlays. |
| Error Messages | - A new unnecessary-type-conversion lint warns when str(), int(), or float() is called on an argument that is already of that exact type. |
| Reporting & Coverage | - Public symbol filtering is available via pyrefly report --public-only, using cross-module tracing to report only public symbols. |
| Performance | - TypedDict subset checks are now cached on the Solver, reducing CPU time by ~5.3x and wall time by ~6.7x on pydantic (from 9.5s to 1.4s). |
| Configuration & Initialization | - pyrefly init supports --dry-run for safe previews without writing files, and --print-config for machine-readable TOML output. |
We closed 9 bug issues this release 👏
pyrefly report by incorrectly counting their trivial -> None return types.pyrefly report were not deduplicated, causing parameters and callable signatures to be counted multiple times and inflate coverage metrics.*) for direct TypeVarTuple arguments, causing Shape to render bare instead of *Shape.bad-assignment and bad-return errors.pyrefly report by being counted as typable entities.unnecessary-type-conversion lint that warns when str(), int(), or float() is called on an argument that is already of that exact type, making the conversion redundant.pyrefly report when @no_type_check decorator was used, caused by a missing key lookup for skipped parameter annotations.await expression already has await but produces a coroutine due to an incorrect return type annotation on the function definition.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==0.63.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:
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
@rchen152, @migeed-z, @avikchaudhuri, @grievejia, @kinto0, @jorenham, @jvansch1, generatedunixname2066905484085733, @stroxler, @tejasreddyvepala, David Tolnay, @fangyi-zhou, @asukaminato0721, @lolpack, @NathanTempest, @connernilsen, @zbowling, @rubmary, @rexledesma, Anass Al-Wohoush, @javabster, @ABohra3, generatedunixname89002005232357, @tkaleas, @knQzx, generatedunixname89002005307016
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.
Status : BETA *Release date: April 20, 2026*
Status : BETA Release date: April 20, 2026
Pyrefly v0.62.0 bundles 87 commits from 23 contributors.
| Area | What's new |
|---|---|
| Type Checking | - TypeVarTuple inference has been changed to be consistent with TypeVar, per a recent change to the typing spec. <br><br>- Errors logged during speculative union checks and overload calls are now reverted, eliminating a source of confusing false positives. <br><br>- Union-typed decorators that return fully unknown types (either Unknown or callables with all-unknown signatures) preserve the original function signature instead of replacing it with Unknown, reducing false positives by ~23% on TensorFlow. |
| Language Server | - Semantic tokens and completions work for inmemory:// documents on Windows. <br><br>- LSP server crashes from out-of-range line numbers in client requests are prevented by clamping positions to the buffer's valid range. |
| Error Reporting | - Error kinds can now have sub-kinds that can be disabled using their shared prefix. <br><br>- Invariance checks for mutable attributes (corresponding to mypy's mutable-override opt-in behavior) have been moved to a new bad-override-mutable-attribute error code that is a sub-kind of bad-override. <br><br>- The bad-param-name-override error has been renamed to bad-override-param-name and made a sub-kind of bad-override. <br><br>- Sub-configs that define [errors] inherit the root config's error severity overrides for any codes they don't explicitly set. |
| Configuration | - When migrating from mypy via pyrefly init, bad-override-mutable-attribute is disabled by default to match mypy's behavior. <br><br>- Project excludes (e.g., project-excludes = ["**/*.ipynb"]) no longer block discovery of .py files when the default project-includes contains both **/*.py* and **/*.ipynb. |
We closed 12 bug issues this release 👏
types-python-dateutil for the dateutil module, not types-dateutil) by extracting the module→package mapping from the bundled typeshed archive, preventing potential typosquatting.NewType("NewNoneType", NoneType) is now accepted as a valid nominal type declaration, and plain None is correctly rejected where NewNoneType is required.unexpected-keyword errors for named parameters before *args: P.args. Functions like call_with_retry(f, max_attempts=10, *args: P.args, **kwargs: P.kwargs) now correctly allow max_attempts to be passed as a keyword argument, matching mypy and pyright behavior.DidChangeTextDocument race where the file was truncated). Out-of-range positions now map to EOF instead of panicking.bad-argument-type for list(null_values.items()) when the return type hint is a union like Sequence[str] | list[tuple[str, str]]. Pyrefly now tries constructing the class with each union member independently and unions the results, ensuring the inferred type is assignable to the hint.bad-argument-type when calling a method with AnyStr. Placeholder variables used during overload resolution are now saved and restored around overload calls, preventing AnyStr from being incorrectly specialized to str and polluting subsequent checks.invalid-type-var for generic functions captured as closure default arguments. The Visit implementation for DefaultValue now calls visit instead of recurse, ensuring type-level visitors see the Type node stored in the default value..value on enum members with non-data-type mixins. Mixins that don't define __new__ (e.g., class Meta: pass) are no longer treated as data type mixins, so Foo.bar.value correctly returns Literal[1] instead of Meta.bad-argument-type for overloaded functions with vararg unpacking (e.g., *args: *tuple[int, str]). Type check errors for unpacked varargs are now sent to call_errors instead of arg_errors, so they don't cause the overload to be incorrectly rejected.bad-specialization when matching a type variable against a union like N | Iterable[N]. Pyrefly now uses snapshot-based rollback when trying each union member, ensuring specialization errors from one branch don't leak into the final result if another branch succeeds without errors.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==0.62.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:
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
@rchen152, @stroxler, @migeed-z, @jorenham, @samwgoldman, @connernilsen, @NathanTempest, @kinto0, @jvansch1, @fangyi-zhou, @tejasreddyvepala, David Tolnay, generatedunixname2066905484085733, @mstykow, @AHA705, @Arths17, @grievejia, Claudionor Santos, @austin3dickey, @robertoaloi, @salvatorebenedetto, @iamPulakesh, generatedunixname89002005307016
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.
Full Changelog: https://github.com/facebook/pyrefly/compare/0.61.0...0.61.1
Full Changelog: https://github.com/facebook/pyrefly/compare/0.61.0...0.61.1
Status : BETA *Release date: April 13, 2026*
Status : BETA Release date: April 13, 2026
Pyrefly v0.61.0 bundles 85 commits from 21 contributors.
| Area | What's new |
|---|---|
| Type Checking | - Division, floor division, and modulo operations with a literal zero divisor (e.g., x / 0, y // 0, z % 0) are flagged as errors, catching runtime ZeroDivisionError before execution. <br><br>- Multiple inheritance with conflicting __slots__ definitions is detected and reported as an error, matching CPython's runtime behavior and preventing layout conflicts. <br><br>- Protocol members assigned a value without an explicit type annotation (e.g., x = None in a Protocol class body) are flagged as errors, ensuring protocol members have declared types as required by the typing specification. |
| Language Server | - Variables used exclusively within f-string format specifiers (e.g., f"{key:<{max_len}}") are correctly recognized as used, eliminating false positive unused-variable warnings. <br><br>- The VS Code extension explicitly declares workspace trust capabilities, requiring trusted workspaces to run and allowing machine-overridable scope for lspPath and lspArguments settings for improved security. |
| Coverage Reporting | - The pyrefly report command now excludes some dunder methods and typing-only constructs from coverage metrics. <br><br>- Per-module JSON output includes entity counts (n_functions, n_methods, n_function_params, n_method_params, n_classes, n_attrs, n_properties, n_type_ignores) for downstream consumers. <br><br>- A new --module <name> CLI flag allows overriding the module name in JSON output, supporting callers that need canonical package names instead of filesystem-derived names. |
| Pydantic | - Pydantic lax conversion special-cases regex patterns, fixing false positives when passing compiled patterns to Pydantic models. |
| Performance | - Fixed a bug in overload evaluation that caused exponential memory consumption and indefinite hangs on code with many overloaded calls. |
We closed 9 bug issues this release 👏
LitEnum — types are now deep-forced before storage to prevent leaking vars into the solver.0 are now flagged as errors, catching ZeroDivisionError at static analysis time instead of runtime.f"{key:<{max_len}}"). The AST visitor now correctly descends into format_spec nodes.[missing-attribute] errors for dict.setdefault(key, []).append(val) on unannotated dicts. Overload resolution now creates fresh partial variables for each overload, preventing incorrect pinning.re.Pattern[str] to Pattern[LaxStr] and rejecting re.Pattern[str]. Regex patterns now expand to re.Pattern[T] | T instead of recursively widening the inner type.TypeError from multiple inheritance with conflicting __slots__ (same slot names). Pyrefly now detects and reports this layout conflict during class metadata computation.TypeError from multiple inheritance with conflicting __slots__ (different slot names). Pyrefly now detects non-empty __slots__ in multiple bases and reports the conflict.issubclass() after isinstance() narrowing with custom metaclasses (e.g., Django's ModelBase). Metaclass instances are now correctly accepted as valid class objects.LiteralString type error in map(str.strip, ...). Overloads with narrower self-type annotations are now filtered out during unbound method resolution.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==0.61.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:
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
@rchen152, @migeed-z, @javabster, generatedunixname2066905484085733, @rubmary, @kinto0, @lolpack, @asukaminato0721, @knQzx, David Tolnay, @yangdanny97, @Arths17, @tejasreddyvepala, @salvatorebenedetto, @rchiodo, @stroxler, @samwgoldman, @arthaud, @fangyi-zhou, @NathanTempest, generatedunixname89002005307016
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.
Fixes exponential memory usage on unannotated dictionaries in 0.60.1.
Fixes exponential memory usage on unannotated dictionaries in 0.60.1.
Full Changelog: https://github.com/facebook/pyrefly/compare/0.60.1...0.60.2
Full Changelog: https://github.com/facebook/pyrefly/compare/0.60.0...0.60.1
Full Changelog: https://github.com/facebook/pyrefly/compare/0.60.0...0.60.1
Status : BETA *Release date: April 06, 2026*
Status : BETA Release date: April 06, 2026
Pyrefly v0.60.0 bundles 168 commits from 28 contributors.
| Area | What's new |
|---|---|
| Type Checking | - Partial support for TypeForm (PEP 747). <br><br>- Enum bug fixes: member types are preserved as literals instead of being promoted away, and the auto() function infers its type from _generate_next_value_ and mixed-in data types, rather than always defaulting to int. <br><br>- Annotated variables preserve their declared types over inferred Any types, preventing accidental loss of type information. |
| Language Server | - Pyrefly now shows warnings for InvalidAnnotation, MissingImport, and UnknownName errors even when no configuration file is present, aligning with pyright's default diagnostic behavior. <br><br>- IDE features like hover, go-to-definition, and autocomplete work inside unannotated function bodies when check-unannotated-defs = false. Previously, these functions were completely skipped during analysis, leaving you without any IDE support. <br><br>- The provide-type endpoint now returns correct types for operator expressions and properly qualifies type alias names with their module. <br><br>- Code lens "Run" and "Test" commands are available for if __name__ == "__main__" blocks and pytest/unittest test methods, enabling one-click execution from the editor. |
| Error Messages | - The untyped-import error has been upgraded from "ignore" to "warn" by default. <br><br>- The summary line in pyrefly check output now shows how many warnings or info messages were hidden when using --min-severity, so you'll know if diagnostics were filtered out (e.g., "INFO 0 errors (12 warnings not shown)"). <br><br>- You can now place # pyrefly: ignore-errors directives after module docstrings, not just at the very top of the file. <br><br>- Suppression comments work correctly with backslash line continuations. The suppression above the first line of a backslash-continued expression applies to the entire expression, matching the behavior for multi-line strings. <br><br>- The pyrefly report command recognizes suppression comments from more tools (# type: ignore, # pyrefly: ignore, # pyright: ignore, # mypy: type: ignore, # pyre-fixme, # ty: ignore, and # zuban: ignore), making the report more comprehensive when analyzing codebases that use multiple type checkers. |
| Performance | - Reduced wall time by 55% on a colour-science/colour benchmark by caching protocol subset checks and avoiding expensive clones. |
We closed 27 bug issues this release 👏
yield from with a union return annotation (e.g., Iterator[tuple[Any, ...]] | Generator[dict[str, Any], None, Unknown]) incorrectly reported invalid-yield because the union members were not being decomposed before checking assignability.bad-argument-type error when using metaclasses — type[Banana | Grape] is now correctly assignable to FruitMeta when Banana and Grape inherit from Fruit(metaclass=FrustMeta).~/.codex/worktrees/XXXX/project/) because the **/.[!/.]*/** glob pattern matched hidden directory components anywhere in the absolute path, including ancestors above the project root.match x, y: now correctly narrow individual variables by their corresponding sub-patterns.namedtuple with a field named cls caused type warnings because the field collided with the synthesized __new__ method's first parameter — the internal parameter is now _cls.@dataclass to an Enum subclass was not rejected — this is now correctly reported as BadClassDefinition because Python's dataclasses module does not support Enum subclasses (runtime TypeError).@dataclass to a TypedDict subclass was not rejected — this is now correctly reported in the canonical class_metadata_of path, and dataclass_metadata is cleared after reporting the error.@dataclass to a Protocol subclass was not rejected — this is now correctly reported because Protocol classes define structural interfaces, not data containers.provide-type endpoint returned Unknown for type aliases — operator expressions now return result types instead of dunder method signatures, and type alias names in function signatures are now module-qualified.type T = U; type U = T — when a cycle is detected, wrap_type_alias now returns an error type instead of the cyclic body.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==0.60.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
@stroxler, @yangdanny97, @migeed-z, @rchen152, @javabster, @asukaminato0721, @kinto0, @avikchaudhuri, @arthaud, @tejasreddyvepala, @lolpack, @fangyi-zhou, @Louisvranderick, @runlevel5, @yeetypete, @NathanTempest, @stanleyshen2003, Morgan Bartholomew, @connernilsen, @salvatorebenedetto, @kshitijgetsac, @Raf-Hs, Mick Killianey, David Tolnay, @dhleong, @Arths17
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.
Fixed a performance regression in 0.59.0.
Fixed a performance regression in 0.59.0.
Full Changelog: https://github.com/facebook/pyrefly/compare/0.59.0...0.59.1
Status : Beta *Release date: March 30, 2026*
Status : Beta
Release date: March 30, 2026
Pyrefly v0.59.0 bundles 153 commits from 20 contributors.
| Area | What’s new |
|---|---|
| Type Checking | - You can now use while...else statements with returns in the else clause without triggering a false positive missing-explicit-return error. <br><br>- Pyrefly now correctly handles type inference for nested empty dictionaries when constructing TypedDict instances, avoiding implicit-any errors. <br><br>- Error messages now highlight related code with inline labels; for example, an unsupported * operation will show the types of both operands directly in the source snippet |
| Language Server | - LSP hover information for classes now displays constructor signature and docstring. <br><br>- Support additional LSP functionality for notebooks, including find-references and rename. |
| Performance | - Faster typechecking in large pythonc codebases, up to 2x faster on recent benchmarks on real world projects <br><br>- Reduced CPU usage through smarter caching of module resolution results <br><br>- Improved performance of the LSP server by reducing redundant workspace diagnostic publishes. |
We closed 16 bug issues this release 👏
object, ensuring accurate type checking.invalid-type-var error when persisting the get method of a fully-annotated dict.implicit-any false positive that occurred with TypedDict items, improving code readability.while...else statements with returns in the else clause as exhaustive.datetime.datetime imports to display constructor signatures and docstrings.bad-argument-type error that occurred when using double-underscore arguments.__getitem__ were not recognized.isinstance with type | X.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==0.59.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, @lolpack, @yangdanny97, @stroxler, @samwgoldman, @jvansch1, @kinto0, @connernilsen, @asukaminato0721, @migeed-z, @arthaud, @grievejia, @rubmary, @Adist319, David Tolnay, @yslim-030622, @tejasreddyvepala, @mvanhorn, @MountainGod2
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.
Status : BETA *Release date: March 24, 2026*
Status : BETA Release date: March 24, 2026
Pyrefly v0.58.0 bundles 190 commits from 24 contributors.
| Area | What's new |
|---|---|
| Type Checking | - Binary operations like < and + now work correctly on identical constrained TypeVars (e.g., T: int | float), eliminating false positives when comparing or adding values of the same type variable. <br><br>- Type variables now accumulate lower bounds instead of pinning immediately to the first encountered type, fixing issues with generic function calls and improving type inference accuracy. <br><br>- Overload resolution has been improved to eliminate overloads with incompatible parameter counts and to apply return type hints more intelligently, giving you more precise return types and better error messages. <br><br>- A bug in Pyrefly's variance inference algorithm that caused it to hang indefinitely on self-referential generic classes has been fixed. |
| Language Server | - Go-to-definition on constructor calls jumps directly to __init__ or __new__ methods instead of the class definition, and callable instances navigate to __call__. This makes it much easier to find the actual implementation you're looking for. <br><br>- Hover tooltips display float default parameter values instead of ..., making function signatures more informative. <br><br>- The language server handles generic metaclasses with unbound type variables gracefully, preventing confusing cascading errors when attribute lookups resolve to bare type variables. <br><br>- Memory usage in watch mode has been significantly reduced by garbage-collecting stale loader entries when configurations are reloaded. <br><br>- Workspace diagnostic mode no longer shows false "memory path not found" errors after closing files, and warnings are correctly filtered out for non-open files. |
| Exhaustiveness Checking | - Exhaustiveness checking has been simplified and made more powerful. You can now use isinstance checks and multi-subject narrowing for exhaustiveness, and nested if/elif chains are recognized as exhaustive when all branches are covered. <br><br>- Pattern matching with faceted subjects (e.g., match obj.attr) correctly narrows types in negative cases, fixing false positives where fallback branches were incorrectly typed as Never. |
| Error Reporting | - A new --min-severity flag (and corresponding config option) lets you control the minimum severity level for displayed errors. By default, only errors are shown; warnings and info-level diagnostics are hidden unless you explicitly lower the threshold. <br><br>- reveal_type output is treated as a directive rather than a normal diagnostic, so it won't be affected by baseline exclusion, suppression commands, or severity thresholds. <br><br>- The --remove-unused flag on pyrefly suppress now also removes unused # pyre-fixme comments when Pyre is enabled in your configuration. |
| Performance | - Recursive return type inference limits both depth and inner union width, preventing exponential memory usage and dramatically improving performance on complex mutual recursion (e.g., the weasyprint library now type-checks in seconds instead of minutes). <br><br>- Several performance optimizations have been made to error collection, path lookups, and calculation caching, resulting in faster type checking across the board. |
We closed 20 bug issues this release 👏
pyproject.toml save. Stale loader entries are now garbage-collected at commit time, keeping memory usage stable across configuration reloads.match c.items: case [_]:) incorrectly narrowed the base variable to Never. Sequence pattern narrowing operations now correctly propagate facet subject information.Never is now always sound for flow analysis regardless of the type being narrowed.dict.get(k) with an incorrect argument type returned Unknown instead of the correct return type. Overloads are now eliminated by arity before applying return type hints, giving you precise return types even when calls have errors.*args: P.args, **kwargs: P.kwargs to another, the solver now correctly validates the forwarding pattern instead of producing bogus "Expected P to be a ParamSpec value" errors.bad-override errors when subclassing str and adding optional parameters to overridden methods. Inapplicable parent overloads (e.g., LiteralString overloads when the subclass is not LiteralString) are now filtered out during override checking.__get__ through type[T] where T is bounded. The descriptor base now preserves the ClassBase wrapper to correctly produce type[T] instead of type[A].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==0.58.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:
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
@stroxler, @rchen152, @yangdanny97, @grievejia, @kinto0, @migeed-z, @jvansch1, @ndmitchell, @samwgoldman, @maggiemoss, @arthaud, @connernilsen, @fangyi-zhou, @avikchaudhuri, @asukaminato0721, @jackulau, @PhilHem, @Rayahhhmed, @oyarsa, generatedunixname2066905484085733, David Tolnay, Brian Rosenfeld, @rubmary, @rchiodo
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.
Fixed a bug that could cause Pyrefly to hang.
Fixed a bug that could cause Pyrefly to hang.
Status: Beta *Release date: March 16, 2026*
Status: Beta
Release date: March 16, 2026
Pyrefly 0.57.0 bundles 116 commits from 17 contributors.
| Area | What’s new |
|---|---|
| Type Checking | - Improved type narrowing for hasattr inside loops <br><br>- pyrefly suppress no longer corrupts multiline f-strings/t-strings by inserting suppression comments inside the string; it now places comments above the string and also matches suppressions correctly for errors inside multiline f/t-strings <br><br>- Improved namedtuple support with * field unpacking <br><br>- Fewer false-positive “variable is not initialized” errors |
| Language Server | - if a nested pyproject.toml contains [tool.ruff] / [tool.mypy] / [tool.pyright], it’s treated as a strong “this is a Python project root” marker, preventing parent pyrefly.toml from incorrectly shadowing it (notably improving go-to-def accuracy on some repos) |
| Performance | - Typechecking speed has improved, making it now ~20% faster to type check Pytorch on recent benchmarks |
We closed 24 bug issues this release 👏
from typing import NewType as unused, even when NewType(...) was referenced.TypedDict fields named items/values prevented access to the corresponding dict.items() / dict.values() methods via attribute lookup.functools.partial(...) results couldn’t be assigned back to a Callable typed with a ParamSpec, causing a false-positive type error.Protocol parameterized by ParamSpec[...] wasn’t considered compatible with an equivalent “gradual” protocol using *args: Any, **kwargs: Any.__init__ on parametrized bound methods could trigger a false-positive type error due to incorrect attribute lookup behavior.super() calls to abstract methods that do have a concrete runtime body were incorrectly reported as missing-attribute / abstract-call errors.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==0.57.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
@stroxler, @grievejia, @yangdanny97, @migeed-z, @jvansch1, @rchen152, @asukaminato0721, @maggiemoss, @arthaud, @lolpack, @samwgoldman, @Adist319, David Tolnay, @avikchaudhuri, @rubmary, @javabster
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.
Status : Beta *Release date: March 09, 2026* Pyrefly v0.56.0 bundles 248 commits from 22 contributors.
Status : Beta
Release date: March 09, 2026
Pyrefly v0.56.0 bundles 248 commits from 22 contributors.
| Area | What’s new |
|---|---|
| Type Checking | - Limit the width of inferred return types to prevent large unions. <br><br>- 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. <br><br>- Support added for the TSP typeServer/getPythonSearchPaths message. <br><br> - 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) <br><br>- 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 |
We closed 33 bug issues this release 👏
StrEnum classmethod being treated as enum members.not-callable false positive with enum methods.bad-param-name-override false positive for Sequence.__contains__.no-matching-overload issue related to nested type aliases.class definition on top of a ClassVar.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==0.56.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
@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.
Status : Released *Release date: March 03, 2026*
Status : Released
Release date: March 03, 2026
Pyrefly v0.55.0 bundles 166 commits from 27 contributors.
| 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 <br><br>- Pyrefly now infers `Self` when constructing a class using `cls()`, also improving typing specification improvements <br><br>- Pyrefly can now evaluate `os.name`, similar to existing `sys.platform` support, reducing false positives. <br><br>- The `(*args: Any, **kwargs: Any)` syntax is now correctly treated as equivalent to the gradual signature `...`, aligning with Python's typing specification. <br><br>- 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. <br><br>- 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 |
We closed 35 bug issues this release 👏
unbound-name errors were incorrectly reported when using NoReturn.Any are no longer flagged as not callable.__all__ is now handled correctly, avoiding false positives.| operator.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==0.55.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
@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.
Status: BETA *Release date: February 23, 2026*
Status: BETA
Release date: February 23, 2026
Pyrefly 0.54.0 bundles 93 commits from 18 contributors.
| Area | What’s new |
|---|---|
| Type checker | - Pyrefly now supports using type(X) in base class lists, enabling compatibility with codebases that use metaclass expressions (e.g. those wrapping C extensions) <br><br>- Added static evaluation support for more patterns of sys.platform and sys.version_info checks |
| Language Server | - Autoimport and quickfix now surface explicit re-export paths, improving import suggestions for users working with re-exported symbols. <br><br>- Diagnostics can now be controlled independently for each workspace folder in multi-root setups, allowing users to customize diagnostics per project <br><br>- Enhanced "Generate code" quick fix actions in Pyrefly's LSP, which will now infer parameter types and annotations from call-site arguments <br><br>- Code completion and signature help now shows keyword argument and literal completions from all compatible overloads, not just the closest match |
We closed 7 bug issues this release 👏
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==0.54.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:
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 Pyefly documentation
@stroxler, @jvansch1, @rchen152, @samwgoldman, @arthaud, @asukaminato0721, @grievejia, @kinto0, @migeed-z, @avikchaudhuri, @rubmary, @alanhdu, @fangyi-zhou, @javabster, @dtolnay, Carlos Fernandez
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.
Status : BETA *Release date: 17 February 2026*
Status : BETA
Release date: 17 February 2026
pyrefly 0.53.0 bundles 245 commits from 27 contributors.
| Area | What’s new |
|---|---|
| Type Checking | - Recursive type aliases now supported, so you can define type aliases that reference themselves, and Pyrefly will correctly resolve and type-check them <br><br>- Error is now raised when Self is used in certain invalid locations (outside a class, in a static method within a class, in a metaclass) <br><br>- Pyrefly now supports the idiom class Foo(namedtuple("Bar", ...)), matching CPython and Mypy behavior <br><br>- Pyrefly will now warn you if a protocol’s type variable is used in a way that doesn’t match its declared variance |
| Language Server | - Completion suggestions are now ranked based on most recently used (MRU) items <br><br>- Auto-import completions and unknown-name quick fixes now honor common aliases (e.g. import numpy as np) <br><br>- Improved error messages for signature mismatches, including ASCII-style diffs and normalized function names for clarity |
| Config | - JSON schemas added for pyrefly.toml and pyproject.toml to enable editor features like auto-completion and validation |
| Performance | - Pyrefly uses ~26% less CPU when tested typechecking the whole Pytorch codebase on M1 Pro MacBook with 10 cores |
We closed 17 bug issues this release 👏
yield or yield from are now correctly inferred as generator-returning callables.Literal imported via try/except is now recognized as a special form, preventing spurious unknown-name errors@override decorators.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==0.53.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 [Pyefly documentation](https://pyrefly.org/en/docs/error-suppressions/)
@stroxler, @rchen152, @yangdanny97, @asukaminato0721, @samwgoldman, @kinto0, @connernilsen, @grievejia, @fangyi-zhou, @migeed-z, @ndmitchell, @jackulau, @jvansch1, @rubmary, @alanhdu, @avikchaudhuri, @arthaud, @DanielNoord, @diliop, @ipr-ams, @javabster, @oopscompiled, @Prathamesh-tech-eng, @self-sasi, @dtolnay, Vladimir Matveev, Robert Rusch
Status : BETA *Release date: 09 February 2026*
Status : BETA
Release date: 09 February 2026
Pyrefly v0.52.0 bundles 250 commits from 23 contributors.
As we’ve been watching Winter Olympic athletes racing for gold, we’ve been inspired by their dedication to keep pushing our own bobsled towards our goals of making Pyrefly as performant as possible. Just as milliseconds count in speed skating, they also matter when it comes to type checking diagnostics! With this release, Pyrefly users can benefit from a range of speed and memory improvements, which we’ve summarised below. But this is just the first lap, the race isn’t over! We’re committed to ongoing performance improvements and adding robust testing to prevent regressions, so stay tuned for more performance updates coming soon.
We’ve significantly improved the speed at which type errors and diagnostics appear in your editor after saving a file. Thanks to fine-grained dependency tracking and streaming diagnostics, Pyrefly now updates error messages almost instantly,even in large codebases. In edge cases that previously took several seconds, updates now typically complete in under 200ms. For a deep dive into how we achieved this, check out our latest blog post.
The initial indexing process (i.e. when Pyrefly scans your project and builds its internal type map) has been optimized for speed. This means you can start working with type-aware features much sooner, even in massive repositories.
We’ve made significant improvements to Pyrefly’s memory efficiency. The language server now uses 40–60% less RAM during both initial indexing and incremental type checking. This allows Pyrefly to scale to larger projects and run more smoothly on resource-constrained machines.
A critical bug that caused exponential memory usage when handling unions of dictionary types has been resolved. This fix ensures that Pyrefly remains stable and performant, even when working with complex type structures.
| Area | What’s new |
|---|---|
| Type System | Added support for template strings (PEP 750) Type narrowing enhancements: dict.get narrowing and safer negative narrowing |
| Language Server | Users can now automatically transform from ... import * statements into explicit imports for names used in the file Improved auto-complete for match Literal patterns Further support for type hierarchy now available in IDE Go-to definition on __all__ entries now brings you to the definition See all of the new features in more detail in our updated IDE supported features page |
We closed 13 bug issues this week 👏
isinstance and type[T]mapping.get("key") return the value type (not None).+=) when __iadd__ is missing to correctly fall back to __add__ and ignore __getattr__, aligning with Python runtime semantics.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==0.52.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 Pyefly documentation
@ndmitchell, @rchen152, @stroxler, @kinto0, @asukaminato0721, @yangdanny97, @grievejia, @migeed-z, @jvansch1, @samwgoldman, @avikchaudhuri, @maggiemoss, @arthaud, @AryanBagade, @connernilsen, @diliop, @fangyi-zhou, @javabster, @robertoaloi, @tianhan0, @dtolnay, Carlos Fernandez, Miles Conn
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.
Nothing published for this version
Nothing published for this version
Status : BETA *Release date: 02 February 2026*
Status : BETA
Release date: 02 February 2026
Pyrefly v0.51.0 bundles 162 commits from 25 contributors.
| Area | What’s new |
|---|---|
| Type Checking | - Fixes for incorrect type narrowing in boolean operations with generic functions <br><br> - Intersection logic fixed to identify empty intersections (Never) for final classes and populated Enums, as they cannot be subclassed. <br><br>- Added support GenericAlias type, including special attributes like __origin__, __args__, and support for the pipe operator <br><br>- Added support for checking that class-scoped type variables are not used in self annotations in __init__ methods, per typing spec |
| Language server | - During module resolution, "phantom paths" (non-existent paths checked during import) are now tracked, improving watch mode and import re-resolution <br><br>- List addition (+) now propagates type hints to both operands, making assignments like l2: list[Base] = [A()] + [B()] work as expected |
| Error Handling | - Added configuration to debug and/or bypass deep recursion, which is useful for diagnosing stack overflow issues in large or generated codebases <br><br>- Multiple error messages have been shortened, clarified, or made more precise for better user experience (e.g., TypedDict, protocol variables, unpacking errors, pydantic, descriptor defaults). |
| Performance Improvements | - Faster suggested standard library imports (did you mean...?) <br><br>- Reduced memory usage for type aliases of unions <br><br>- Further improvements to tracking for fine-grained dependencies, improving IDE performance during incremental rechecks and accuracy of features like auto-imports |
We closed 21 bug issues this release 👏
Any now fall back to Any instead of reporting missing-attribute.Self is now properly bound in class body expressions.--removed-unused-ignores incorrectly removed ignores from other type checkersisinstance now work correctly with unpacked tuples and type variablesTypeVars are now correctly inferred in Callable annotations without assignmentThank-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==0.51.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 Pyefly documentation
@rchen152, @stroxler, @migeed-z, @kinto0, @yangdanny97, @arthaud, @maggiemoss, @connernilsen, @grievejia, @samwgoldman, @rubmary, @fangyi-zhou, @AryanBagade, @bluetech, @ddrcoder, @javabster, @ndmitchell, @praskr-wisdom, @shayne-fletcher, @tsembp, @jvansch1, @tianhan0, @dtolnay
Nothing published for this version
Status : BETA *Release date: 26 January 2026*
Status : BETA
Release date: 26 January 2026
Pyrefly v0.50.0 bundles 183 commits from 27 contributors.
| Area | What’s new |
|---|---|
| Language Server | - Hovering or requesting signature help for constructor calls now shows the instance type instead of -> None <br><br>- Structured comment headers (e.g., # Title ----) now create hierarchical folding regions and outline symbols in editors. This can be enabled with the commentFoldingRanges setting that is now available in VSCode’s settings UI <br><br>- Go-to-definition now works for intermediate submodule components (e.g., clicking on b or c in a.b.c.D), improving navigation in complex module hierarchies <br><br>- Inlay hints now available for variables created from tuple unpacking (e.g. x, y = (a, b)) <br><br>- Type variable bounds, constraints, and defaults are now shown when formatting generic types. <br><br>- Previously, reveal_type showed identical signatures for functions with different type variable restrictions |
| Type Checking | Type narrowing now works for TypedDict when using in/not in checks, including inherited keys and empty TypedDicts |
| File Structure/Detection | Better support for detecting and renaming editable installed packages |
| Error Reporting | The suppress command now accepts JSON values, making error suppression more flexible and scriptable. |
We closed 30 bug issues this week 👏
__all__ are no longer incorrectly flagged as unusedThank-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==0.50.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 Pyefly documentation
@rchen152, @kinto0, @grievejia, @stroxler, @migeed-z, @yangdanny97, @connernilsen, @asukaminato0721, @maggiemoss, @rubmary, @samwgoldman, @Adist319, @arthaud, @AryanBagade, @jackulau, @self-sasi, @sgavriil01, @kv9898, @maifeeulasad, @maldoinc, @pawelstrzmeta, @robertoaloi, @jvansch1, @tianhan0, @dtolnay, Vladimir Matveev
Status : BETA *Release date: 20 January 2026*
Status : BETA
Release date: 20 January 2026
Pyrefly v0.49.0 bundles 231 commits from 25 contributors.
| Area | What’s new |
|---|---|
| Type Inference | - Partial type inference now possible in loops <br><br>- Variance inference for self-referential generic types (PEP 695) <br><br>- typing.Mapping now recognised as a type alias |
| Language Server | - Improved refactoring capabilities for moving module members and lifting local functions/methods to top-level module scope, with automatic import/shim creation. <br><br>- Hover support for in keyword when used in iteration contexts (for-loops and comprehensions), showing the type of the iterable being iterated over <br><br>- “Go to symbol” now correctly includes methods inside a class <br><br>- Enabled clickable inlay hints for built-in types like tuple, dict, str, and special forms (TypeVar, ParamSpec, etc.), allowing users to quickly navigate to type definitions in the IDE |
| Pydantic Support | Added detection and support for pydantic.dataclasses.dataclass decorator, including strict and lax mode support for pydantic dataclasses |
| Error Reporting | Improved error messages for yield, yield from, augmented assignment, missing imports, and missing stubs for better user clarity. |
We closed 38 bug issues this week 👏
inferred_variance instead of specified_variance for stdlib generic classes like Mapping[str, T].[*values]) in match/case statements.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==0.49.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 Pyefly documentation
@aaron-ang, @Adist319, @asukaminato0721, @connernilsen, @yangdanny97, @diliop, @fangyi-zhou, Jack, @grievejia, @jvansch1, @Karman-singh15, @kinto0, @arthaud, @ndmitchell, @rchen152, @samwgoldman, @Sehat1137, @stroxler, @tianhan0, @tannguyencse19, @migeed-z
Nothing published for this version
Nothing published for this version
Nothing published for this version
Status : BETA *Release date: 05 January 2026*
Status : BETA
Release date: 05 January 2026
Pyrefly v0.47.0 bundles 207 commits from 35 contributors.
| Area | What’s new |
|---|---|
| LSP Features | - Improved autocompletion for keys in .get() on TypedDicts <br><br>- Improved documentation in hover tooltips for attributes like dataclass fields <br><br>- Improved import handling: import X as X and from Y import X as X are now recognized as explicit re-exports and not flagged as unused imports. |
| Type Checking | - TypeIs calls now correctly narrow to the intersection of types instead of Never. <br><br>-Final attributes that are not initialized on the class are now enforced as such. Previously, Final was only enforced if the attribute was initialized on the class. <br><br>- Improved typing spec conformance by extending reassignment checks for variables declared as Final to additional binding constructs including unpacking, context managers, and loops. |
| Pydantic Support | - Support added for Annotated fields <br><br>- Pyrefly now validates BaseModel fields at instantiation, catching out-of-range arguments (e.g., Model(x=0) when x must be gt=0). |
| Error Types / Diagnostics | - New error codes non-exhaustive-match warns about incomplete match statements over Enums and unions of literals. <br><br>- New missing-override-decorator error that is emitted when a method overrides a parent class method but does not have the override decorator. This error is off by default and can be enabled in your .toml configuration <br><br>- Pyrefly now suggests the closest stdlib module name for mistyped imports (e.g., import jsn → Did you mean 'json'?). |
We closed 34 bug issues this release 👏
typing_extensions for typing module special callables._ is now correctly exported from custom builtins for i18n support.Forall types and method lookups.LiteralString and Collection.textDocument/didClose for notebooks and vice versa in the LSP server.object.__new__(C) which was previously incorrectly inferring the type as object.Literal values no longer inserts redundant quotes when completing inside a string literal.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==0.47.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 Pyefly documentation
@aleivag, @ArchieBinnie, @AryanBagade, @asukaminato0721, Bharath Sundararaj, Brian Chien, Cédric Barreteau, @connernilsen, @yangdanny97, @dtolnay, @fangyi-zhou, @gvozdvmozgu, @jackulau, @grievejia, @jvansch1, @Karman-singh15, @kinto0, @martindemello, @arthaud, @nikita-ashihmin, @nitinsingh-meta, @rchen152, @kitagry, @salmanmkc, @samwgoldman, @ska-kialo, @stroxler, Tatiana Ber, @tannguyencse19, @zanieb, @migeed-z
Nothing published for this version
Nothing published for this version
Nothing published for this version
Status : BETA *Release date: December 15, 2025*
Status : BETA
Release date: December 15, 2025
Pyrefly v0.46.0 bundles 125 commits from 19 contributors.
| Area | What’s new |
|---|---|
| Language Server | - Call Hierarchy support for the Pyrefly LSP server now implemented. This is a fundamental IDE feature that allows users to explore function call relationships in your IDE. <br><br>- Function documentation now available in signature help <br><br>- Signature help now uses single-line labels, thereby maintaining compatibility with editors that don't support multi-line labels while still keeping hover tooltips readable <br><br>- Variables defined in ALL_CAPS are now correctly highlighted as constants in VSCode and the website sandbox. |
| Type Checking | Implemented PEP 765 warnings. The checker now warns if return, break, or continue statements directly exit a finally block. Starting in Python 3.14, these statements emit a SyntaxWarning because they can silently mask exceptions. |
| Third Party Library Support | - Added third-party stubs for scipy, matplotlib, scikit-learn, scikit-image, vispy, sympy, pandas, conan, botocore, and boto3 to the Pyrefly bundle for better out-of-the-box support for these libraries. <br><br>- Support for Pydantic “lax mode”. Pyrefly can now model Pydantic’s lax runtime behavior more precisely. As a result, you may see new inferred types such as LaxInt and LaxBool in your IDE, representing the unions of input types that Pydantic accepts at runtime. |
| Errors / Debugging | Debug symbols are now included in release builds, enabling users to generate usable stack traces in crash reports |
We closed 14 bug issues this release 👏
__future__ imports being incorrectly flagged as unused, as they have necessary module-level side effects.numpy) missing the function name in the header when resolving from stub files.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==v0.46.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 Pyefly documentation
@javabster, @AryanBagade, @asukaminato0721, @connernilsen, @DanielNoord, @yangdanny97, @dearfl, @fangyi-zhou, Jack, @jvansch1, @kinto0, Liam, @arthaud, @rchen152, @samwgoldman, @stroxler, @tianhan0, @migeed-z
Nothing published for this version
Nothing published for this version
Status : BETA *Release date: 08 December 2025*
Status : BETA
Release date: 08 December 2025
Pyrefly v0.45.0 bundles 146 commits from 21 contributors.
| Area | What’s new |
|---|---|
| Type Checking | - For dict literals without a contextual hint Pyrefly will now infer an anonymous typed dict. This reduces false positives when unpacking a heterogeneous dict as kwargs. <br><br>- Better suggestions hints for name and attribute errors (e.g. suggesting fixes to one letter errors like my_variuble → my_variable). <br><br>- Callable types are now narrowed more intuitively, especially in isinstance checks. Callable Enums are also now supported <br><br>- New check added (defaults to warn) for comparisons where the result is predictable or the comparison inappropriate (e.g. True is False). Reflects basic support for Pyright’s reportUnnecessaryComparison and Mypy’s comparison-overlap check. |
| Language Server | Automatic file renaming improved to allow editable third party packages to be renamed |
| Third Party Package Support | - Support for Pydantic lax mode has been extended to include support for container types (lists, dicts etc.) <br><br>- All Django fields now support nullability, fixing issues with TextField and others <br><br>- Pyrefly will now correctly infer the signature for functions decorated with numba.jit and numba.njit |
We closed 19 bug issues this release 👏
LoopRecursive variables in type checking.__all__ is not implemented, now validating user-defined __all__ entries and emitting errors for missing module attributesThank-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==0.45.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 Pyefly documentation
@stroxler, @migeed-z, @rchen152, @yangdanny97, @samwgoldman, @connernilsen, @asukaminato0721, @kinto0, @grievejia, @arthaud, @AryanBagade, @lolpack, @ndmitchell, @gvozdvmozgu, @javabster, @KaranPradhan266, @jvansch1, @tianhan0, Owen Valentine, Vladimir Matveev
Nothing published for this version
Nothing published for this version
Status : BETA *Release date: 03 December 2025*
Status : BETA
Release date: 03 December 2025
Pyrefly v0.44.0 bundles 163 commits from 23 contributors.
| Area | What’s new |
|---|---|
| LSP / IDE | - Inlay hints are now clickable, allowing Go-To-Definition for class and type names (e.g., List or T) directly from the hint overlay. <br><br>- Completions are now disabled inside comments and string literals to reduce noise and improve user experience. |
| Type checking | - Recursive type solving logic was significantly refactored, enabling more reliable type inference and bug fixes around self-referential types. <br><br>- Bundled typeshed and third-party stubs have been updated, improving compatibility and type checking for more libraries |
| Pydantic/Dataclass | - Added support for Pydantic range constraints (e.g., pydantic.types.PositiveInt). <br><br>- New infrastructure introduced to better support Pydantic lax mode <br><br>- Support added for the Decimal type. |
| Error Handling | Error suppressions are now stricter, only applying when the suppression comment is on the start line, reducing false negatives |
We closed 11 bug issues this release 👏
Literal[...] tooltips when hovering over docstrings.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==v0.44.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 [Pyefly documentation](https://pyrefly.org/en/docs/error-suppressions/)
@arthaud, @asukaminato0721 , @connernilsen , @diliop , @fangyi-zhou , @grievejia , @gvozdvmozgu, @Imran-S-heikh, @javabster , @kinto0 , @kshitijgetsac, @migeed-z, @ndmitchell, @ogios, @rchen152, @simonhollis, @stroxler, @yangdanny97, Carlos Fernandez, @dtolnay, @jvansch1, @tianhan0
Nothing published for this version
Status : BETA *Release date: 24 November 2025*
Status : BETA
Release date: 24 November 2025
| Area | What’s new |
|---|---|
| IDE/LSP Features | - New warnings for unused imports and unused variables <br><br>- Pyrefly LSP features now apply to Python documents with the inmemory schema, improving support for interactive consoles and temporary code cells in IDEs like Positron. <br><br>- Added a configuration option to control whether "Go to definition" links appear in hover tooltips, enabled by default |
| Type Checker | Improved support for unpacking tuple[*Ts], fixing cases where unpacking would previously degrade to object If a TypeVarTuple-annotated varargs is unmatched, it now resolves to an empty tuple in all cases |
| Error Messages | - New --enabled-ignores command line flag and configuration option allow specifying exactly which tools’ ignore comments (e.g., # pyright: ignore) pyrefly respects <br><br>- CLI flags like --error, --warn, etc., now accept comma-separated lists, making it easier to enable or disable multiple error codes at once. |
| Pydantic Support | Improved handling of RootModel types, including nested and union scenarios. Basic support for Pydantic BaseSettings. Fields in BaseSettings are now treated as optional by default. |
We closed 17 bug issues this week 👏
TypedDicts with any required keys are now correctly treated as always truthy, allowing for proper type narrowing in boolean expressionsawait in nested generator expressions, preventing them from being incorrectly typed as Generator instead of AsyncGenerator.*args would show incorrect positions or duplicatestyping.Container), fixing an issue with type signature mismatch:=) appears in annotation positionstuple[()] | tuple[int, *tuple[int, ...]] to simplify to tuple[int, ...].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~=0.43.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 [Pyefly documentation](https://pyrefly.org/en/docs/error-suppressions/)
@javabster, @AryanBagade, @asukaminato0721, @austin3dickey, @yangdanny97, Dhruv Mongia, @fangyi-zhou, @Imran-S-heikh, @grievejia, @jvansch1, @keito, @kshitijgetsac, @kinto0, @arthaud, @nathan-liyiming, @rchen152, Ron Mordechai, @samwgoldman, @cybardev, @stroxler, @tianhan0, @vinnymeller, @migeed-z
Nothing published for this version
Nothing published for this version
Nothing published for this version
Status : BETA 🎉 *Release date: 17 Nov 2025*
Status : BETA 🎉
Release date: 17 Nov 2025
We’re thrilled to announce with this release that Pyrefly has transitioned from Alpha to Beta status! This marks a new chapter for the project, with increased stability, feature maturity, and readiness for broader adoption. When using a version of Pyrefly with Beta status you can feel confident that the IDE extension is ready for production use, while core type-checking features can be used, but be aware some edge cases are still being addressed as we make progress towards a later stable v1 release (bug reports welcome!).
These release notes will use a slightly different format than usual, covering the major highlights of the last 6 months that have contributed to this milestone.
TypedDict & Protocol Improvements: More accurate type checking for structural types, including handling for union keys and improved inheritance checks.LiteralString & TypeAliasType support, abstract class instantiation checks, unused awaitable checks, multiple inheritance consistency checks, and more!Check out the Pyrefly documentation for more details on how to use each of these features.
The Beta release is your invitation to start using Pyrefly in real-world projects, provide feedback, and continue helping shape its future. You do not need to change how you install and upgrade Pyrefly now that we are in Beta status, the same semantic versioning format will remain in place.
You can continue providing feedback as usual by opening a GitHub issue or joining our Discord server. In this new phase of development as we push towards our next milestone (a stable v1.0 release) we are particularly interested in hearing about how you are using Pyrefly in real production environments, including any edge cases you may encounter.
pip install --upgrade pyrefly==0.42.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:
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 Pyefly documentation
Going forward we’ll be continuing development work the same as usual with weekly releases of new features and bug fixes. However we will be closing out our Beta milestone and moving on to the next - a stable V1 Release. We’ll be continuing to listen to your feedback and address open issues, so if there are specific things you want to see in a stable release, or blockers for adopting Pyrefly in your project - let us know!
The following people have directly contributed at least once to the development of Pyrefly since our first Alpha release. Together we’ve closed almost 800 issues and made over 9,000 commits 😱 We want to sincerely thank everyone who has taken the time to make a contribution, large or small, and look forward to our continued collaboration on future releases.
@aahanaggarwal, @aaron-ang, @lolpack, @arosenber, @javabster, @abdallhfattah, Abel, @abhi-jha, @Adist319, Aditya Sinha, @Adamkaram, @ajaymiranda, @akmalsoliev, Alex, @Alex-Aron, @ahornby, Alexander Mols, Ali Tayyebi, @alokpr, @gvozdvmozgu, Anqi Wu, Arnav, @AryanBagade, @asukaminato0721, @krathul, Ben Carr, Brian Rosenfeld, @capickett, Carlos Fernandez, @charliecloudberry, @cclauss, @cjlongoria, @connernilsen, @cooperlees, Daniel Mueller, @yangdanny97, @darricklaidin, @dluo, @dtolnay, Dhruv Mongia, @kv9898, @diliop, @Dogacel, @ducdetronquito, Eric J Nguyen, @fangyi-zhou, @fatelei, @Zeko369, Grant Herman, @gvozdvmozgu, @hashiranhar, @fannheyward, @hugovk, @IDrokin117, @immanuel-peter, @InSyncWithFoo, @airvzxf, Ivan Loskutov, @jack-mcivor, @JakobDegen, @j-piasecki, @jagill, @jchanke, @grievejia, @jvansch1, @bigfootjon, Jun Hao, Kc Balusu, @CookieComputing, kitek, @krikera, @kshitijgetsac, @kinto0, Li Shen, lianne, LyricalToxic, @maggiemoss, @MarcoGorelli, @markmarkmarkthebest, @martindemello, @yamgent, @arthaud, @melvinhe, Miae Kim, @michaelcortese, Miyamoto Musashi, @mohesham88, @mrsobakin, Nathan Hawkes, @ndmitchell, @NSPC911, @oriori1703, Paul Iatchenii, @zpao, @pavelzw, @pawelstrzmeta, @prasannavenkateshgit, @pt2302, @rchen152, @regexyl, @ricardoleal20, @rchiodo, Ron Mordechai, @rubmary, @TheRustyPickle, @salvatorebenedetto, @samwgoldman, @SamChou19815, @sandeshbhusal, @sargun, @slawlor, @singiamtel, @stroxler, Takuma Iwaki, @Solumin, Thomas Polasek, @tianhan0, @Viicos, @VladimirMakaev, @WeixiMa, @Wilfred, Willy Lau, @xaskii, Xiaomin Liu, Yotam DK, @zachmullen, Zach Riser, @migeed-z, @LycheeBay, Zoltán Nagy, @zsol
Nothing published for this version
Nothing published for this version
Nothing published for this version
| Language Server | - Hover cards on variables now link to built in types. - Unused parameters are now flagged in IDE Deprecated functions now suggest…
Status : ALPHA
Release date: 10 November 2025
Pyrefly v0.41.0 bundles 166 commits from 22 contributors.
| Area | What’s new |
|---|---|
| Jupyter Notebook support | - Extensive improvements for language server support in Jupyter Notebooks including diagnostics (red squiggles), inlay hints, go-to-definition, hover, semantic tokens, signature help, and completions <br><br>- No extra configuration required to enable language server for notebook files (.ipynb), they are now included by default. |
| Type Checking | - Pyrefly now correctly models and narrows types for variables reassigned within loops, fixing several long-standing issues (#726, #747). <br><br>- Improved pattern matching support for certain built-in types, better aligning with typing specification <br><br>- More accurate type checking for TypedDicts with union keys |
| Language Server | - Hover cards on variables now link to built in types. <br><br>- Unused parameters are now flagged in IDE Deprecated functions now suggested below non-deprecated ones in auto-completions. <br><br>- Inlay hints are suppressed for variables with unknown or Any types to reduce noise in IDE |
| Error messages | - Users can now use --info=<error-code> command line flag to set error severity to info for specific error codes. <br><br>- Users can now filter summarized errors by specific error codes using pyrefly check --summarize-errors --only <error-code> |
We closed 15 bug issues this release 👏
bad-assignment error inside loop with dict.getbad-argument-type false positive when a parameter type was inferred as NeverNewType was not treated as a typeThank-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==0.41.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 Pyefly documentation
@aaron-ang , @alokpr, @AryanBagade, @asukaminato0721, @connernilsen, @yangdanny97, @dtolnay, @kv9898, @fangyi-zhou, @grievejia, @jvansch1, @kshitijgetsac, @maggiemoss, @arthaud, @ndmitchell, @rchen152, @rubmary, @stroxler, @VladimirMakaev, @migeed-z
Nothing published for this version
Status : ALPHA *Release date: 03 November 2025*
Status : ALPHA
Release date: 03 November 2025
Pyrefly v0.40.0 bundles 143 commits from 26 contributors.
| Area | What’s new |
|---|---|
| Language Server | - Go-to definition / hover to overloads on operators like == <br><br> - Fold on docstrings <br><br> - New LSP configuration arguments added allowing users to enable/disable specific IDE features like Go-to-definition, Autocomplete, and Hover tooltips. See docs here for details. <br><br> - Unreachable code will now be grayed out. <br><br> - Fixed bug with symlinked paths in VSCode |
| Type Resolution | Implemented a TypeCache to significantly optimize is_subtype queries by caching resolved types. This leads to faster type checks and a more responsive IDE experience. |
| Error Reporting | Introduced a new FindError that will inform a user when there is a stub available for a package that they do not have installed. The default severity level for this will be a warning. |
| Django Integration | Continued work on Django support, including improved type inference for lazy enum labels |
| Jupyter Notebook support | Basic type checking support (pyrefly check path/to/file.ipynb) now available for jupyter notebooks. Still very experimental, further improvements coming soon |
We closed 15 bug issues this release 👏
typing_extensions.dataclass_transform works correctly.TypedDict as Partial when unpacking one TypedDict into another and detect more open-unpacking errors.Var::ZERO during autocomplete by using deep_force to replace unsolved variables with Unknown.raise..from statements by correctly handling None when it appears in a unionThank-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==0.40.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 Pyefly documentation
@ndmitchell, @rchen152, @arthaud, @yangdanny97, @stroxler, @kinto0, @samwgoldman, @connernilsen, @grievejia, @tianhan0, , @rubmary, @nhawkes, @diliop, @migeed-z, @jvansch1, @vladima, @lolpack, @asukaminato0721, @dtolnay, @kv9898, @maggiemoss, @michaelcortese, Anqi Wu, Willy Lau
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per month.