Skip to content

Commit 24f4ec5

Browse files
committed
fix type annotation for py39
1 parent 6593955 commit 24f4ec5

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
@@ -112,7 +112,7 @@ def __init__(self, method: Callable[Concatenate[type[_T], _P], _R_co]) -> None:
112112
super().__init__(method)
113113
self.method = method
114114

115-
def __get__(self, instance: Optional[_T], cls: type[_T] | None = None) -> Callable[_P, _R_co]:
115+
def __get__(self, instance: Optional[_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)
118118
def wrapper(*args: Any, **kwargs: Any) -> _R_co:

0 commit comments

Comments
 (0)