release_notes/release-notes-v1.3.0-dev.3.md
Release date: August 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.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.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, @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.