make computed var generic over mapping (#4762)

This commit is contained in:
Khaleel Al-Adhami 2025-02-05 16:16:30 -08:00 committed by GitHub
parent 49e48a5a8c
commit 88eae92d9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2219,10 +2219,10 @@ class ComputedVar(Var[RETURN_TYPE]):
@overload
def __get__(
self: ComputedVar[Mapping[DICT_KEY, DICT_VAL]],
self: ComputedVar[MAPPING_TYPE],
instance: None,
owner: Type,
) -> ObjectVar[Mapping[DICT_KEY, DICT_VAL]]: ...
) -> ObjectVar[MAPPING_TYPE]: ...
@overload
def __get__(
@ -2465,10 +2465,10 @@ class AsyncComputedVar(ComputedVar[RETURN_TYPE]):
@overload
def __get__(
self: AsyncComputedVar[Mapping[DICT_KEY, DICT_VAL]],
self: AsyncComputedVar[MAPPING_TYPE],
instance: None,
owner: Type,
) -> ObjectVar[Mapping[DICT_KEY, DICT_VAL]]: ...
) -> ObjectVar[MAPPING_TYPE]: ...
@overload
def __get__(