Skip to content

Commit 7101b8c

Browse files
bobrenjc93pytorchmergebot
authored andcommitted
remove allow-untyped-defs from onnx/_internal/_lazy_import.py (pytorch#143943)
Pull Request resolved: pytorch#143943 Approved by: https://github.com/justinchuby
1 parent cf0b72c commit 7101b8c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

torch/onnx/_internal/_lazy_import.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Utility to lazily import modules."""
22

3-
# mypy: allow-untyped-defs
43
from __future__ import annotations
54

65
import importlib
@@ -17,7 +16,7 @@ def __init__(self, module_name: str) -> None:
1716
def __repr__(self) -> str:
1817
return f"<lazy module '{self._name}'>"
1918

20-
def __getattr__(self, attr):
19+
def __getattr__(self, attr: str) -> object:
2120
if self._module is None:
2221
self._module = importlib.import_module(".", self._name)
2322
return getattr(self._module, attr)

0 commit comments

Comments
 (0)