From fc2633faa3c421526343b5f7322a5a3ff82c9cf7 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Sat, 28 Nov 2020 21:34:48 -0500 Subject: [PATCH] Update resource provider typing stub for stutdown --- src/dependency_injector/providers.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dependency_injector/providers.pyi b/src/dependency_injector/providers.pyi index 983f80db..80e5b264 100644 --- a/src/dependency_injector/providers.pyi +++ b/src/dependency_injector/providers.pyi @@ -2,6 +2,7 @@ from __future__ import annotations from pathlib import Path from typing import ( + Awaitable, TypeVar, Generic, Type, @@ -300,7 +301,7 @@ class Resource(Provider, Generic[T]): @property def initialized(self) -> bool: ... def init(self) -> T: ... - def shutdown(self) -> None: ... + def shutdown(self) -> Optional[Awaitable]: ... class Container(Provider):