remove allow-untyped-defs from torch/ao/__init__.py (#143604)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/143604
Approved by: https://github.com/aorenste
This commit is contained in:
bobrenjc93 2024-12-19 16:18:14 -08:00 committed by PyTorch MergeBot
parent 3f80632c80
commit 1598d45879

View file

@ -1,7 +1,8 @@
# mypy: allow-untyped-defs
# torch.ao is a package with a lot of interdependencies.
# We will use lazy import to avoid cyclic dependencies here.
from typing import Any
__all__ = [
"nn",
@ -11,7 +12,7 @@ __all__ = [
]
def __getattr__(name):
def __getattr__(name: str) -> Any:
if name in __all__:
import importlib