@@ -17,9 +17,26 @@ class cached_property(Generic[_T]):
17
17
@overload
18
18
def __get__ (self , instance : object , cls : Type [Any ] = ...) -> _T : ...
19
19
20
- class Promise : ...
20
+ # Promise is only subclassed by a proxy class defined in the lazy function
21
+ # so it makes sense for it to have all the methods available in that proxy class
22
+ class Promise :
23
+ def __init__ (self , args : Any , kw : Any ) -> None : ...
24
+ def __reduce__ (self ) -> Tuple [Any , Tuple [Any ]]: ...
25
+ @classmethod
26
+ def __prepare_class__ (cls ) -> None : ...
27
+ def __promise__ (cls , method_name : str ) -> Any : ...
28
+ def __text_cast (self ) -> str : ...
29
+ def __bytes_cast (self ) -> bytes : ...
30
+ def __bytes_cast_encoded (self ) -> bytes : ...
31
+ def __cast (self ) -> Union [bytes , str ]: ...
32
+ def __lt__ (self , other : Any ) -> bool : ...
33
+ def __hash__ (self ) -> int : ...
34
+ def __mod__ (self , rhs : Any ) -> str : ...
35
+ def __add__ (self , other : Any ) -> str : ...
36
+ def __radd__ (self , other : Any ) -> str : ...
37
+ def __deepcopy__ (self , memo : Any ): ...
21
38
22
- def lazy (func : Union [Callable , Type [str ]], * resultclasses : Any ) -> Callable : ...
39
+ def lazy (func : Union [Callable , Type [str ]], * resultclasses : Any ) -> Callable [..., Promise ] : ...
23
40
def lazystr (text : Any ): ...
24
41
def keep_lazy (* resultclasses : Any ) -> Callable : ...
25
42
def keep_lazy_text (func : Callable ) -> Callable : ...
0 commit comments