File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
opentelemetry-api/src/opentelemetry/util Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,14 @@ async def async_wrapper(*args: Pargs, **kwargs: Pkwargs) -> R:
7373
7474def _agnosticcontextmanager (
7575 func : "Callable[P, Iterator[R]]" ,
76+ ) -> "Callable[P, _AgnosticContextManager[R]]" :
77+ @functools .wraps (func )
78+ def helper (* args : Pargs , ** kwargs : Pkwargs ) -> _AgnosticContextManager [R ]:
79+ return _AgnosticContextManager (func , args , kwargs )
80+
81+ # Ingoring the type to keep the original signature of the function
82+ return helper # type: ignore[return-value]
83+ func : "Callable[P, Iterator[R]]" ,
7684) -> "Callable[P, _AgnosticContextManager[R]]" : # type: ignore[return-value]
7785 @functools .wraps (func )
7886 def helper (* args : Pargs , ** kwargs : Pkwargs ) -> _AgnosticContextManager [R ]:
You can’t perform that action at this time.
0 commit comments