From c4ab3e6cebc6bfcdaec9db72512fd9f9af9ab563 Mon Sep 17 00:00:00 2001 From: bobrenjc93 Date: Mon, 16 Dec 2024 13:13:41 -0800 Subject: [PATCH] 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 --- torch/__config__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/torch/__config__.py b/torch/__config__.py index fdb091032759..1187fab37139 100644 --- a/torch/__config__.py +++ b/torch/__config__.py @@ -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()