mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-12-01 14:04:01 +03:00
Add overload for Factory typing
This commit is contained in:
parent
b446dab559
commit
541641d36c
|
@ -169,7 +169,10 @@ class Configuration(Object):
|
|||
class Factory(Provider, Generic[T]):
|
||||
provided_type: Optional[Type]
|
||||
def __init__(self, provides: _Callable[..., T], *args: Injection, **kwargs: Injection) -> None: ...
|
||||
def __call__(self, *args: Injection, **kwargs: Injection) -> Union[T, Awaitable[T]]: ...
|
||||
@overload
|
||||
def __call__(self, *args: Injection, **kwargs: Injection) -> T: ...
|
||||
@overload
|
||||
def __call__(self, *args: Injection, **kwargs: Injection) -> Awaitable[T]: ...
|
||||
@property
|
||||
def cls(self) -> T: ...
|
||||
@property
|
||||
|
|
Loading…
Reference in New Issue
Block a user