NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1338 most downloaded on PyPI
A fast type checker and language server for Python with powerful IDE features
Last release 2 days ago
02 Oct 2026
Ships on a steady schedule
a new release about every 2 weeks
Most releases are documented
notes for 39 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
150 releases · first in 2025
One column per month.
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 t
Release date: October 1, 2026
About dev releases
Dev releases (versions likeX.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.4.0-dev.3 bundles 86 commits from 19 contributors.
This is a short snapshot — three days after v1.4.0-dev.2 — so it is a small release focused on unreachable-code reporting and language-server fixes.
except clauses that can never be entered, redundant exception classes inside a reachable except clause, and dead code after a call that never returns.lsp-types fork to gen-lsp-types 0.11.0.bad-return for a generator function annotated Iterator[X] | T.script rather than script.py, got no diagnostics in the editor. Their errors were computed and then dropped before publishing, because the default project-includes globs cannot match a path with no extension. These files are now reported, and they respect project-includes by matching as though they ended in .py.Never.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.4.0-dev.3Upgrading 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, @connernilsen, @rchen152, @kinto0, @asukaminato0721, @samwgoldman, @grievejia, @shobhitmehro, @jakevdp, @nitishagar, @shahhamdihassan, @arthaud, @Trighap52, @maggiemoss, @dantrapp, @tonyyuyiding, @MarcoGorelli, @igorsugak, @NarxPal
JAX stub support is still under development and is not yet available on PyPI. The JAX improvements below describe ongoing work in the repository rather than an installable stub package in this release.
svd shape typing is improved.jnp.cross no longer accepts 2D vectors.Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
Release date: September 28, 2026
Release date: September 28, 2026
About dev releases
Dev releases (versions likeX.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.4.0-dev.2 bundles 493 commits from 20 contributors.
X | None annotations with an unknown XPyrefly now decides whether | builds a type union from the type-form context of the expression, instead of from the types of its operands. Before this change, an annotation such as UnresolvedType | None (for example, when UnresolvedType comes from a missing import) was evaluated as plain Unknown, and the | None was silently dropped. Pyrefly now evaluates it as Unknown | None.
This is more correct, but it can surface new errors, such as missing-attribute on None, in code that uses unresolved types in Optional-style annotations. Please try this dev release and report any false positives. (#4846)
stdlib/VERSIONS file of a custom typeshed, and it notices when that file changes.with statements, branches that are decided by the type of their test, and except clauses that can never match.Strict types, such as StrictInt, now enable strict mode for the field.TypeVarTuple variance is now checked.NewType over an abstract class no longer produces a false-positive bad-instantiation error.pyrefly.toml file is added or removed, and Pyrefly rewatches files when an explicitly configured config file changes.initialize response now includes serverInfo.match value pattern, attribute completion now ranks enum members that earlier case arms already cover lower.column-ordered mode, and the language server matches baselines in batches.Any. See also the notable change above.Enum.value no longer widens a literal value to its base type (for example, to str).PrivateAttr) are no longer treated as frozen.pk the correct type when the primary key is a ForeignKey(..., primary_key=True).pyrefly suppress now writes # pyrefly: ignore[code] without a space before the bracket, which matches the documentation.__init__.Mapping in a ** dict unpacking.stubgen no longer keeps the full analysis of the whole import closure in memory.__get__ overload with a self type of Concatenate[ObjT, P1] and a sibling TypeVar now matches correctly.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.4.0-dev.2Upgrading 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, @connernilsen, @rchen152, @kinto0, @asukaminato0721, @samwgoldman, @jakevdp, @yeetypete, @MarcoGorelli, @grievejia, Abby Mitchell, @Pager-dot, @arthaud, @digvijaysai29, David Tolnay, @yangdanny97, @Aniketsy, @QEDady, @alexander-beedie, Alan Kurusingal
JAX stub support is still under development and is not yet available on PyPI. The JAX improvements below describe ongoing work in the repository rather than an installable stub package in this release.
IntVar[N] runtime wrapper supports dimension arithmetic. Bare *tuple[...] and *IntTuple splats are now accepted in shapes.random, lax, pad, split, expand_dims, and other operations, and the top-level jax namespace now has stubs.Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
Release date: September 18, 2026
Release date: September 18, 2026
About dev releases
Dev releases (versions likeX.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.4.0-dev.1 bundles 98 commits from 13 contributors.
uninitialized-instance-variable check reports instance attributes that may be read before assignment, including fields on dataclasses declared with init=False.functools.partial, independently pruned arguments, and writable callback variance.annotate() calls now add their declared attributes to the resulting queryset type.__self.We closed 3 bug issues this release 👏
__self, such as methods on loguru.Logger.dict, list, and set literals passed to mapped_column(default=...) and recommend default_factory instead.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.4.0-dev.1Upgrading 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, David Tolnay, @dependabot, @Kylei, @dedsec-terminal, Oleh Prypin, Gábor Varga, @jakevdp, @jasonnathanieln, @stroxler, @ndmitchell, @connernilsen, @asukaminato0721
JAX stub support is still under development and is not yet available on PyPI. The JAX improvements below describe ongoing work in the repository rather than an installable stub package in this release.
The current
einopsstubs are limited to Torch tensors. We are still exploring how to support multiple array packages.
ArrayLike inputs more broadly, with improved shape inference for linspace, logspace, and geomspace.torch.where and bare @torch.no_grad.pyrefly-shape-extensions now supports Python 3.10 and provides runtime markers for regular nested lists.Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
Release date: September 28, 2026
Release date: September 28, 2026
Pyrefly v1.3.2 is a patch release that fixes regressions in how Pyrefly infers the type of a variable after it is assigned a value of type Any.
Any:
Any (a value with no known type, such as the result of an unannotated function or an unresolved import) to an annotated variable once again produces Unknown. It no longer turns into an explicit Any.Optional[T] or T | None is narrowed to None and then reassigned inside that branch, Pyrefly no longer adds the annotation's None back after the branch. For example, x: Any | None followed by if x is None: x = get_any() now gives Any instead of Any | None.Any, assigning Any to it now narrows the variable to Any. For example, x: Any | None followed by x = x or get_any() now gives Any instead of Any | None, so later attribute access no longer reports a false missing-attribute error on None.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.3.2Upgrading 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.
Release date: September 14, 2026
Release date: September 14, 2026
Pyrefly v1.3.1 is a patch release with a single bug fix.
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.3.1Upgrading 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.
Release date: September 10, 2026
Release date: September 10, 2026
Pyrefly v1.3.0 bundles 934 commits from 71 contributors.
mock.patch targets, unsupported dataclass_transform arguments, incompatible Protocol.__call__ overrides, and unimplemented abstract methods. Pattern-match exhaustiveness, overload resolution, narrowing, and generic inference are also more accurate.assert x is not None. Inlay hints can also insert required imports and link to definitions.# type: ignore[pyrefly:<code>] suppresses a specific Pyrefly diagnostic without hiding unrelated errors on the same line.--replace-untyped-imports-with-any option replaces selected third-party packages that lack stubs or a py.typed marker with Any, and pyrefly init translates mypy's follow_untyped_imports setting automatically.--prune-baseline, and reject them in CI with --error-stale-baseline.pyrefly-numpy-stubs package brings shape checking to NumPy. These stubs use a new type-level shape DSL, which replaces the old @shaped_array API.Series and schema annotations. pandas columns= projections now preserve the requested schema as well.non-exhaustive-match-open-type error kind.hasattr, wide Literal unions, callable values, reverse tuple slices, and values assigned from Any.bad-dataclass-descriptor error kind.unittest.mock.patch are validated, with nonexistent attributes reported as missing-attribute-patch-target warnings.regex error kind.ForeignKey, OneToOneField, and ManyToManyField relationships in the same file, while Django REST Framework serializers avoid false override errors for common Meta and field patterns.update().values() checks values against mapped model fields.register_buffer and register_parameter.assert x is not None when an optional value needs narrowing.**kwargs: Unpack[TypedDict] more accurately.pyrefly.lspPath values now work correctly with Windows, home-relative, and workspace-relative paths.extraSearchPaths and extraProjectExcludes during initialization, improving integration with editors that manage their own import paths and excluded directories.pyrefly/typeErrorDisplayStatusChanged notification.getComputedType requests fell from 668 seconds to 3.4 seconds, while total request time fell from 671 seconds to 6.4 seconds.# type: ignore[pyrefly:<code>] comments suppress only the named Pyrefly diagnostic without hiding unrelated errors on the same line.type-ignore-unknown-tag-behavior option controls how tags belonging to other tools affect Pyrefly diagnostics: they can have no effect, downgrade diagnostics to warnings, or retain the legacy blanket-suppression behavior.replace-untyped-imports-with-any option replaces selected installed third-party packages with Any when they provide neither stubs nor a py.typed marker.pyrefly init automatically translates mypy's global and per-module follow_untyped_imports settings to the new option.baseline-matching-mode can match diagnostics by their column or concise description, reducing churn when unrelated code moves.baseline-format can write full metadata or a minimal representation containing only the fields needed for matching.baseline-error-level can expose matched diagnostics at info, warn, or error severity instead of hiding them, with baseline provenance included in text, JSON, SARIF, and summary output.--prune-baseline removes stale entries without recording new errors, while --error-stale-baseline lets CI reject a baseline containing obsolete entries.treat-all-caps-as-final option treats reassignment of ALL_CAPS names as a bad-assignment.pyrefly.toml using a PEP 440 version constraint.python-interpreter-find-command setting supports custom interpreter discovery.--output destinations with different formats can be specified in one CLI invocation.pants-pyrefly plugin.jax.lax.pyrefly-numpy-stubs package brings shape-aware checking to NumPy alongside the existing PyTorch support.@shaped_array API has been removed; custom shape annotations must migrate to IntTuple-generic classes and the V2 DSL.select, with_columns, group_by().agg(), joins, CSV readers, and lazy/eager conversion, with typed Series, nested and owned dtypes, and schema information from variables, calls, and TypedDicts.Annotated[DataFrame, Schema(...)] supports exact and open schema contracts, while the new column-schema-mismatch and duplicate-column errors catch invalid schemas and conflicting output columns before runtime.columns= now project their inferred schema onto the requested column set and order.We closed 88 bug issues this release 👏
__new__ method. Pyrefly now detects direct recursive __new__ targets.NamedTuple was defined inline inside a match statement. A dedicated MatchSubject binding key now prevents collisions.py.typed packages installed in site-packages now recognize the package's public names as re-exports.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.3.0Upgrading 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.
@shobhitmehro, @rchen152, @asukaminato0721, generatedunixname2066905484085733, @yangdanny97, @grievejia, @kinto0, generatedunixname949130641157030, @lyydsheep, @ndmitchell, @stroxler, generatedunixname89002005232357, @connernilsen, @jcarreiro, @patrickswedish, @randolf-scholz, @vincevannoort, @renz011tzar, @ak4-sh, @tobyh-canva, @KotlinIsland, @Sanjays2402, @alexander-beedie, David Tolnay, @javabster, @samwgoldman, @IBlackVoid, @nitishagar, @WilliamK112, @NathanTempest, @ytausch, @xaskii, generatedunixname1431085361989520, @a7or, @markselby9, @heejaechang, Willem Kokke, @dillydill123, @kakolla, generatedunixname1699489071355949, @ting-hong-shieh, @kavix, @Vishwaspatel2401, @danielgaskins, generatedunixname89002005307016, @fangyi-zhou, @MarcoGorelli, @thomaspolasek, @tague, @paranoa233, @d34db3ff, @AMR5210, @DarkNightForge, @ternaus, @austin3dickey, @cakeni, @lolpack, @jakevdp, @Pager-dot, @tkim602, @anishfyi, @mangeshraut712, @jorenham, @Pyxelate, @DetachHead, @kavyansh18, @rootkiller6788, @auscompgeek, Khan Mohammed, @KSAGlory, @devteamaegis
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
Release date: September 03, 2026
Release date: September 03, 2026
About dev releases
Dev releases (versions likeX.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.3.0-dev.4 bundles 198 commits from 23 contributors.
self and displaying hints for all user-visible parameters.__call__ method.replace-untyped-imports-with-any flag and config option now replace imports from third-party packages missing stubs or py.typed markers with Any, matching mypy's follow_untyped_imports behavior.follow_untyped_imports setting is now auto-migrated to the new replace-untyped-imports-with-any option.We closed 15 bug issues this release 👏
__tracebackhide__ as an unused variable, since pytest reads it implicitly when formatting tracebacks.self and aligning hints with actual parameters.missing-attribute errors, since slot enforcement no longer applies to subclasses that don't declare slots themselves.type[T] calls with custom metaclass returns to only substitute the constructor result with T when the inferred return is compatible with the bounded class, preserving unrelated metaclass __call__ return types.iter([0]) to infer Iterator[int] instead of Iterator[Any] by no longer using the generic Any bound from iter's signature to infer list element types.__all__ state sticky across later mutations, so append, extend, and remove calls preserve DunderAllKind::Unresolvable and star imports continue using fallback behavior.type(protocol_value) to produce type[Protocol] representing the unknown concrete runtime implementation, preventing false invalid-argument errors when used with isinstance.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.3.0-dev.4Upgrading 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, @samwgoldman, @grievejia, @jakevdp, @asukaminato0721, @kinto0, David Tolnay, @connernilsen, @ndmitchell, @DarkNightForge, @cakeni, @nitishagar, @shobhitmehro, @Pager-dot, @tkim602, @NathanTempest, @anishfyi, @mangeshraut712, @jorenham, @alexander-beedie, @Pyxelate, @yangdanny97
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
Importing a re-exported @deprecated class or function now produces a deprecation warning at the import site, not just at the original definition.
Release date: August 27, 2026
About dev releases
Dev releases (versions likeX.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.3.0-dev.3 bundles 285 commits from 33 contributors.
(self: A) -> None is not assignable to (self: A) -> None when the two sides genuinely differ.(int) -> str | None is no longer ambiguous.Any to a variable with a declared type no longer erases the annotation, so later checks on that variable keep working.Literal type hints are no longer discarded when solving generic calls, fixing false errors on Literal unions with more than four members.hasattr can now be deleted with del, and the narrowing is cleared afterwards so later reads correctly error again.TypeVar by a same-named type parameter in an enclosing scope is now detected and reported.match statements on tuple subjects now narrow to Never for exhaustiveness, so assert_never works on multi-subject matches.match statements is now available as an opt-in.__get__ is now applied when the attribute type is a union, rather than only for a single class.assert callable(x) now narrows to a callable returning Any instead of object, matching what the assertion is usually meant to express.map(), so map(lambda foo: ..., items) is type checked.TypeForm can no longer be used as a type annotation, matching mypy, pyright, and ty.**kwargs in a class header is now supported, with the unpacked fields validated against the class keywords.*args and **kwargs alongside known positional and keyword parameters are now checked against the keys the mapping actually provides.TypeVarTuple in a callable parameter now accounts for optional arguments, so passing only the required ones checks.enum.Flag unions now match typing.Self in methods and classmethods, so combining members with | and returning Self checks.[::-1]) of a fixed-length tuple now preserve the arity and the positional element types.@deprecated class or function now produces a deprecation warning at the import site, not just at the original definition.__all__.remove(...) is now taken into account when determining explicit exports, so removed names are no longer importable without an implicit-reexport error..so and .dll modules are now findable and treated as Any rather than failing to resolve.== comparison.regex error kind.Self __call__, a recursive TypedDict, a recursive type alias used in a subscript, and protocol member lookup reached through __getattr__.change_signature refactoring lets you edit a function's parameters and have call sites updated for you.pass behind where an import cannot simply be deleted.assert x is not None for an optional value, so you can narrow it without writing the assertion yourself.TypeVar or ParamSpec now also updates the string name argument in its constructor call.: or =.not now highlights the full unary expression instead of just the operator.__init__ call now jumps to the specific field."accounts.urls"..ipynb files on disk now get language server features too.pyrefly.lspPath VS Code setting is now resolved against the workspace root rather than the extension's working directory.bad-override errors for the inner Meta class pattern or for declared fields named like Field attributes.update() values are now checked against the mapped fields of the model, and SQL expressions are accepted in a values() call.Field() defaults now infer correctly against wide Literal annotations.self.register_buffer(...) and self.register_parameter(...) in a torch.nn.Module subclass are now recognized instead of reported as missing.python-interpreter-find-command setting lets you supply your own command for discovering the Python interpreter.pyrefly.toml can now enforce a required Pyrefly version at runtime, using PEP 440 constraints.pyvenv.cfg as the virtual environment itself; project discovery looks for conventional .venv, venv, and env children instead.site-packages no longer shadows Pyrefly's bundled stubs, which previously produced conflicting definitions of the same type.pyrefly init no longer emits redundant ignore-missing-imports entries alongside a global * wildcard when migrating a mypy configuration.from import statements are now ignored rather than panicking.pyrefly-numpy-stubs package provides shape-aware NumPy stubs, alongside the existing pyrefly-torch-stubs.We closed 28 bug issues this release 👏
TypeVar used as a type argument in a class base list produced a false invalid-type-var error saying the type variable was not in scope.Literal types with more than four members lost type inference, producing false errors on Pydantic Field() defaults and on any generic call given a wide Literal hint.TypeVar-typed keyword arguments depended on the order the arguments were written in, so the same call could check or fail depending on argument order.bad-override when a subclass assigned a matching function to a callable ClassVar inherited from its parent.enum.Flag methods that combine members with | and return typing.Self being reported as returning the wrong type.bad-override errors on Django REST Framework's ModelSerializer.Meta pattern, which is a configuration class rather than a true inheritance override.assert callable(x) narrowing too aggressively: calling the narrowed value now yields Any rather than object.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.3.0-dev.3Upgrading 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, @samwgoldman, @rchen152, @asukaminato0721, @grievejia, David Tolnay, @shobhitmehro, @connernilsen, generatedunixname1699489071355949, @ting-hong-shieh, @kavix, @WilliamK112, @lyydsheep, @Vishwaspatel2401, @ndmitchell, @markselby9, @danielgaskins, @kinto0, @NathanTempest, generatedunixname89002005307016, @fangyi-zhou, @javabster, @MarcoGorelli, @thomaspolasek, @tague, @paranoa233, @d34db3ff, @AMR5210, @DarkNightForge, @ternaus, @austin3dickey, @cakeni, @lolpack
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
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 t
Release date: August 17, 2026
About dev releases
Dev releases (versions likeX.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.3.0-dev.2 bundles 126 commits from 29 contributors.
__call__ are now checked for override consistency like any other method, catching incompatible signatures that would fail at runtime.TypeForm, fixing cases where valid type expressions were incorrectly rejected.no-any-return no longer fires on functions declared to return object, since all runtime values satisfy object.__init_subclass__ attributes are now detected, catching runtime errors when a class inherits from a parent with a non-callable __init_subclass__.object for TypeVars, tuple[()] for TypeVarTuples, ... for ParamSpecs) rather than always using Any.preset=auto default behavior.--output destinations with different formats can now be specified on the command line, enabling simultaneous output to multiple formats.--error-unused flag exits non-zero when the baseline contains unused entries, ensuring CI fails until the baseline is refreshed.--remove-unused flag rewrites the baseline with only entries that still match, allowing the set of suppressed errors to shrink without recording new ones.baseline-error-level configuration option, with provenance markers indicating which results matched the baseline.We closed 16 bug issues this release 👏
x: int followed by y = x incorrectly reported that x could not be found.datetime.datetime is now correctly recognized as a subtype of datetime.date, fixing false positives when dates and datetimes were used interchangeably.*args: *tuple[*Ts, Suffix] annotations now correctly track the variadic tuple shape during call matching, accepting arguments that match the prefix, middle, and suffix elements.__init__, fixing false errors when an annotation's type implements __get__ but no class-level descriptor exists.Literal types can now match TypeForm, fixing cases where valid type expressions were rejected.__all__ are now preserved even when a later dynamic append or extend cannot be resolved, fixing false implicit-reexport errors for names like torch.Tensor.init=False and required/optional status, fixing false errors when dataclass-transform field specifiers return descriptors.* marker, so args= becomes *args= in signature help.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.3.0-dev.2Upgrading 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, generatedunixname2066905484085733, @yangdanny97, David Tolnay, generatedunixname949130641157030, @javabster, @shobhitmehro, @asukaminato0721, @samwgoldman, @kinto0, @alexander-beedie, @grievejia, @connernilsen, @tobyh-canva, @IBlackVoid, @nitishagar, @WilliamK112, @lyydsheep, @NathanTempest, @ytausch, @patrickswedish, @xaskii, generatedunixname1431085361989520, @a7or, @markselby9, @heejaechang, Willem Kokke, @dillydill123, @kakolla
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
*Release date: August 06, 2026*
Release date: August 06, 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.3.0-dev.1 bundles 162 commits from 23 contributors.
Protocol as an instance of _ProtocolMeta in type checks, and Pyrefly correctly models Protocol using typeshed's _ProtocolMeta, making it assignable to ABCMeta.Sequence or other abstract base classes now correctly report when abstract methods remain unimplemented, even when the class doesn't directly extend ABC.type[type[X]] now uses the metaclass for more precise results instead of triggering internal errors.Any now preserve dynamic attribute access instead of converting to object, fixing false missing-attribute errors.list[T]() where T is unbound) now emit errors at the call site.metaclass=type declarations are now allowed.import statements automatically.Unknown as typing.Any to produce valid Python source.from foo import X style imports by default when possible, falling back to import foo only when the module is already imported that way.case _ wildcard now resolves to the match subject expression's type, not just the first token of the subject.**kwargs: Unpack[TypedDict] parameters, exposing each TypedDict field as a completable keyword argument.__call__ signature.__new__ to a callable, fixing constructor argument inference.df.with_columns(...) now infers each added or overwritten column's dtype from its Polars expression instead of leaving it Unknown.df.select(...) produces a precise column schema when its arguments are Polars expressions, not only plain column-name strings.df.group_by(...).agg(...) calls now infer a precise column schema, including grouping keys and aggregation outputs.pl.Series("a", [1]) now reveals Series[Int64] instead of the opaque Series class, carrying element dtypes forward.df.get_column(name) and df.to_series(index) now return typed Series[dtype] instead of an opaque Series.schema= whose column set doesn't match the data now report a clear column-schema-mismatch error.Final or Literal[str]) instead of requiring bare literals.TypedDict-typed value now infer columns from the TypedDict fields.df.lazy() and df.collect() now preserve the column schema across the conversion.pl.DataFrame[Schema] annotations now read the schema class's columns, so annotated parameters carry their schema into the function body.pl.read_csv and pl.scan_csv with inline schema= dictionaries now infer complete CSV schemas, and reader options like projections and overrides are applied.df.fill_null now models integer and float widening according to Polars runtime behavior.df[[]] (empty list subscript) now preserves the original schema instead of producing an empty schema.duplicate-column error.columns= now project the data onto the given column set and order.Pyrefly now understands reverse relationships between Django models in the same file:
ForeignKey, with the default <source>_set attribute or a custom related_name.OneToOneField relationships expose the source model directly on the reverse side.ManyToManyField relationships add a manager with the correct model type.related_name placeholders (class and app-label) are filled in, and disabled or malformed names create no attribute.dataclass_transform now rejects unsupported keyword parameters, as required by the typing specification.mock.patch string targets are now validated, reporting missing imports or attributes at the string literal location.mock.patch targets are reported as warnings under a new missing-attribute-patch-target error kind.# character, ensuring a valid UTF-8 boundary even after multibyte characters.ALL_CAPS variables as Final by enabling the treat-all-caps-as-final configuration option, which reports reassignment errors.--typeshed-path option now works correctly when checking typeshed's own stubs, deriving module names from <typeshed_path>/stdlib.We closed 14 bug issues this release 👏
__getattr__ or __getattribute__ were incorrectly rejected in protocol subtyping. Pyrefly now allows these fallback methods to satisfy protocol members, with special handling for class objects and certain dunders.Sequence or other abstract base classes now correctly report unimplemented abstract methods, even when the class doesn't directly extend ABC.__new__ method. Pyrefly now detects direct recursive __new__ targets.Key Anon already exists) when a NamedTuple was defined inline inside a match statement. A dedicated MatchSubject binding key now prevents collisions.raise inside a context manager that returns True from __exit__ no longer incorrectly narrows the type.classproperty or cached_classproperty had no type arguments. The match arm now checks for type arguments before unwrapping.A and True) no longer introduce placeholder narrowing operations, preserving the original narrowing behavior.# type: ignore comments. Unused-ignore diagnostics now underline the ASCII # character.__call__ signature.@total_ordering now recognizes non-synthesized rich comparison methods inherited through the class MRO, fixing false positives when __lt__ is defined in a base class.Type once up front, collapsing shared subtrees.Any now preserve dynamic attribute access instead of converting to object, fixing false missing-attribute errors.__new__ to a callable, fixing constructor argument inference.And more! #4430, #4417, #4387, #4315, #3678, #3334, #4380, #2313, #1130, #4388, #4386, #4390, #4399, #4443, #4455, #4457, #4464, #4447, #4436, #4441, #4442, #4451, #4452, #4456, #4458, #4460, #317, #1576, #4331, #4304, #4393, #4361
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.3.0-dev.1
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.
@shobhitmehro, @rchen152, @asukaminato0721, generatedunixname2066905484085733, @yangdanny97, @grievejia, @kinto0, generatedunixname949130641157030, @lyydsheep, @ndmitchell, @stroxler, generatedunixname89002005232357, @connernilsen, @jcarreiro, @patrickswedish, @randolf-scholz, @vincevannoort, @renz011tzar, @ak4-sh, @tobyh-canva, @KotlinIsland, @Sanjays2402, @alexander-beedie
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
Release date: September 16, 2026
Release date: September 16, 2026
Pyrefly v1.2.1 is a patch release with a single performance improvement.
getComputedType) used to solve the whole module from scratch in a throw-away transaction, then discard that work once the request finished. The solve is now committed to shared state when possible, so later requests for the same file reuse the earlier solve instead of repeating it. In a captured Pylance session with 43,811 getComputedType requests, median latency for non-open-file requests dropped from 16.9ms to 0.07ms, and total TSP request time for that session fell from about 671s to about 6.4s.pip install --upgrade pyrefly==1.2.1Upgrading 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.
Auto-import completions respect python.analysis.autoImportCompletions, rank deprecated stdlib typing aliases below their modern equivalents, avoid dup…
Release date: July 31, 2026
Pyrefly v1.2.0 bundles 901 commits from 59 contributors.
@attr.s, @define, @frozen, and their variants, handling field specifiers (attr.ib(), field()), converters, validators, defaults, and private-field aliasing. Converters are typed from their real input type rather than Any, including the @<field>.converter decorator, attrs.converters.pipe, attrs.converters.default_if_none, and generic converters like copy.deepcopy. See the new attrs documentation for details.functools.partial is now type-checked instead of treated as opaque. Bound arguments are validated at construction and Pyrefly synthesizes a precise residual signature for the remaining parameters, so errors surface at both the partial(...) call and the later invocation. Generic functions, overloads, constructors, bound methods, and **Unpack[TypedDict] parameters are supported, and results expose .func, .args, and .keywords. Precise residual callable assignment is enabled by the strict and all presets or explicitly with strict-partial-subtyping.functools.singledispatch now type-check calls using the signature of the function you decorated, and registered implementations are checked against that function's first parameter. Generic singledispatch functions infer from call arguments instead of reporting Unknown.Any, with separate diagnostics for explicit and inferred cases. Off by default, and migrated automatically from mypy's warn_return_any.__match_args__ at solve time, sequence element captures read from the narrowed subject so sibling constraints refine them, and isinstance on a facet filters the parent union to matching members. Fully covered class and sequence patterns now subtract their union member from later cases.a, *rest, b = t where t: tuple[int, *tuple[bool, ...], str] types rest as list[bool].__required_keys__ and __optional_keys__, so protocols requiring them (like those in langgraph) satisfy structural checks. .get() and .pop() with literal defaults preserve the field type.asyncio.to_thread..value on an enum type now infers as the union of member literal values instead of widening to the mixed-in data type.*args/**kwargs resolve from callable hints to tuple[...] and dict[str, ...] inside the body while preserving element types in the signature.if TYPE_CHECKING is handled consistently, typing_extensions.sentinel is supported with relaxed naming restrictions, and super(cls, cls) is accepted.copy.replace is now type-checked like dataclass replacement, and isinstance(x, type) preserves type arguments when narrowing unions.Self to a subclass now preserves Self, eliminating false return errors in methods that return the narrowed receiver.populate_by_name and built-in alias_generator functions, ignores Field(init=False) to match runtime, and treats frozen as a readonly field reason.ForeignKey targets now resolve attribute expressions and string references such as "app_label.Model", preserving the generated relation and <field>_id types.FactoryMetaClass.partial marker from py.typed and merges the stubs with the runtime package, deferring to the runtime package for omitted modules while preserving .pyi-before-.py precedence for provided ones.typeshed-path now supplies stdlib stubs as well as third-party stubs, enabling complete custom-typeshed testing and overrides.__call__ signature, preserves overload docstrings at call sites, shows enum fields, wraps nested callable and Concatenate[...] signatures for readability, and covers and/or operators, augmented assignments, and union methods.python.analysis.autoImportCompletions, rank deprecated stdlib typing aliases below their modern equivalents, avoid duplicates for already-imported modules, and preserve import aliases correctly.__init__..thrift, including nested attribute and enum access and intermediate components of multi-dotted imports.NewType values now use their callable constructor signature instead of producing an invalid type[N] annotation.SymbolInformation for clients such as Helix, semantic tokens cover with ... as and except ... as bindings, and cross-file diagnostics refresh on save in strict-spec clients such as Zed.#region/#endregion markers create folding regions, and selection ranges now follow AST nesting from expression to statement to scope to document.lspArguments defaults to ["lsp"] when empty, preventing startup failures in dev containers and remote environments.implicit-bool, invalid-cast, invalid-abstract-method, unused-call-result, empty-body, missing-super-call, unsupported-dynamic-base, implicit-reexport, unknown-argument-type, unknown-attribute-type, unknown-variable-type, implicit-any-lambda, untyped-function-decorator, untyped-class-decorator, unused-type-ignore, and no-any-return.--output-format=min-text flattens multi-line headers so each error stays on one line.--output-format=code-climate produces GitLab-compatible Code Quality reports, while full-text-with-github combines readable diagnostics with GitHub workflow commands and is now used by the Pyrefly action.pyrefly coverage is no longer marked experimental.[coverage] config table with includes and excludes can target a file set different from the project globs, with --project-excludes and positional FILES... taking precedence over it.--public-only keeps public re-exports from excluded files, so a symbol is only excluded when all of its public re-export locations are. Privately named classes and their members are excluded unless exported via __all__.--fail-under always prints findings whether or not the threshold is met.pyrefly infer --dry-run previews inferred annotations without modifying files and exits unsuccessfully when changes would be made, making it suitable for CI.python-platform accepts one platform, multiple platforms, or all platforms. Platform guards are folded only when every configured platform agrees.# pyrefly: ignore-errors[code] directives selectively suppress named error codes using the same parent-kind matching as line-level ignores.suppress command's --remove-unused=type mode also removes unused # type: ignore comments.--update-baseline validates the baseline after config resolution, so a baseline configured in pyproject.toml works without repeating --baseline.[tool.mypy] section instead of silently falling back to pyright, and TOML parse errors point at the offending value rather than the start of the file.TypeAlias right-hand sides and static __all__ literals are now preserved, so re-exports survive in the stub.ClassVar[...], and multi-line parenthesized expressions keep their parentheses, preventing IndentationError in generated stubs.def with AsyncGenerator return annotations, following the typeshed convention.Callable[..., Incomplete] instead of bare Incomplete, and statements guarded by conditions other than TYPE_CHECKING are no longer dropped.bazel-check command adds Bazel-focused type-checking for projects that provide source information through JSON manifests. It is intended to collaborate with the new rules_pyrefly Bazel rule project.pkgutil namespace probes are cached during import resolution.These may surface new errors or warnings in code that checked cleanly under v1.1.0.
isinstance narrowing now consumes dynamic uncertainty before intersecting with the target type, so x: Any narrowed by isinstance(x, C) refines to C instead of preserving the Any. This closes a type-safety hole while sacrificing the gradual guarantee in exchange for more precise runtime-evidence-based narrowing.# pyrefly: ignore-errors directive placed after code now emits a misplaced-ignore warning, directing users to move it into the file preamble or use a line-level suppression.direct-abstract-base-instantiation is now separated from bad-instantiation and is a warning by default.invalid-type-checking-constant is a new default error for user-defined TYPE_CHECKING constants that are not typed as bool.useless-overload-body is a new default warning for executable logic in @overload declarations, whose bodies are never executed at runtime.implicit-any-attribute now focuses on Any synthesized at an attribute assignment; propagated Any is reported separately as the off-by-default unknown-attribute-type, so per-code configurations may need updating.KW_ONLY markers, and invalid __init_subclass__ calls.TypeVars not assigned to their declared name, raw-string quoted types, defaults on self or cls, and super() in directly defined NamedTuple methods.We closed 137 bug issues this release 👏
isinstance() narrowing broke after an unrelated isinstance() check in a returning sibling branch, restoring correct narrowing behavior.TypeVar bounded by a heterogeneous tuple now preserves each positional element type instead of widening every element to their union.kw_only=True handling for SQLAlchemy-style declarative bases, preventing false "field without default may not follow field with default" errors in subclasses.enumerate() over tuple literals now preserves element types, so for i, x in enumerate(("a", "b")) types x as Literal["a"] | Literal["b"].bad-override error when a child class generic over a TypeVarTuple overrides a parent method with the same *args: *Ts signature.unannotated-return for @no_type_check functions.BaseModel fields named "self" are no longer incorrectly flagged on construction.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.2.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, @shobhitmehro, @yangdanny97, @asukaminato0721, @rchen152, @kinto0, @samwgoldman, @grievejia, @jorenham, @NathanTempest, @anushamukka-dev, @ericzhonghou, @connernilsen, @tobyh-canva, @aodihis, @nitishagar, @kz357, @WilliamK112, @mikeleppane, @markselby9, @goutamadwant, @brosenfeld, @alexander-beedie, @ak4-sh, @xaskii, @qnox, @QEDady, @oprypin, @MannXo, @javabster, @fangyi-zhou, @durvesh1992, @arthaud, @vivekjm, @VasuAgrawal, @teerthsharma, @SarahMKosowsky, @roian6, @Punisheroot, @paranoa233, @olekuhlmann, @ndmitchell, @magic-akari, @maggiemoss, @lesbass, @lennardwalter, @knQzx, @Kartikey077, @JakobDegen, @ibraheemshaikh5, @hrolfurgylfa, @fhoehle, @dillydill123, @DibbayajyotiRoy, @coclique, @arogozhnikov, David Tolnay, Myles Matz, pratved64
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
> 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: July 24, 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.2.0-dev.3 bundles 250 commits from 29 contributors.
__required_keys__ and __optional_keys__ attributes during attribute lookup, so protocols requiring these attributes (like those in langgraph) work correctly.@<field>.converter decorator (added in attrs 26.2.0) to define converters, and the converter's input type is correctly used for the __init__ parameter.attrs.converters.pipe now types the __init__ parameter as the first converter's input type instead of Any, so invalid constructor arguments are caught.attrs.converters.default_if_none now types the __init__ parameter as <field type> | None instead of Any, matching the converter's runtime behavior.copy.deepcopy) now solve their type variables against the field's declared type, so the __init__ parameter is correctly typed.converter=tuple on a Sequence[int] field types the parameter as Iterable[int]..select(), .drop(), .rename(), and .with_columns() operations now preserve and transform the DataFrame schema, keeping column information through method chains..filter(), .sort(), and .fill_null() operations now preserve the DataFrame schema unchanged, since they only affect rows.... in display), so known columns are type-checked while avoiding false positives from dynamic column operations.functools.partial now type-checks bound arguments and synthesizes a precise residual signature for the remaining parameters, catching errors at construction and call sites.functools.partial over generic functions now preserves type variables, so bound arguments can solve them and the residual stays generic.functools.partial over overloaded functions now resolves to the matching overload branches, so later calls still benefit from overload resolution.functools.partial over class constructors and bound methods now works correctly, checking arguments and producing the expected instance type.functools.partial results now expose .func, .args, and .keywords attributes and narrow correctly in isinstance checks.functools.partial over **Unpack[TypedDict] splats now expands the TypedDict fields and checks the residual parameters correctly..value on an enum type (not a specific member) now infers as the union of member literal values instead of widening to the mixin type.__match_args__ at solve time.isinstance checks on facets (like tuple elements or union members) now filter the parent union to matching members.# pyrefly: ignore-errors directives (placed after code) now emit a misplaced-ignore warning pointing users to move them to the top.import x as y, from x import y as z) are now classified as definition contexts, so completions don't suggest module paths for them.from model import MyModel as MyModelAlias statements.and/or operators now returns the enclosing boolean expression range for better context.__init__.textDocument/selectionRange) now follow AST nesting from expression to statement to scope to document, with support for #region/#endregion markers.#region/#endregion folding markers are now recognized (including nested regions and spaced # region), independently of comment-section folding.getComputedType, getDeclaredType, getExpectedType) now resolve correctly for files that aren't open in the editor.pyrefly.*) are now ignored when running as a type server (TSP mode), so stale extension settings don't interfere with Pylance.unknown-column error kind flags reads of DataFrame columns that don't exist in the known schema.column-type-mismatch error kind flags Polars column literals whose elements cannot share one dtype.implicit-reexport error kind (default: ignore) flags imports of names that are only available through plain import/from ... import (not explicit re-exports).invalid-type-checking-constant error kind flags user-defined TYPE_CHECKING constants that aren't assignable to bool.missing-super-call error kind (default: ignore) flags __init__, __new__, or __init_subclass__ methods that override a non-object parent without calling the parent method.empty-body error kind (default: ignore) flags ellipsis-only function bodies where None isn't assignable to the annotated return type.unused-call-result error kind (default: ignore) flags discarded function/method call results whose type is informative (not None, Any, or Never).invalid-abstract-method error kind (default: ignore) flags @abstractmethod decorators in non-abstract classes.full-text-with-github output format now emits readable diagnostics followed by GitHub workflow commands, so source locations remain visible in raw logs.DataFrame construction from dictionary literals now infers a complete schema with column names and types.df[["a", "b"]]) now narrow the schema to the selected columns in the requested order..select() narrows the schema to the named columns in the order given..drop() narrows the schema by removing the named columns while preserving the original order..rename() relabels columns in the schema, handling swaps correctly and falling back on ambiguous cases..with_columns() adds or overwrites columns in the schema, appending new names and preserving untouched columns."*" and regex patterns) are now recognized, so .select("*") and .drop("^col.*$") fall back instead of erroring.pyrefly coverage check --public-only now keeps public re-exports from excluded files, so symbols are only excluded when all public re-export locations are excluded.pyrefly coverage commands now accept a [coverage] config table with includes and excludes that override project globs, so coverage can be measured on a different file set.pyrefly coverage check --fail-under now always prints findings regardless of whether the threshold is met, so users see what's missing even when passing.pyrefly coverage now excludes privately-named classes (like _Foo) unless exported via __all__, consistent with other symbol kinds.[tool.pyrefly] section are now only considered root markers, so pyproject.toml files don't shadow parent configs unless they contain Pyrefly settings.--project-excludes flag now takes precedence over coverage.excludes, and positional FILES... args also override coverage globs.fallback_search_path, so __unknown__ files count under --public-only.We closed 48 bug issues this release 👏
bad-override error when a child class generic over a TypeVarTuple overrides a parent method with the same *args: *Ts signature.__required_keys__ and __optional_keys__ attributes, so protocols requiring these attributes (like those in langgraph) no longer fail structural checks.import json).@NNN variables from leaking into tooltips.enumerate() over tuple literals now preserves element types instead of widening to a generic tuple, so for i, x in enumerate(("a", "b")) types x as Literal["a"] | Literal["b"].#region/#endregion folding markers are now recognized (including nested regions and spaced # region), independently of comment-section folding.copy.deepcopy) now solve their type variables against the field's declared type, so the __init__ parameter is correctly typed instead of leaking a bare TypeVar.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.2.0-dev.3
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, @shobhitmehro, generatedunixname2066905484085733, @yangdanny97, @asukaminato0721, @kinto0, @anushamukka-dev, @samwgoldman, @rchen152, @NathanTempest, @jorenham, @aodihis, @tobyh-canva, @brosenfeld, @nitishagar, @goutamadwant, @grievejia, @roian6, @paranoa233, @kz357, @teerthsharma, generatedunixname949130641157030, @coclique, @SarahMKosowsky, @markselby9, @oprypin, @knQzx, @alexander-beedie, @ak4-sh
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
Deprecated stdlib typing aliases (e.g., typing.List) are now ranked below their collections.abc equivalents in auto-import completions.
Release date: July 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.2.0-dev.2 bundles 158 commits from 23 contributors.
functools.singledispatch now type-check calls using the signature of the function you decorated, catching argument errors like f("bad") when that function expects int. Registered implementations are also checked against that function's first parameter, so their dispatch types must be compatible.singledispatch functions now infer their generic types from call arguments instead of reporting Unknown.Any, with separate diagnostics for explicit and inferred Any returns. These warnings are off by default for backward compatibility; you can enable them explicitly, or let Pyrefly migrate the setting from mypy when warn_return_any is enabled.isinstance(x, type) now preserves type arguments when narrowing unions, so type[int] | str narrows to type[int] instead of bare type.type[Any] now make the decorated class behave dynamically, matching decorators that can substantially change the class at runtime.cls, fixing false missing-attribute errors on abstract base classes.Any/unknown items now invoke the container's __contains__ method and return bool instead of Unknown.copy.replace is now type-checked like dataclass replacement, so Pyrefly validates immutable updates more accurately.x: A | B; x.foo() correctly shows foo as a method when both A.foo and B.foo are methods.+= now shows the __iadd__ definition and type, or the right-hand side literal type when that is the best available information.c.x now show where the attribute's type was narrowed instead of unrelated first-use info.python.analysis.autoImportCompletions setting, skipping auto-imports when disabled.func(foo=1, ba|)), and statement keywords like try/while are no longer offered in expression contexts.typing.List) are now ranked below their collections.abc equivalents in auto-import completions.bazel-check command adds Bazel-focused type-checking for projects that provide source information through JSON manifests. It is intended to collaborate with an in-progress rules_pyrefly Bazel rule implementation.nn.Module.__call__ type-check like the module's forward method.SizeTuple is now the public way to write shape parameters, with support for compact syntax like ndarray[[2, 3], dtype] and unpacking with *Elements[SizeTuple].SizeTuple, making it easier to model APIs involving multiple tensors with different shapes.SymVar, written as N: SymVar in PEP 695 syntax. Shape arithmetic is now limited to these symbolic shape variables.We closed 26 bug reports this release 👏
isinstance(value, type) narrowing for type[int] | str unions, which previously collapsed to bare type instead of preserving type[int].isinstance(value, type) narrowing for TypeForm[object], which previously produced type & TypeForm[object] instead of the correct type[int] after an issubclass check.isinstance(cls, type) and issubclass(cls, upper_bound) checks erasing TypeVar information, so type[F] is preserved through assertion chains instead of widening to the bound.no-any-return error kinds to detect returning Any from functions declared to return concrete types, with explicit and implicit variants and support for migrating mypy's warn_return_any setting.pyrefly coverage check --strict incorrectly labeling fully-Any symbols (e.g., def f(x: Any) -> Any) as coverage-partial instead of coverage-missing.pytorch-efficiency-lints not recognizing Tensor in common stub layouts.tuple(xs) losing track of tuple length when xs is already a tuple, now preserving known shapes like tuple[int, int] instead of widening to tuple[int, ...].__class__.__setattr__ on a class object, caused by missing metaclass handling.TypeVarTuple arguments like tuple[int, *Ts] not being assignable to varargs type tuple[int, *Ts] due to an internal mismatch in how Pyrefly represented the tuple types.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.2.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 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, @shobhitmehro, @asukaminato0721, @jorenham, @kinto0, @yangdanny97, David Tolnay, @ericzhonghou, @connernilsen, @qnox, @mikeleppane, @dillydill123, @arthaud, @alexander-beedie, @NathanTempest, @fhoehle, @WilliamK112, @xaskii, @durvesh1992, @lennardwalter, @kz357, @nitishagar
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
> 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: July 1, 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.2.0-dev.1 bundles 235 commits from 38 contributors.
@attr.s, @define, @frozen, and their variants, handling field specifiers (attr.ib(), field()), converters, validators, defaults, and private-field aliasing. See the new attrs documentation for details.isinstance narrowing now consumes dynamic uncertainty before intersecting with the target type, so x: Any narrowed by isinstance(x, C) refines to C instead of preserving the Any. This closes a type-safety hole while sacrificing the gradual guarantee in exchange for more precise runtime-evidence-based narrowing..get() and .pop() methods with literal defaults now preserve the field type when the default is assignable to it, so .get("x", "b") on a Literal["a", "b"] field returns Literal["a", "b"] instead of Literal["a", "b"] | str.SymbolInformation list with dotted container names.with ... as and except ... as, so those variables are syntax-highlighted consistently with other local bindings..thrift) now navigates directly to the symbol definition via text search instead of the top of the file, and works for nested attribute/enum member access.# type: ignore comments that suppress no errors, helping clean up stale suppressions (off by default; enable with unused-type-ignore = "error" in pyrefly.toml).(...) when emitted, preventing IndentationError in the generated stubs.Callable[..., Incomplete] instead of bare Incomplete, preserving callability information.ClassVar[...] in emitted stubs, correctly distinguishing them from instance attributes.__all__ is now preserved verbatim when it's a static list/tuple literal, so re-exports survive in the stub.def with AsyncGenerator return annotations instead of async def, following the typeshed convention and fixing coroutine-vs-generator confusion.pyrefly-shape-extensions and pyrefly-torch-stubs packages are now published to PyPI alongside Pyrefly releases, providing runtime helpers and shape-aware PyTorch stubs for tensor shape type checking.D[N] or D(N) runtime wrappers for dimension expressions, allowing evaluated annotations to survive Python runtime while preserving symbolic arithmetic.assert_shape runtime helper validates tensor shapes at runtime, falling back to rank-only checks for symbolic shapes.We closed 20 bug issues this release 👏
isinstance narrowing silently stopped working after a sibling branch in the same if/elif/else chain narrowed a different variable and terminated. The lazy-builtins optimization incorrectly lifted isinstance into the fork base, producing a degenerate Phi that resolved to Never and broke downstream narrowing.self: annotations reference the protocol itself. A new per-thread cycle guard prevents infinite recursion during overload filtering.Z: tuple[str, int]) now preserves positional element types instead of collapsing to a union. u, v = x where x: Z now reveals u: str, v: int instead of u: int | str, v: int | str..get(key, "literal") on a non-required key now returns the field type when the literal default is assignable to it, instead of widening to field_type | str.@no_type_check no longer emit unannotated-return diagnostics, since the decorator explicitly opts the function out of type checking."self" are no longer incorrectly flagged with bad-keyword-argument and bad-argument-type on construction. The instance receiver is now named __dataclass_self__ when a field named self exists.kw_only=True now correctly apply the keyword-only constraint to subclass fields, fixing false "field without default may not follow field with default" errors.match f(x):) now carry direct fallthrough narrows across cases, and the final capture forwards to the already-evaluated subject narrowed by previous cases.py.typed marker no longer trigger untyped-import recommendations, even when imported as submodules.typings/ directory under the config root is now auto-discovered on the CLI path (not just in the IDE), fixing a divergence where CLI and IDE had different stub search paths for the same config.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.2.0-dev.1
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, @shobhitmehro, @yangdanny97, @jorenham, @grievejia, generatedunixname2066905484085733, @connernilsen, @asukaminato0721, @samwgoldman, generatedunixname949130641157030, @kinto0, @NathanTempest, @ericzhonghou, @rchen152, @javabster, @QEDady, @mikeleppane, @markselby9, @aodihis, @arthaud, @DibbayajyotiRoy, Myles Matz, @ndmitchell, David Tolnay, @Kartikey077, pratved64, @maggiemoss, @goutamadwant, @kz357, @nitishagar, @hrolfurgylfa, @olekuhlmann, @JakobDegen, @lesbass, @fangyi-zhou, @ibraheemshaikh5, @alexander-beedie, @xaskii
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
Pyrefly v1.1.1 is a patch release with a single bug fix.
Release date: June 18, 2026
Pyrefly v1.1.1 is a patch release with a single bug fix.
isinstance() narrowing of a union variable silently stopped working when an earlier sibling branch in the same if/elif/else chain narrowed a different variable with isinstance() and returned. The later narrowing left the union untouched, producing false missing-attribute errors on code that checked correctly in 1.0.0.Thank-you to all our contributors who found these bugs and reported them! Did you know this is one of the most helpful contributions you can make to an open-source project? If you find any bugs in Pyrefly we want to know about them! Please open a bug report issue here.
pip install --upgrade pyrefly==1.1.1
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.
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.
> 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.
Your coding agent can read these notes before it upgrades. Set up the MCP server →