Repository navigation
Releases
Pyrefly v1.4.1
Release date: November 4, 2026
Pyrefly v1.4.1 is a patch release that fixes bugs in pyrefly coverage. With these fixes, you can use pyrefly coverage check as a pre-commit hook (pyrefly-coverage-check in pyrefly-pre-commit).
🐛 Bug fixes
- #5492:
pyrefly coveragenow gives the same result on every run. Before, an attribute that inherits its annotation from a base class in another module could be reported as typed on one run and untyped on the next. - #5362:
pyrefly coverage reportno longer panics when a pager or another program closes the output pipe early. - #5330:
pyrefly coverageno longer reports an excluded function or class (for example, one decorated with@type_check_onlyor@no_type_check) as an untyped variable when a module-level loop follows it. - #5383:
pyrefly coveragenow counts a variable as typed when its value is an explicitly parameterized constructor call, such asx = set[int]().
✨ Improvements
- #5329:
pyrefly coverageunderstands Cython pure Python mode declarations in.pyfiles. pyrefly coverageskips the solver for annotations that are absent or already solved, which makes it faster on large projects.
Thank-you to all our contributors who found these bugs and reported them! Did you know this is one of the most helpful contributions you can make to an open-source project? If you find any bugs in Pyrefly we want to know about them! Please open a bug report issue here.
📦 Upgrade
pip install --upgrade pyrefly==1.4.1How to safely upgrade your codebase
Upgrading the version of Pyrefly you're using or a third-party library you depend on can reveal new type errors in your code. Fixing them all at once is often unrealistic. We've written scripts to help you temporarily silence them. After upgrading, follow these steps:
pyrefly check --suppress-errors- Run your code formatter of choice
pyrefly check --remove-unused-ignores- Repeat until you achieve a clean formatting run and a clean type check.
This will add # pyrefly: 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.5.0-dev.1
Pyrefly v1.4.0
Release date: October 14, 2026
Pyrefly v1.4.0 bundles 1191 commits from 66 contributors.
Release Highlights
Language Server
- The VS Code extension now runs the Pyrefly from your environment. By default, the extension launches the Pyrefly installed in your active Python environment (for example, your project's
.venv), so your editor and your command line use the same version. If the environment has no Pyrefly, the extension falls back to its bundled binary. Setpyrefly.pyreflyExecutabletobundledto keep the old behavior. See Pyrefly binary selection.
Configuration & CLI
- uv workspace members are now type checked. In a uv workspace, the interpreter puts each member's source directory on
sys.pathas an editable install. Pyrefly treated those directories as installed packages and skipped them, so errors in workspace members went unreported. Pyrefly now checks editable sources inside your project, while regularsite-packagesstay excluded.
Type Checking
- Easier migration from BasedPyright. Pyrefly reads
basedpyrightsections inpyproject.tomland applies the matching type checking mode preset. - New opt-in checks for untyped code. New error kinds such as
unknown-attribute-access,unknown-return-type,untyped-function-decorator, anduninitialized-instance-variablehelp you find whereAnyenters your code.
Tensor Shapes
- JAX shape stubs on PyPI. This is the first stable release that ships JAX shape stubs as the
jax-pyrefly-stubspackage.
⚠️ Behavior Changes
These may change your editor setup or surface new errors in code that checked cleanly under v1.3.0.
- The VS Code extension now uses the Pyrefly in your active environment by default instead of its bundled binary. If your environment pins an older Pyrefly, the editor now runs that version. The Pyrefly language server output channel shows which binary was chosen and why.
- Pyrefly now checks the source of uv workspace members (editable installs inside your project). Errors in those packages that were hidden before can now appear.
--typeshed-pathnow replaces the bundled typeshed entirely instead of overlaying it.- The
incompatible-overload-residualerror kind is renamed toincompatible-overload-argument. The old name still works as a deprecated alias. site-package-pathis renamed tosite-packages-path. The old name still works.
✨ New & Improved
Type Checking
- Pyrefly now recognizes
basedpyrightconfiguration sections inpyproject.tomland applies appropriate type checking mode presets, making it easier to migrate from BasedPyright. - TypedDict handling has been significantly improved: generic
extra_itemsare now instantiated correctly, extra items can supply missing arguments, anddefinitely_seencalculation in callable checking has been fixed. - TypeVar restriction checking is now enforced even when the expected type is gradual, preventing silent violations of TypeVar bounds and constraints when
Anyappears in the expected type. - Improved handling of overloaded function arguments in generic function calls through a new overload table mechanism, replacing the previous residual-based approach. The
incompatible-overload-residualerror kind has been renamed toincompatible-overload-argument(the old name remains as a deprecated alias). - Variance inference has been improved with fixes for nested variance reliability bugs and explicit stored variance evidence.
- Property decorator validation now reports invalid signatures with extra required parameters.
- Added opt-in
uninitialized-instance-variablecheck for annotated instance attributes never assigned in__init__or class body, including@dataclass(init=False)fields. - Improved higher-order function call handling with quantified finalization and better overload branch capture.
functools.partialnow uses standard quantified finalization and handles generic overload targets.- Improved ParamSpec variance in generic comparisons and handling of generic callable residuals.
- Added support for propagating divergence through compound statements to detect unreachable code after
if/elseblocks where all paths diverge. - Added support for evaluating
sys.version_infocomparisons against tuples with release levels like(3, 14, 0, "beta").
Type Checking Fixes
- Overload evaluation now forces per-overload argument types before rolling back variables, so variables are no longer pinned by accident.
- Overload evaluation step 5 (argument materialization) now runs for implicit descriptor
__get__calls. - Invalid
type(...)calls in annotations now suggest valid type forms liketypes.NotImplementedType,types.EllipsisType,None,types.ModuleType, ortype[MyClass]. - Invalid function calls in return annotations now produce clearer error messages.
- Unknown unions in class bases now accept valid known classes while recording dynamic bases.
- Conditionally imported base classes now keep the known class while recording a dynamic base.
- Tuple constructor type variables no longer leak when the constructor is passed as a higher-order factory callable.
- Overloaded constructors no longer leak type parameters through gradual arguments.
- Version-gated returns now preserve configured reachability.
- Environment-dependent branch tests (like
TYPE_CHECKING = False) no longer report their suites as unreachable. - Descriptor setter override checking now checks every overload.
- Module resolution now honors first-match-wins between single-file modules and packages in later roots.
Nevercontainers (list[Never],dict[Never, Never], etc.) are now recognized as falsy.- Unpacking an overloaded tuple now combines branches position by position.
- Assigning to an overloaded type now succeeds when the value fits any branch.
- Facet narrowing now narrows overloaded values by ruling out branches.
- Attribute access and subset checks on overloaded types are more accurate.
- Overload selection now ignores type variables that appear only in the return type.
- Overloads that violate TypeVar restrictions under a gradual expected type are now rejected.
- Return type variables of overloaded protocol methods in invariant classes are now handled correctly.
- Union type arguments in indirect diamond inheritance are now compared without regard to member order.
max/mincalls withkey=anddefault=no longer report argument errors from rejected union hint members.- Attribute facets are now rebased correctly when the base type is replaced.
Annotatedmetadata is no longer type checked, which removes spurious errors.- Methods typed as a union with
Any, or whose decorator returnsT | Any, now bind correctly. - A custom
__new__inherited from an intermediate NamedTuple subclass is now handled correctly. - Identity and membership tests with an
Anyoperand now inferbool. - Soft errors no longer drive constructor, default, and decorator checks.
- A
python-versionbelow 3.5 is now rejected with an error instead of crashing.
Language Server
- The VS Code extension now launches the Pyrefly installed in your active Python environment by default, and falls back to the bundled binary. A new
pyrefly.pyreflyExecutablesetting (from-environmentorbundled) controls this. Selecting a different interpreter restarts the server with the new binary when it changes. - Pyrefly now watches explicit
configPathsettings and reloads configuration when those files change. - Hover now prefers interface (
.pyi) docstrings over implementation (.py) docstrings when both exist. - Go-to-definition for standard library symbols now searches the interpreter's stdlib for
.pyfiles. - Go-to-definition now prefers stub definitions over unresolved
__all__entries and handles re-export cycles. - Go-to-definition now works for TypedDict subscript keys.
- LSP rename now includes attribute assignments and deletions across files.
- Added LSP quick-fix code action for removing unused ignores.
- Added LSP registration for
workspace/didChangeConfigurationonpythonsection. - Fixed language server to answer startup requests with workspace settings instead of defaults.
- Fixed language server deadlock when configuration response triggers file watcher registration.
- Added TSP
pyrefly/typeFactsrequest for batch type queries. - Fixed TSP
--configto pin config for every file. - Added code action videos to IDE features documentation.
- Fixed attribute definition index recording for assignment and deletion targets in rename.
- Added object attributes to LSP attribute completion, ranked after class attributes.
Callableclass attributes now bindselfwhen first parameter is the containing class.
Polars Support
selectandwith_columnsnow handle both positional and keyword arguments correctly, preserving schema information.- Added validation for Polars conditional predicates, duplicate
with_columnsoutputs, and sole-argument list expansion rules. - Improved Polars column-width tracking with
OutputCountenum to distinguish provable width from unknown width. - Added support for Polars
pl.col.attribute completion, suggesting columns from the enclosing DataFrame operation. - Added validation for column names in Polars
filter,sort,unique, anddrop_nullsmethods.
Django Support
QuerySet.annotate()now preserves keyword annotation attributes on result rows for attribute lookup and LSP completion.- Fixed Django relation
to=keyword argument resolution. - Fixed Django
ForeignKeykeyword-formto=resolution.
Configuration & CLI
- uv workspace members (editable installs inside the project) are now checked instead of being excluded as site...
Pyrefly v1.4.0-dev.4
Pyrefly v1.4.0-dev.3
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.
✨ New & Improved
Type Checking
- Unreachable-code reporting continues to expand: Pyrefly now reports
exceptclauses that can never be entered, redundant exception classes inside a reachableexceptclause, and dead code after a call that never returns.
Language Server
- Pyrefly migrated from its
lsp-typesfork togen-lsp-types0.11.0. - Baselines now have the option to automatically remove fixed baselined errors on file save.
Other
- Build-system-supplied configuration is better documented, and module finder options moved into a struct.
- Agent invocation metadata is now shared and used for error telemetry.
🐛 Bug fixes
- #4825: Fixed a false
bad-returnfor a generator function annotatedIterator[X] | T. - #5073: Fixed a series of unreachability bugs that made it into the last release.
- #4668: Extension-less Python scripts, such as a shebang script named
scriptrather thanscript.py, got no diagnostics in the editor. Their errors were computed and then dropped before publishing, because the defaultproject-includesglobs cannot match a path with no extension. These files are now reported, and they respectproject-includesby matching as though they ended in.py. - An unsaved file is now checked as the language the editor reports it to be, rather than always being assumed to be Python.
- An assignment to a field inherited from a frozen Pydantic model is now checked. The assigned value was skipped, so a type mismatch went unreported and the attribute narrowed to
Never. - The right-hand side of an attribute assignment is now always inferred. It was sometimes skipped, which hid errors in the assigned expression.
Thank-you to all our contributors who found these bugs and reported them! Did you know this is one of the most helpful contributions you can make to an open-source project? If you find any bugs in Pyrefly we want to know about them! Please open a bug report issue here.
📦 Upgrade
pip install --upgrade pyrefly==1.4.0-dev.3How 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.
🖊️ Contributors this release
@stroxler, @connernilsen, @rchen152, @kinto0, @asukaminato0721, @samwgoldman, @grievejia, @shobhitmehro, @jakevdp, @nitishagar, @shahhamdihassan, @arthaud, @Trighap52, @maggiemoss, @dantrapp, @tonyyuyiding, @MarcoGorelli, @igorsugak, @NarxPal
🔬 Tensor Shape Support
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.
- JAX
svdshape typing is improved. jnp.crossno longer accepts 2D vectors.
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
Pyrefly v1.4.0-dev.2
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.
⚠️ Notable change: X | None annotations with an unknown X
Pyrefly 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)
✨ New & Improved
Type Checking
- Pyrefly now respects the
stdlib/VERSIONSfile of a custom typeshed, and it notices when that file changes. - Build systems can now supply a default configuration.
- Unreachable-code reporting is more precise: Pyrefly reports dead code after a run of
withstatements, branches that are decided by the type of their test, andexceptclauses that can never match. - Pydantic
Stricttypes, such asStrictInt, now enable strict mode for the field. TypeVarTuplevariance is now checked.NewTypeover an abstract class no longer produces a false-positivebad-instantiationerror.
Language Server
- The status indicator refreshes when a
pyrefly.tomlfile is added or removed, and Pyrefly rewatches files when an explicitly configured config file changes. - The TSP
initializeresponse now includesserverInfo. - In a
matchvalue pattern, attribute completion now ranks enum members that earliercasearms already cover lower. - Baseline matching supports a new
column-orderedmode, and the language server matches baselines in batches.
Other
- Pyrefly now has an experimental programmatic API for Monty.
- When some warnings are hidden, the message now explains how to show them.
- Memory usage and commit latency in the incremental state are improved.
🐛 Bug fixes
- #4846: Fixed regressions from v1.3.0 in type inference after a variable is reassigned to
Any. See also the notable change above. - #4858, #4618:
Enum.valueno longer widens a literal value to its base type (for example, tostr). - #4400: Pydantic private attributes (
PrivateAttr) are no longer treated as frozen. - #4995: Django models now give
pkthe correct type when the primary key is aForeignKey(..., primary_key=True). - #4991:
pyrefly suppressnow writes# pyrefly: ignore[code]without a space before the bracket, which matches the documentation. - #4986: Hover now works on attribute assignments in
__init__. - #4813: Pyrefly no longer rejects a duck-typed
Mappingin a**dict unpacking. - #4650:
stubgenno longer keeps the full analysis of the whole import closure in memory. - #4592: A
__get__overload with a self type ofConcatenate[ObjT, P1]and a siblingTypeVarnow 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.
📦 Upgrade
pip install --upgrade pyrefly==1.4.0-dev.2How 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.
🖊️ Contributors this release
@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
🔬 Tensor Shape Support
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.
- Torch shape stubs cover much more of the public API, including more pointwise, reduction, indexing, FFT, pooling, convolution, and attention operations, and they report unknown top-level Torch APIs.
- A new
IntVar[N]runtime wrapper supports dimension arithmetic. Bare*tuple[...]and*IntTuplesplats are now accepted in shapes. - JAX and NumPy stubs have improved shape inference for
random,lax,pad,split,expand_dims, and other operations, and the top-leveljaxnamespace now has stubs.
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
Pyrefly v1.3.2
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.
🐛 Bug fixes
- #4846: Fixed several regressions from v1.3.0 in type inference after a variable is reassigned to
Any:- Assigning an implicit
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 producesUnknown. It no longer turns into an explicitAny. - When a variable annotated as
Optional[T]orT | Noneis narrowed toNoneand then reassigned inside that branch, Pyrefly no longer adds the annotation'sNoneback after the branch. For example,x: Any | Nonefollowed byif x is None: x = get_any()now givesAnyinstead ofAny | None. - When a variable's annotation is a union that contains
Any, assigningAnyto it now narrows the variable toAny. For example,x: Any | Nonefollowed byx = x or get_any()now givesAnyinstead ofAny | None, so later attribute access no longer reports a falsemissing-attributeerror onNone.
- Assigning an implicit
Thank-you to all our contributors who found these bugs and reported them! Did you know this is one of the most helpful contributions you can make to an open-source project? If you find any bugs in Pyrefly we want to know about them! Please open a bug report issue here.
📦 Upgrade
pip install --upgrade pyrefly==1.3.2How 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.
Pyrefly v1.4.0-dev.1
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.
✨ New & Improved
Type Checking
- A new opt-in
uninitialized-instance-variablecheck reports instance attributes that may be read before assignment, including fields on dataclasses declared withinit=False. - Overload inference now handles generic call targets and callable fallbacks more precisely, including
functools.partial, independently pruned arguments, and writable callback variance. - Property getters, setters, and deleters with extra required parameters now report invalid signatures when the decorator is applied.
- Unaliased directory imports now bind the imported name correctly, and source files nested beyond the configured analysis depth are rejected cleanly.
- Django
annotate()calls now add their declared attributes to the resulting queryset type.
Language Server
- Hover information now prefers interface docstrings when available and falls back consistently to implementation docstrings across imports.
- Parameter-name inlay hints now align correctly for bound methods whose receiver is named
__self.
🐛 Bug fixes
We closed 3 bug issues this release 👏
- #4918: Property decorators now reject getters, setters, and deleters with extra required parameters instead of silently accepting invalid signatures.
- #4936: Fixed shifted parameter-name inlay hints for bound methods whose receiver is named
__self, such as methods onloguru.Logger. - #1610: SQLAlchemy dataclass fields now reject mutable
dict,list, andsetliterals passed tomapped_column(default=...)and recommenddefault_factoryinstead.
Thank-you to all our contributors who found these bugs and reported them! Did you know this is one of the most helpful contributions you can make to an open-source project? If you find any bugs in Pyrefly we want to know about them! Please open a bug report issue here.
📦 Upgrade
pip install --upgrade pyrefly==1.4.0-dev.1How to safely upgrade your codebase
Upgrading the version of Pyrefly you're using or a third-party library you depend on can reveal new type errors in your code. Fixing them all at once is often unrealistic. We've written scripts to help you temporarily silence them. After upgrading, follow these steps:
pyrefly check --suppress-errors- Run your code formatter of choice
pyrefly check --remove-unused-ignores- Repeat until you achieve a clean formatting run and a clean type check.
This will add # pyrefly: 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.
🖊️ Contributors this release
@rchen152, David Tolnay, @dependabot, @Kylei, @dedsec-terminal, Oleh Prypin, Gábor Varga, @jakevdp, @jasonnathanieln, @stroxler, @ndmitchell, @connernilsen, @asukaminato0721
🔬 Tensor Shape Support
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.
- JAX NumPy, linear algebra, and FFT APIs now accept
ArrayLikeinputs more broadly, with improved shape inference forlinspace,logspace, andgeomspace. - JAX, NumPy, and PyTorch constructors now preserve shapes derived from nested list literals, including zero-sized dimensions.
- Torch shape stubs now expose public submodules as attributes and support the single-argument and keyword forms of
torch.whereand bare@torch.no_grad. - Shape-aware einops stubs now cover the remaining public APIs for Torch tensors.
pyrefly-shape-extensionsnow 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.
Pyrefly v1.2.1
Release date: September 16, 2026
Pyrefly v1.2.1 is a patch release with a single performance improvement.
⚡ Performance
- TSP requests on a file that is not open (for example
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,811getComputedTyperequests, 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.
📦 Upgrade
pip install --upgrade pyrefly==1.2.1How to safely upgrade your codebase
Upgrading the version of Pyrefly you're using or a third-party library you depend on can reveal new type errors in your code. Fixing them all at once is often unrealistic. We've written scripts to help you temporarily silence them. After upgrading, follow these steps:
pyrefly check --suppress-errors- Run your code formatter of choice
pyrefly check --remove-unused-ignores- Repeat until you achieve a clean formatting run and a clean type check.
This will add # pyrefly: 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.3.1
Release date: September 14, 2026
Pyrefly v1.3.1 is a patch release with a single bug fix.
🐛 Bug fixes
- #4909: Fixed a critical issue where Pyrefly would immediately crash on startup with a thread panic when empty or relative base paths were encountered during configuration. The server now safely resolves these paths against the working directory, preventing the crash and allowing normal operation.
Thank-you to all our contributors who found these bugs and reported them! Did you know this is one of the most helpful contributions you can make to an open-source project? If you find any bugs in Pyrefly we want to know about them! Please open a bug report issue here.
📦 Upgrade
pip install --upgrade pyrefly==1.3.1How to safely upgrade your codebase
Upgrading the version of Pyrefly you're using or a third-party library you depend on can reveal new type errors in your code. Fixing them all at once is often unrealistic. We've written scripts to help you temporarily silence them. After upgrading, follow these steps:
pyrefly check --suppress-errors- Run your code formatter of choice
pyrefly check --remove-unused-ignores- Repeat until you achieve a clean formatting run and a clean type check.
This will add # pyrefly: 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.