-
Notifications
You must be signed in to change notification settings - Fork 24.2k
[BE][Easy] enable postponed annotations in torchgen
#129376
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/129376
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 daa098e with merge base 065c386 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Postponed annotations are actually being deprecated in the most recent version of python so I'd rather not enable them for no reason. In fact, I'd rather we disable them everywhere we can. I'm working on adding a ruff rule to enable this. |
See #117449 |
ghstack-source-id: 203eb2c Pull Request resolved: pytorch#129376
ghstack-source-id: 29cbd2f Pull Requestresolved: pytorch#129376
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.
okey dokey
…ub files (#129419) ------ - [Generic TypeAlias (PEP 585)](https://peps.python.org/pep-0585): e.g. `typing.List[T] -> list[T]`, `typing.Dict[KT, VT] -> dict[KT, VT]`, `typing.Type[T] -> type[T]`. - [Union Type (PEP 604)](https://peps.python.org/pep-0604): e.g. `Union[X, Y] -> X | Y`, `Optional[X] -> X | None`, `Optional[Union[X, Y]] -> X | Y | None`. Note that in `.pyi` stub files, we do not need `from __future__ import annotations`. So this PR does not violate issue #117449: - #117449 Pull Request resolved: #129419 Approved by: https://github.com/ezyang ghstack dependencies: #129375, #129376
This reverts commit 494057d. Reverted #129376 on behalf of https://github.com/huydhn due to Sorry for reverting your change but I need to revert to cleanly revert #129374, please do a rebase and reland this ([comment](#129375 (comment)))
@XuehaiPan your PR has been successfully reverted. |
ghstack-source-id: 4eae041 Pull Request resolved: pytorch#129376
…ub files (#129419) ------ - [Generic TypeAlias (PEP 585)](https://peps.python.org/pep-0585): e.g. `typing.List[T] -> list[T]`, `typing.Dict[KT, VT] -> dict[KT, VT]`, `typing.Type[T] -> type[T]`. - [Union Type (PEP 604)](https://peps.python.org/pep-0604): e.g. `Union[X, Y] -> X | Y`, `Optional[X] -> X | None`, `Optional[Union[X, Y]] -> X | Y | None`. Note that in `.pyi` stub files, we do not need `from __future__ import annotations`. So this PR does not violate issue #117449: - #117449 Pull Request resolved: #129419 Approved by: https://github.com/ezyang ghstack dependencies: #129375, #129376
Stack from ghstack (oldest at bottom):
.pyi
stub files #129420.pyi
stub files #129419torchgen
#129376tools
#129375cc @ezyang @malfet @xuzhao9 @gramster @albanD