From 1271d0fa7956e694c99370120dde4da7930ebcf3 Mon Sep 17 00:00:00 2001 From: ZipFile Date: Fri, 30 May 2025 19:29:11 +0000 Subject: [PATCH] Add type info for _cwiring module --- src/dependency_injector/_cwiring.pyi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/dependency_injector/_cwiring.pyi diff --git a/src/dependency_injector/_cwiring.pyi b/src/dependency_injector/_cwiring.pyi new file mode 100644 index 00000000..e7ff12f4 --- /dev/null +++ b/src/dependency_injector/_cwiring.pyi @@ -0,0 +1,23 @@ +from typing import Any, Awaitable, Callable, Dict, Tuple, TypeVar + +from .providers import Provider + +T = TypeVar("T") + +def _sync_inject( + fn: Callable[..., T], + args: Tuple[Any, ...], + kwargs: Dict[str, Any], + injections: Dict[str, Provider[Any]], + closings: Dict[str, Provider[Any]], + /, +) -> T: ... +async def _async_inject( + fn: Callable[..., Awaitable[T]], + args: Tuple[Any, ...], + kwargs: Dict[str, Any], + injections: Dict[str, Provider[Any]], + closings: Dict[str, Provider[Any]], + /, +) -> T: ... +def _isawaitable(instance: Any) -> bool: ...