Fix mypy stub of the `DeclarativeContainer to specify the __init__` interface

This commit is contained in:
Roman Mogylatov 2020-09-01 21:16:28 -04:00
parent 64a38a6020
commit 9e6b52aad4
2 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,7 @@ Development version
------------------- -------------------
- Update documentation and rework examples for: ``Singleton``, ``Callable``, ``Coroutine``, - Update documentation and rework examples for: ``Singleton``, ``Callable``, ``Coroutine``,
``Object``, ``List``, ``Configuration``, ``Selector`` providers. ``Object``, ``List``, ``Configuration``, ``Selector`` providers.
- Fix mypy stub of the ``DeclarativeContainer`` to specify the ``__init__`` interface.
3.34.0 3.34.0
------ ------

View File

@ -24,6 +24,7 @@ class DynamicContainer(Container): ...
class DeclarativeContainer(Container): class DeclarativeContainer(Container):
cls_providers: ClassVar[Dict[str, Provider]] cls_providers: ClassVar[Dict[str, Provider]]
inherited_providers: ClassVar[Dict[str, Provider]] inherited_providers: ClassVar[Dict[str, Provider]]
def __init__(self, **overriding_providers: Provider) -> None: ...
def override(container: Container) -> _Callable[[Container], Container]: ... def override(container: Container) -> _Callable[[Container], Container]: ...