Repository navigation
fix(stubs): support builtin float with NumPy float64 - #5367
Closed
mangeshraut712 wants to merge 5 commits into
Closed
mangeshraut712 wants to merge 5 commits into
mangeshraut712 wants to merge 5 commits into
Conversation
Contributor
|
This pull request has been imported. If you are a Meta employee, you can view this in D127482799. (Because this pull request was imported automatically, there will not be any future comments.) |
Inheriting builtins.float made ``1j * float64`` resolve via complex*float and broke dtype-properties assert_type (expected 5 errors, got 6). Add float-specific overloads for __sub__/__rsub__ and comparisons only, matching issue meta#5353 without rewriting reflected numeric ops.
Runtime harness rejects tests that only use plain assert/assert_type.
Same flake as elsewhere: commands::check::tests::check_writes_cinderx_and_glean_reports_together
(assertion failed: facts.contains("public.api.Widget")). Ubuntu + tensor-shape remain green.
stroxler
approved these changes
Oct 26, 2026
stroxler
left a comment
Contributor
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
2 of 3 tasks
Contributor
|
This pull request has been merged in 8fac146. |
This was referenced Oct 26, 2026
Contributor
Author
|
Hey — CodeSync landed this on main with me as the commit author (thanks). GitHub still shows the PR as closed not merged ( Could you mark CodeSync landings as merged on the GitHub side (or reopen + merge via GitHub) so external contributors get the PR merge credit? Same issue on #5365 #5373 #5367 #5369. |
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.
Summary
Fixes #5353: arithmetic and comparisons between
numpy.float64and builtinfloatreportedunsupported-operationunder tensor-shapes stubs.Narrow approach: add float-specific overloads on
float64for__sub__/__rsub__and rich comparisons. Do not inheritbuiltins.float— that rewrote reflected ops like1j * float64viacomplex*floatand failed dtype-properties (assert_typeregression: expected 5 errors, got 6).Test plan