mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
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:
parent
3f80632c80
commit
1598d45879
1 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue