mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-10-18 01:34:24 +03:00
Add missing stub on providers.Resource for AbstractContextManager and AbstractAsyncContextManager
This commit is contained in:
parent
5acddac9c1
commit
29827cb411
|
@ -1,5 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from contextlib import AbstractContextManager, AbstractAsyncContextManager
|
||||
from pathlib import Path
|
||||
from typing import (
|
||||
Awaitable,
|
||||
|
@ -465,6 +466,20 @@ class Resource(Provider[T]):
|
|||
**kwargs: Injection,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def __init__(
|
||||
self,
|
||||
provides: Optional[_Callable[..., AbstractContextManager[T]]] = None,
|
||||
*args: Injection,
|
||||
**kwargs: Injection,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def __init__(
|
||||
self,
|
||||
provides: Optional[_Callable[..., AbstractAsyncContextManager[T]]] = None,
|
||||
*args: Injection,
|
||||
**kwargs: Injection,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def __init__(
|
||||
self,
|
||||
provides: Optional[_Callable[..., _Iterator[T]]] = None,
|
||||
|
|
Loading…
Reference in New Issue
Block a user