Typed classproperty.fget
This commit is contained in:
parent
cbc0e92e5d
commit
19c4a7ebdf
@ -170,7 +170,7 @@ class CachedSlotProperty(Generic[T, T_co]):
|
|||||||
|
|
||||||
class classproperty(Generic[T_co]):
|
class classproperty(Generic[T_co]):
|
||||||
def __init__(self, fget: Callable[[Any], T_co]) -> None:
|
def __init__(self, fget: Callable[[Any], T_co]) -> None:
|
||||||
self.fget = fget
|
self.fget: Callable[[Any], T_co] = fget
|
||||||
|
|
||||||
def __get__(self, instance: Optional[Any], owner: Type[Any]) -> T_co:
|
def __get__(self, instance: Optional[Any], owner: Type[Any]) -> T_co:
|
||||||
return self.fget(owner)
|
return self.fget(owner)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user