deps: Update dependency pyrefly to >=1.3.0 - #999
Merged
Merged
Conversation
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.2.0→>=1.3.01.3.1Release Notes
facebook/pyrefly (pyrefly)
v1.3.0: Pyrefly v1.3.0Compare Source
Release date: September 10, 2026
Pyrefly v1.3.0 bundles 934 commits from 71 contributors.
🔍Release Highlights
Type Checking
mock.patchtargets, unsupporteddataclass_transformarguments, incompatibleProtocol.__call__overrides, and unimplemented abstract methods. Pattern-match exhaustiveness, overload resolution, narrowing, and generic inference are also more accurate.Language Server
assert x is not None. Inlay hints can also insert required imports and link to definitions.Configuration & CLI
# type: ignore[pyrefly:<code>]suppresses a specific Pyrefly diagnostic without hiding unrelated errors on the same line.--replace-untyped-imports-with-anyoption replaces selected third-party packages that lack stubs or apy.typedmarker withAny, andpyrefly inittranslates mypy'sfollow_untyped_importssetting automatically.--prune-baseline, and reject them in CI with--error-stale-baseline.Experimental Extensions
pyrefly-numpy-stubspackage brings shape checking to NumPy. These stubs use a new type-level shape DSL, which replaces the old@shaped_arrayAPI.Seriesand schema annotations. pandascolumns=projections now preserve the requested schema as well.✨ New & Improved
Type Checking
non-exhaustive-match-open-typeerror kind.hasattr, wideLiteralunions, callable values, reverse tuple slices, and values assigned fromAny.bad-dataclass-descriptorerror kind.unittest.mock.patchare validated, with nonexistent attributes reported asmissing-attribute-patch-targetwarnings.regexerror kind.ForeignKey,OneToOneField, andManyToManyFieldrelationships in the same file, while Django REST Framework serializers avoid false override errors for commonMetaand field patterns.update().values()checks values against mapped model fields.register_bufferandregister_parameter.Language Server
assert x is not Nonewhen an optional value needs narrowing.**kwargs: Unpack[TypedDict]more accurately.pyrefly.lspPathvalues now work correctly with Windows, home-relative, and workspace-relative paths.extraSearchPathsandextraProjectExcludesduring initialization, improving integration with editors that manage their own import paths and excluded directories.pyrefly/typeErrorDisplayStatusChangednotification.Performance
getComputedTyperequests fell from 668 seconds to 3.4 seconds, while total request time fell from 671 seconds to 6.4 seconds.Configuration & CLI
# type: ignore[pyrefly:<code>]comments suppress only the named Pyrefly diagnostic without hiding unrelated errors on the same line.type-ignore-unknown-tag-behavioroption 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-anyoption replaces selected installed third-party packages withAnywhen they provide neither stubs nor apy.typedmarker.pyrefly initautomatically translates mypy's global and per-modulefollow_untyped_importssettings to the new option.baseline-matching-modecan match diagnostics by their column or concise description, reducing churn when unrelated code moves.baseline-formatcan write full metadata or a minimal representation containing only the fields needed for matching.baseline-error-levelcan expose matched diagnostics atinfo,warn, orerrorseverity instead of hiding them, with baseline provenance included in text, JSON, SARIF, and summary output.--prune-baselineremoves stale entries without recording new errors, while--error-stale-baselinelets CI reject a baseline containing obsolete entries.treat-all-caps-as-finaloption treats reassignment ofALL_CAPSnames as abad-assignment.pyrefly.tomlusing a PEP 440 version constraint.python-interpreter-find-commandsetting supports custom interpreter discovery.--outputdestinations with different formats can be specified in one CLI invocation.pants-pyreflyplugin.Experimental Extensions
jax.lax.pyrefly-numpy-stubspackage brings shape-aware checking to NumPy alongside the existing PyTorch support.@shaped_arrayAPI has been removed; custom shape annotations must migrate toIntTuple-generic classes and the V2 DSL.select,with_columns,group_by().agg(), joins, CSV readers, and lazy/eager conversion, with typedSeries, nested and owned dtypes, and schema information from variables, calls, andTypedDicts.Annotated[DataFrame, Schema(...)]supports exact and open schema contracts, while the newcolumn-schema-mismatchandduplicate-columnerrors catch invalid schemas and conflicting output columns before runtime.columns=now project their inferred schema onto the requested column set and order.🐛 Bug fixes
We closed 88 bug issues this release 👏
__new__method. Pyrefly now detects direct recursive__new__targets.NamedTuplewas defined inline inside amatchstatement. A dedicatedMatchSubjectbinding key now prevents collisions.py.typedpackages installed insite-packagesnow 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.
📦 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
@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.
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.