deps: Update dependency pyrefly to v1#732
Merged
Merged
Conversation
Member
|
hat tip @MarcoGorelli |
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:
>=0.63.1,<0.64→>=1.0.0,<1.1Release Notes
facebook/pyrefly (pyrefly)
v1.0.0: Pyrefly v1.0.0Compare Source
Status: STABLE
Release date: 12 May 2026
Pyrefly v1.0.0 is here!
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.
Performance Improvements
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.
Configuration Presets
A new
presetconfiguration option provides named bundles of error severities and behavior settings.offbasiclegacypyrefly initnow emits this preset automatically when migrating from a mypy config.defaultstrictdefaultpreset. For users who want to avoidAnytypes in their codebase.See the configuration docs for details.
Onboarding Experience
We’ve made improvements to the out-of-the-box experience for projects without a
pyrefly.toml.pyrefly initwould commit to disk.)Type Checker Improvements
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:
LSP & IDE Improvements
source.fixAll.Framework & Notebook Support
RootModel,pydantic-settings, andpydantic.dataclasses..ipynbIDE support has reached full parity with.pyfiles, with rename, find references, code actions, and document symbols all supported.Complementary Tooling
Pyrefly ships with tools to aid with adopting type checking in an existing codebase. Two new tools since beta:
pyrefly coverage reportoutputs a JSON report with annotation completeness and type completeness metrics per function, class, and module, so you can track coverage over time.Updated Version Policy
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.What's Next
Thank you to all our contributors!
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
v0.64.1: Pyrefly v0.64.1Compare Source
Full Changelog: facebook/pyrefly@0.64.0...0.64.1
v0.64.0: Pyrefly v0.64.0Compare Source
Status : BETA
Release date: May 05, 2026
Pyrefly v0.64.0 bundles 190 commits from 20 contributors.
✨ New & Improved
identity(identity)now correctly returns a generic callable instead of degrading toUnknown.- Same-scope class rebinds (like
Real = Dummyafterclass Real) are now checked against the original class as if it were an implicittype[Real]annotation, preventing silent type changes and fixing spurious constructor-call errors.- Generic classes with missing type arguments in lax mode now default to
Anyinstead of raising variance errors, improving consistency with how we handle other incomplete types.- Pydantic
field_validatordecorators withmode='before'andmode='plain'are now supported, allowing validators to accept broader input types before coercion.- Spurious unpack diagnostics are no longer emitted when the right-hand side involves
Never(e.g.a, b, c = never()ora, b = (never(), 1)). The unpack solver is nowNever-aware, recognizing that the producing expression cannot complete and any error message at the unpack site would be misleading.-
assertstatements now check that__bool__is callable on the test expression, matching the behavior already in place forif,while, and ternary expressions (and aligning with mypy and pyright).source.fixAllandsource.fixAll.pyreflycode action kinds, enabling selective fix-on-save configuration across editors that implement the LSP protocol.- Document highlights now correctly distinguish between read and write references, setting
DocumentHighlightKind::WRITEfor assignments and declarations.- Go-to-definition on relative imports in site-packages files now correctly resolves to the package source instead of returning null when a
pyproject.tomlexists at the project root.- 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.
- Cross-module "find references" (external references) is now enabled by default, returning references across the entire project rather than just the current file.
- 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.- A new
# pyrefly: ignorequick 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.- Numeric parameter defaults now preserve their source spelling (e.g.
0o777,0xFF,0b101) in hover and signature display rather than being normalized to decimal.- Code actions documentation has been added to the IDE Supported Features page, covering quick fixes and
source.fixAll.pyreflyconfiguration.pyrefly.tomlis found, Pyrefly auto-detects nearbymypy.ini,pyrightconfig.json, or[tool.mypy]/[tool.pyright]sections inpyproject.tomland synthesizes an in-memory configuration migrated from those settings (using thelegacyordefaultpreset respectively). With no detectable configuration, the newbasicpreset is used.- A new
python.pyrefly.typeCheckingModeworkspace setting (auto / off / basic / legacy / default / strict, defaultauto) lets users pick a preset for files not covered by an explicit Pyrefly configuration, directly from the VS Code settings UI. The legacypython.pyrefly.displayTypeErrorssetting is now deprecated, with values transparently mapped to the new model.- A new
python.pyrefly.disableTypeErrorsworkspace setting provides a clean per-workspace kill switch for diagnostics, independent of the type-checking mode.- 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.
- After a
pyrefly checkon an unconfigured project, the CLI now prints a short upsell to stderr explaining what configuration was synthesized and pointing atpyrefly init. The message is routed to stderr so machine-readable stdout formats (e.g.--output-format json) remain untouched.off,basic,legacy,default,strict) are now available via thepresetoption, providing named collections of error severities and behavior settings as a base configuration that user settings can override.- The
legacypreset is now used bypyrefly initfor mypy migration, disabling checks mypy doesn't have and setting looser inference defaults.- The
implicit-anyerror code has been split into sub-kinds (implicit-any-attribute,implicit-any-empty-container,implicit-any-parameter,implicit-any-type-argument) withimplicit-anyas the parent, allowing finer-grained control over where implicitAnyis flagged.- The
unbound-nameerror is now disabled in thelegacypreset to match mypy's default behavior, which does not flag possibly-undefined variables.incompatible-overload-residualerror 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.- 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.
- The
pyrefly suppresscommand now correctly handles removal of unused ignores via the--remove-unusedflag, which was previously broken.create(),build(),create_batch(), andbuild_batch()methods onDjangoModelFactorysubclasses by reading the innerMeta.modelattribute.- False-positive
bad-overrideerrors on the innerMetaclass in factory-boy factories are now suppressed, matching how we handle Django and Marshmallow.pyrefly reportJSON output now includes apathfield on eachModuleReport, for compatibility with typestats and similar tooling.- Callable residual finalization has been optimized to avoid redundant type cloning and traversals, reducing memory churn in attribute-heavy code.
- Eliminated some bugs that caused Pyrefly to unnecessarily analyze dependencies, improving latency and memory use, especially in the IDE.
🐛 bug fixes
We closed 15 bug issues this release 👏
+operator was incorrectly flaggingstras not assignable toLiteralStringattributes. Pyrefly now preservesLiteralStringstyle when adding two explicit string literals and uses implicit style otherwise.foo(x, y)withx: int | Noneandy: int | Noneno longer incorrectly narrowsxtoNonewhen passed to a genericfoo[T](a: T, b: T).pyrefly suppress --remove-unusedwhich was not actually removing unused error suppressions. The command now correctly processes the--remove-unusedflag.source.fixAll.pyreflyin addition tosource.fixAll, allowing users to selectively enable or disable Pyrefly's fix-all actions in editors that support LSP code action kinds.RootModelin lax mode. Missing type arguments now degrade toAnyinstead of raising errors, matching our handling of other incomplete types.pyproject.tomlexisted at the project root.list["A|B"]was incorrectly rejected asnot-a-type. Type argument subscripts are now bound as type expressions even in value context, allowing forward-ref strings to be parsed.bad-class-definitionwhen a dataclass field was assigned inside a@classmethodor__init_subclass__. Pyrefly was incorrectly extracting these as dataclass fields, even though Python'sdataclasses.dataclassignores them at runtime.assertstatements now flag a non-callable__bool__on the test expression, closing a gap that previously only caught the issue insideif,while, and ternary expressions.urlunparsebeing inferred as returningLiteral[b'']instead ofstr. The fix reworksas_superclassso tuple-likeNamedTuplesubclasses are upcast through their erased tuple element types, which stopsParseResultfrom spuriously matchingIterable[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.pathfield to thepyrefly reportJSONModuleReport, 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
📦 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:
1.
pyrefly check --suppress-errors2. run your code formatter of choice
3.
pyrefly check --remove-unused-ignores4. Repeat until you achieve a clean formatting run and a clean type check.
This 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 [Pyefly documentation](https://pyrefly.org/en/docs/error-suppressions/)
🖊️ Contributors this release
@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.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, 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.