[BE] Delete all pre py-3.10 checks (#163653)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/163653
Approved by: https://github.com/jansel
ghstack dependencies: #163648, #163649
This commit is contained in:
Nikita Shulga
2025-09-23 12:20:31 -07:00
committed by PyTorch MergeBot
parent f3f67ff43a
commit f9fa138a39
23 changed files with 64 additions and 488 deletions

View File

@ -570,10 +570,7 @@ def tree_map_(
Type2 = tuple[type[T], type[S]]
Type3 = tuple[type[T], type[S], type[U]]
if sys.version_info >= (3, 10):
TypeAny = Union[type[Any], tuple[type[Any], ...], types.UnionType]
else:
TypeAny = Union[type[Any], tuple[type[Any], ...]]
TypeAny = Union[type[Any], tuple[type[Any], ...], types.UnionType]
Fn2 = Callable[[Union[T, S]], R]
Fn3 = Callable[[Union[T, S, U]], R]