@@ -158,10 +158,10 @@ class DependenciesContainer(Object):
158
158
159
159
160
160
class Callable (Provider [T ]):
161
- def __init__ (self , provides : Optional [_Callable [..., T ]] = None , * args : Injection , ** kwargs : Injection ) -> None : ...
161
+ def __init__ (self , provides : Optional [Union [ _Callable [..., T ], str ]] = None , * args : Injection , ** kwargs : Injection ) -> None : ...
162
162
@property
163
163
def provides (self ) -> Optional [_Callable [..., T ]]: ...
164
- def set_provides (self , provides : Optional [_Callable [..., T ]]) -> Callable [T ]: ...
164
+ def set_provides (self , provides : Optional [Union [ _Callable [..., T ], str ]]) -> Callable [T ]: ...
165
165
@property
166
166
def args (self ) -> Tuple [Injection ]: ...
167
167
def add_args (self , * args : Injection ) -> Callable [T ]: ...
@@ -283,12 +283,12 @@ class Configuration(Object[Any]):
283
283
284
284
class Factory (Provider [T ]):
285
285
provided_type : Optional [Type ]
286
- def __init__ (self , provides : Optional [_Callable [..., T ]] = None , * args : Injection , ** kwargs : Injection ) -> None : ...
286
+ def __init__ (self , provides : Optional [Union [ _Callable [..., T ], str ]] = None , * args : Injection , ** kwargs : Injection ) -> None : ...
287
287
@property
288
288
def cls (self ) -> Type [T ]: ...
289
289
@property
290
290
def provides (self ) -> Optional [_Callable [..., T ]]: ...
291
- def set_provides (self , provides : Optional [_Callable [..., T ]]) -> Factory [T ]: ...
291
+ def set_provides (self , provides : Optional [Union [ _Callable [..., T ], str ]]) -> Factory [T ]: ...
292
292
@property
293
293
def args (self ) -> Tuple [Injection ]: ...
294
294
def add_args (self , * args : Injection ) -> Factory [T ]: ...
@@ -326,12 +326,12 @@ class FactoryAggregate(Aggregate[T]):
326
326
327
327
class BaseSingleton (Provider [T ]):
328
328
provided_type = Optional [Type ]
329
- def __init__ (self , provides : Optional [_Callable [..., T ]] = None , * args : Injection , ** kwargs : Injection ) -> None : ...
329
+ def __init__ (self , provides : Optional [Union [ _Callable [..., T ], str ]] = None , * args : Injection , ** kwargs : Injection ) -> None : ...
330
330
@property
331
331
def cls (self ) -> Type [T ]: ...
332
332
@property
333
333
def provides (self ) -> Optional [_Callable [..., T ]]: ...
334
- def set_provides (self , provides : Optional [_Callable [..., T ]]) -> BaseSingleton [T ]: ...
334
+ def set_provides (self , provides : Optional [Union [ _Callable [..., T ], str ]]) -> BaseSingleton [T ]: ...
335
335
@property
336
336
def args (self ) -> Tuple [Injection ]: ...
337
337
def add_args (self , * args : Injection ) -> BaseSingleton [T ]: ...
@@ -377,7 +377,7 @@ class AbstractSingleton(BaseSingleton[T]):
377
377
378
378
379
379
class SingletonDelegate (Delegate ):
380
- def __init__ (self , factory : BaseSingleton ): ...
380
+ def __init__ (self , singleton : BaseSingleton ): ...
381
381
382
382
383
383
class List (Provider [_List ]):
@@ -410,7 +410,7 @@ class Resource(Provider[T]):
410
410
@overload
411
411
def __init__ (self , provides : Optional [_Callable [..., _Coroutine [Injection , Injection , T ]]] = None , * args : Injection , ** kwargs : Injection ) -> None : ...
412
412
@overload
413
- def __init__ (self , provides : Optional [_Callable [..., T ]] = None , * args : Injection , ** kwargs : Injection ) -> None : ...
413
+ def __init__ (self , provides : Optional [Union [ _Callable [..., T ], str ]] = None , * args : Injection , ** kwargs : Injection ) -> None : ...
414
414
@property
415
415
def provides (self ) -> Optional [_Callable [..., Any ]]: ...
416
416
def set_provides (self , provides : Optional [Any ]) -> Resource [T ]: ...
0 commit comments