[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

@ -355,12 +355,9 @@ def dataclass_repr(
width: int = 80,
) -> str:
# built-in pprint module support dataclasses from python 3.10
if sys.version_info >= (3, 10):
from pprint import pformat
from pprint import pformat
return pformat(obj, indent, width)
return _pformat(obj, indent=indent, width=width)
return pformat(obj, indent, width)
def _pformat(