[BE] Ensure generated stub files by gen_pyi are properly formatted#150730
[BE] Ensure generated stub files by gen_pyi are properly formatted#150730XuehaiPan wants to merge 27 commits intogh/XuehaiPan/267/basefrom
gen_pyi are properly formatted#150730Conversation
🔗 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 FailuresAs of commit 08cb6a3 with merge base 9b2a45a ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Rebased |
ghstack-source-id: 8840dda Pull Request resolved: pytorch#150730
|
Rebased |
|
Starting merge as part of PR stack under #150732 |
ghstack-source-id: 6e85f11 Pull Request resolved: pytorch#150730
ghstack-source-id: b23cfe8 Pull Request resolved: pytorch#150730
ghstack-source-id: d4c7d04 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.
Why not return Self? BC or doesn't match actual behavior?
There was a problem hiding this comment.
It does not match the actual behavior because the in-place operation might promote the dtype.
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
Stack from ghstack (oldest at bottom):
lintrunneron generated.pyistub files #150732.pyistub files #150731gen_pyiare properly formatted #150730