-
Notifications
You must be signed in to change notification settings - Fork 24.2k
[BE] Ensure generated stub files by gen_pyi
are properly formatted
#150730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: gh/XuehaiPan/267/base
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/150730
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ⏳ No Failures, 1 PendingAs of commit 08cb6a3 with merge base 9b2a45a ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
ghstack-source-id: 5760db7 Pull Request resolved: pytorch#150730
ghstack-source-id: f06f854 Pull Request resolved: pytorch#150730
ghstack-source-id: f06f854 Pull Request resolved: pytorch#150730
Rebased |
ghstack-source-id: 8840dda Pull Request resolved: pytorch#150730
Rebased |
Starting merge as part of PR stack under #150732 |
ghstack-source-id: 8840dda Pull Request resolved: pytorch#150730
ghstack-source-id: a7ca769 Pull Request resolved: pytorch#150730
ghstack-source-id: 6e85f11 Pull Request resolved: pytorch#150730
ghstack-source-id: e37c460 Pull Request resolved: pytorch#150730
ghstack-source-id: 0f3cfdf Pull Request resolved: pytorch#150730
ghstack-source-id: b23cfe8 Pull Request resolved: pytorch#150730
ghstack-source-id: b23cfe8 Pull Request resolved: pytorch#150730
ghstack-source-id: d4c7d04 Pull Request resolved: pytorch#150730
ghstack-source-id: aba4321 Pull Request resolved: pytorch#150730
if name.startswith("i"): | ||
# In-place binary-operation dunder methods, like `__iadd__`, should return `Self` | ||
return [ | ||
f"def {opname}(self, other: Tensor | Number | _complex) -> Tensor: ... # noqa: PYI034" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not return Self
? BC or doesn't match actual behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not match the actual behavior because the in-place operation might promote the dtype
.
ghstack-source-id: 7deb6cc Pull Request resolved: pytorch#150730
ghstack-source-id: b4010b3 Pull Request resolved: pytorch#150730
ghstack-source-id: d17ed41 Pull Request resolved: pytorch#150730
ghstack-source-id: 95d223a Pull Request resolved: pytorch#150730
ghstack-source-id: 5142745 Pull Request resolved: pytorch#150730
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
ghstack-source-id: 5142745 Pull Request resolved: pytorch#150730
ghstack-source-id: 5142745 Pull Request resolved: pytorch#150730
Stack from ghstack (oldest at bottom):
lintrunner
on generated.pyi
stub files #150732.pyi
stub files #150731gen_pyi
are properly formatted #150730