Refactor Singleton typing stubs to return singleton from argument methods

This commit is contained in:
Roman Mogylatov 2021-01-02 23:32:23 -05:00
parent 644406b594
commit cb2a36b216

View File

@ -285,19 +285,19 @@ class BaseSingleton(Provider, Generic[T]):
def cls(self) -> T: ...
@property
def args(self) -> Tuple[Injection]: ...
def add_args(self, *args: Injection) -> Factory[T]: ...
def set_args(self, *args: Injection) -> Factory[T]: ...
def clear_args(self) -> Factory[T]: ...
def add_args(self, *args: Injection) -> BaseSingleton[T]: ...
def set_args(self, *args: Injection) -> BaseSingleton[T]: ...
def clear_args(self) -> BaseSingleton[T]: ...
@property
def kwargs(self) -> _Dict[str, Injection]: ...
def add_kwargs(self, **kwargs: Injection) -> Factory[T]: ...
def set_kwargs(self, **kwargs: Injection) -> Factory[T]: ...
def clear_kwargs(self) -> Factory[T]: ...
def add_kwargs(self, **kwargs: Injection) -> BaseSingleton[T]: ...
def set_kwargs(self, **kwargs: Injection) -> BaseSingleton[T]: ...
def clear_kwargs(self) -> BaseSingleton[T]: ...
@property
def attributes(self) -> _Dict[str, Injection]: ...
def add_attributes(self, **kwargs: Injection) -> Factory[T]: ...
def set_attributes(self, **kwargs: Injection) -> Factory[T]: ...
def clear_attributes(self) -> Factory[T]: ...
def add_attributes(self, **kwargs: Injection) -> BaseSingleton[T]: ...
def set_attributes(self, **kwargs: Injection) -> BaseSingleton[T]: ...
def clear_attributes(self) -> BaseSingleton[T]: ...
def reset(self) -> None: ...