Skip to content

Commit

Permalink
Add proxied functions for Promise.
Browse files Browse the repository at this point in the history
Signed-off-by: Zixuan James Li <[email protected]>
  • Loading branch information
PIG208 committed Jun 29, 2022
1 parent 3cfe137 commit 391b1e1
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion django-stubs/utils/functional.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,24 @@ class cached_property(Generic[_T]):
@overload
def __get__(self, instance: object, cls: Type[Any] = ...) -> _T: ...

class Promise: ...
# Promise is only subclassed by a proxy class defined in the lazy function
# so it makes sense for it to have all the methods available in that proxy class
class Promise:
def __init__(self, args: Any, kw: Any) -> None: ...
def __reduce__(self) -> Tuple[Any, Tuple[Any]]: ...
@classmethod
def __prepare_class__(cls) -> None: ...
def __promise__(cls, method_name: str) -> Any: ...
def __text_cast(self) -> str: ...
def __bytes_cast(self) -> bytes: ...
def __bytes_cast_encoded(self) -> bytes: ...
def __cast(self) -> Union[bytes, str]: ...
def __lt__(self, other: Any) -> bool: ...
def __hash__(self) -> int: ...
def __mod__(self, rhs: Any) -> str: ...
def __add__(self, other: Any) -> str: ...
def __radd__(self, other: Any) -> str: ...
def __deepcopy__(self, memo: Any): ...

_C = TypeVar("_C", bound=Callable)

Expand Down

0 comments on commit 391b1e1

Please sign in to comment.