remove allow-untyped-defs for torch/__config__.py (#143320)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/143320
Approved by: https://github.com/aorenste
ghstack dependencies: #143319
This commit is contained in:
bobrenjc93
2024-12-16 13:13:41 -08:00
committed by PyTorch MergeBot
parent 0178e43949
commit c4ab3e6ceb

View File

@ -1,8 +1,7 @@
# mypy: allow-untyped-defs
import torch
def show():
def show() -> str:
"""
Return a human-readable string with descriptions of the
configuration of PyTorch.
@ -13,11 +12,11 @@ def show():
# TODO: In principle, we could provide more structured version/config
# information here. For now only CXX_FLAGS is exposed, as Timer
# uses them.
def _cxx_flags():
def _cxx_flags() -> str:
"""Returns the CXX_FLAGS used when building PyTorch."""
return torch._C._cxx_flags()
def parallel_info():
def parallel_info() -> str:
r"""Returns detailed string with parallelization settings"""
return torch._C._parallel_info()