We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf0b72c commit 7101b8cCopy full SHA for 7101b8c
torch/onnx/_internal/_lazy_import.py
@@ -1,6 +1,5 @@
1
"""Utility to lazily import modules."""
2
3
-# mypy: allow-untyped-defs
4
from __future__ import annotations
5
6
import importlib
@@ -17,7 +16,7 @@ def __init__(self, module_name: str) -> None:
17
16
def __repr__(self) -> str:
18
return f"<lazy module '{self._name}'>"
19
20
- def __getattr__(self, attr):
+ def __getattr__(self, attr: str) -> object:
21
if self._module is None:
22
self._module = importlib.import_module(".", self._name)
23
return getattr(self._module, attr)
0 commit comments