[BE] Resolve lint errors in .pyi stub files#150731
[BE] Resolve lint errors in .pyi stub files#150731XuehaiPan wants to merge 32 commits intogh/XuehaiPan/268/basefrom
.pyi stub files#150731Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/150731
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 4da6026 with merge base 8c16d0e ( UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
.pyi stub files.pyi stub files
|
Rebased |
ghstack-source-id: b60d2a1 Pull Request resolved: pytorch#150731
| S = TypeVar("S", bound=torch.Tensor) # noqa: PYI001 | ||
| P = ParamSpec("P") # noqa: PYI001 | ||
| R = TypeVar("R", covariant=True) # return value (always covariant) # noqa: PYI001 | ||
| T_co = TypeVar("T_co", covariant=True) # noqa: PYI001 |
There was a problem hiding this comment.
Since it's "standard practice" why not have all of these start with an underscore? At least for R and T_co it can't be BC because you renamed them here...
There was a problem hiding this comment.
These typevars are used in gen_pyi.py. The variable name without the underscore is easier to access.
Lines 1118 to 1132 in 004dad4
ghstack-source-id: 424bb59 Pull Request resolved: pytorch#150731
ghstack-source-id: 7f7f13d Pull Request resolved: pytorch#150731
ghstack-source-id: 2006754 Pull Request resolved: pytorch#150731
ghstack-source-id: 6fde54e Pull Request resolved: pytorch#150731
ghstack-source-id: 2976383 Pull Request resolved: pytorch#150731
Stack from ghstack (oldest at bottom):
lintrunneron generated.pyistub files #150732.pyistub files #150731cc @ezyang @malfet @xuzhao9 @gramster