-
Notifications
You must be signed in to change notification settings - Fork 24.2k
[BE][Easy] Fix PYI034
: non-self-return-type in tensor method hints
#129886
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/129886
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New FailuresAs of commit f31f883 with merge base ffb9790 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
To be frank, I'm quite at loss if how PR title connected to any of the changes you are proposing here
Sorry, I have updated the PR comment for what this PR is doing. |
ghstack-source-id: 1db440b Pull Request resolved: pytorch#129886
ghstack-source-id: 5074a89 Pull Request resolved: pytorch#129886
ghstack-source-id: 5074a89 Pull Request resolved: pytorch#129886
ghstack-source-id: cb015e7 Pull Request resolved: pytorch#129886
ghstack-source-id: 1765f68 Pull Request resolved: pytorch#129886
ghstack-source-id: 1765f68 Pull Request resolved: pytorch#129886
ghstack-source-id: 1765f68 Pull Request resolved: pytorch#129886
ghstack-source-id: 1765f68 Pull Request resolved: pytorch#129886
ghstack-source-id: 1765f68 Pull Request resolved: pytorch#129886
ghstack-source-id: 1765f68 Pull Request resolved: pytorch#129886
ghstack-source-id: 1f9c3f3 Pull Request resolved: pytorch#129886
ghstack-source-id: 1f9c3f3 Pull Request resolved: pytorch#129886
ghstack-source-id: b8ad561 Pull Request resolved: pytorch#129886
ghstack-source-id: 115ee85 Pull Request resolved: pytorch#129886
ghstack-source-id: 9326463 Pull Request resolved: pytorch#129886
ghstack-source-id: 9326463 Pull Request resolved: pytorch#129886
ghstack-source-id: 622e182 Pull Request resolved: pytorch#129886
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
In
gen_pyi.py
, we add generated method hints for dunder magic methods forclass TensorBase
at:pytorch/torch/_C/__init__.pyi.in
Line 1734 in 8c2c3a0
such as:
This PR changes the return type of in-place binary operations (e.g.
__iadd__
,__imul__
, ...) fromTensor
toSelf
to fix non-self-return-type (PYI034).Stack from ghstack (oldest at bottom):
lintrunner
on generated.pyi
stub files in CI #129887torch/utils/data/datapipes/gen_pyi.py
withtorchgen
#129873PYI034
: non-self-return-type in tensor method hints #129886__all__
totorch/nn/functional.pyi
andtorch/return_types.pyi
#129872.pyi
stub files #129420torchgen.utils.FileManager
to acceptpathlib.Path
#129871cc @ezyang @malfet @xuzhao9 @gramster