Skip to content

Commit a19a427

Browse files
committed
fix mypy error.
1 parent e7ed325 commit a19a427

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lightning/pytorch/utilities/model_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def __init__(self, method: Callable[Concatenate[type[_T], _P], _R_co]) -> None:
115115
def __get__(self, instance: _T, cls: Optional[type[_T]] = None) -> Callable[_P, _R_co]:
116116
# The wrapper ensures that the method can be inspected, but not called on an instance
117117
@functools.wraps(self.method)
118-
def wrapper(*args: Any, **kwargs: Any) -> _R_co:
118+
def wrapper(*args: Any, **kwargs: Any) -> Callable[Concatenate[type[_T], _P], _R_co]:
119119
# Workaround for https://github.com/pytorch/pytorch/issues/67146
120120
is_scripting = any(os.path.join("torch", "jit") in frameinfo.filename for frameinfo in inspect.stack())
121121
cls_type = cls if cls is not None else type(instance)

0 commit comments

Comments
 (0)