Repository navigation
deps: Update dependency pyrefly to >=1.5.0 - #1128
Merged
Merged
Conversation
renovate
Bot
force-pushed
the
renovate/pyrefly-1.x
branch
from
December 4, 2026 08:36
b7674ad to
d0dc0dc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
>=1.4.1→>=1.5.01.5.2(+1)Release Notes
facebook/pyrefly (pyrefly)
v1.5.0: Pyrefly v1.5.0Compare Source
Release date: November 18, 2026
Pyrefly v1.5.0 bundles 1466 commits from 81 contributors.
🔍 Release Highlights
hintseverity. Diagnostics that were previously IDE-only are now regular error kinds at a newhintseverity:unused-import,unused-parameter,unused-variable,unreachable, andinactive-code(formerlyunreachable-code). By default, they appear in your editor and are hidden frompyrefly checkoutput, but you can configure them inpyrefly.toml, silence them with suppression comments, or promote them to errors like any other error kind.These may surface new output or errors in code that checked cleanly under v1.4.1.
pyrefly checkprints warnings by default. This includes uses of deprecated APIs,redundant-cast, andunnecessary-type-conversion. Warnings don't affect the exit code, and--suppress-errors, baseline updates, and JUnit reports ignore them. To hide them, setmin-severity = "error"in your config or pass--min-severity=error.from __future__ import annotations, and annotations in stub files, look names up in the class body first. So if a class defines a method namedint,x: intin that class refers to the method - even if the method is defined afterx.pyrefly check <dir>honors config excludes. A directory argument now uses the config found from that directory and honors itsproject-excludes, so excluded files are no longer checked andpyrefly check .checks the same files aspyrefly check. Glob arguments are expanded as a shell would, so quoted and unquoted globs give the same result.unreachabledefaults tohintinstead ofwarn. Unreachable code defaults to an IDE-only hint. Setunreachableto"warn"or"error"to keep it visible on the command line.unused-import,unused-parameter, andunused-variableare now error kinds,disable-type-errors-in-ide, project includes, and generated-code filtering hide them, and they appear in notebook cells.✨ New & Improved
Type Checking
andandoroperations,type(x) is Ccomparisons, and tuple elements guarded byany(...)orall(...).matchstatements is more accurate, especially for tuple subjects and class patterns.break.ParamSpecandTypeVarTupleaccept variance keywords and respect declared variance.selforclsparameter are reported asbad-function-definition.unexpected-neverwarning reports functions that can never return but aren't annotatedNoReturnorNever.fallback-search-path-relative-importwarning reports imports that resolve only through the fallback search path heuristic and may fail at runtime, which usually means a search path or site package path is missing from your config.explicit-any-useandpartially-unknown-typeshow where explicitAnyand partially unknown types flow through your code.protected-accesserror kind reports access to single-underscore members from outside their class, and is what Pyright'sreportPrivateUsagenow maps to.invalid-format-specerror kind checks f-string format specifications against the value's type and the builtin formatting rules.0001_initial.pymigrations, now get module names.infer-param-types-from-docstringoption uses types from Sphinx (reStructuredText):param <type> <name>:and:type <name>:fields for unannotated parameters, which helps with older libraries that document types instead of annotating them.Library Support
model_validateandmodel_constructcalls are type checked.NewTypes, and fields with custom schemas.idprimary keys, and querysets fromManager.as_manager().select().filter_by()checks field names and value types.TestClient.Language Server
Annotated[..., Doc()]and numpydoc docstrings.import numpy as np.workspacevalue fordiagnosticModepublishes diagnostics across projects.Configuration & CLI
--onlyCLI flag, which limits reported diagnostics to listed error kinds, can now be set in a config file as well via the newonlyoption.--extend-project-excludesadds to the configured excludes, and--force-excludeappliesproject-excludesto paths given on the command line.script-command, or skipped with--exclude-scripts.--watchre-reads configs when a config file changes.dump-config --fullshows the fully resolved configuration.reveal_typeoutput is shown under thebasicpreset, which applies when there is no config file.required-versionmismatch exits with code 4 instead of 1, so it can be told apart from type errors. When several files are given, Pyrefly now stops before checking them instead of reporting errors from the wrong version.pyrefly initfinds a BasedPyright baseline, it offers to create a Pyrefly baseline, so a migrated project starts with a clean check.--report-scipflag writes a SCIP code-navigation index with definitions, references, hover documentation, and implementation relationships. It uses the same symbol format as Sourcegraph's scip-python, and its output is close to scip-python's. See Indexing.Performance
These are some of the changes that make v1.5.0 faster.
pyrefly checkis about 20% faster on projects outside the training set, and a language server editing session is about 19% faster.CoreSchemais a union of about 60 TypedDicts, from 3.84 s to 0.88 s.Tensor Shapes
jax.jitandArray.atindexing.{package}-shape-stubspackages.use-shape-comments-and-stubsoption turns shape features off.🐛 Bug fixes
We closed 123 bug issues this release 👏
Frameis not assignable toFrame"). A library installed in editable mode is now checked in its importer's environment.Unknown.cached_propertythat overrides an unannotated class variable no longer causes a false-positive override error, a common pattern in Django code.is SomeEnum.MEMBERnow gives the correct type.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
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-errorspyrefly check --remove-unused-ignoresThis will add
# pyrefly: ignorecomments 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, @rchen152, @kinto0, @samwgoldman, @asukaminato0721, @connernilsen, @shahhamdihassan, generatedunixname2066905484085733, David Tolnay, Catherine Gasnier, @mangeshraut712, @ndmitchell, @jorenham, @jakevdp, @Aayushyaash, @1-DARK, @MarcoGorelli, @nitishagar, @AlessandroRuggiero, @QEDady, @bdelwood, @Divyansh151005, @ImBinarry, @ysheikh2, @ting-hong-shieh, @omkar-334, generatedunixname2382037498884706, @WilliamK112, @yeonwooson, Aleksandr Lvov, @soaring0616, @La1itchauhan, @i098, generatedunixname89002005307016, @TimonGaertner, @dhitalkamal, @jny0444, @bniladridas, @sathariels, @KalininDL, @DetachHead, @mvanhorn, @slawlor, Gutti Torvadal, @javabster, @8Keep, @spachgade-meta, @pavelzw, @ak4-sh, ALEXANDRE GEORGE LUSTOSA, generatedunixname873325592204101, @tonyyuyiding, @Cha-Imaa, @willy-b, @Sufiyan-MSA, @thomaspolasek, @Nevsor, @nbadami123, Patrick Lawrence, @nikmos3, @Hirujan-R, @n1shanthb, dtolnay, @austin3dickey, @rexledesma, @ravivats, @Sano007, @swaminimore, @felixscherz, Felipe, @Arham-Begani, @yangdanny97, @Quaden2307, @Nidhi-Gahlawat, @akhil9tiet, @Aling33, @MannXo, @crypt0lith, @GautamKumarOffical, @maharshi-coding, @amas127
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.