@@ -62,11 +62,11 @@ def __enter__(self) -> R:
6262 except StopIteration :
6363 raise RuntimeError ("generator didn't yield" ) from None
6464
65- def __call__ (self , func : V ) -> V : # type : ignore[reportIncompatibleMethodOverride]
65+ def __call__ (self , func : V ) -> V : # pyright : ignore [reportIncompatibleMethodOverride]
6666 if asyncio .iscoroutinefunction (func ):
6767
6868 @functools .wraps (func ) # type: ignore
69- async def async_wrapper (* args : Pargs , ** kwargs : Pkwargs ) -> R : # type : ignore[reportInvalidTypeVarUse]
69+ async def async_wrapper (* args : Pargs , ** kwargs : Pkwargs ) -> R : # pyright : ignore [reportInvalidTypeVarUse]
7070 with self ._recreate_cm (): # type: ignore
7171 return await func (* args , ** kwargs ) # type: ignore
7272
@@ -78,8 +78,8 @@ def _agnosticcontextmanager(
7878 func : "Callable[P, Iterator[R]]" ,
7979) -> "Callable[P, _AgnosticContextManager[R]]" :
8080 @functools .wraps (func )
81- def helper (* args : Pargs , ** kwargs : Pkwargs ) -> _AgnosticContextManager [R ]: # type : ignore[reportInvalidTypeVarUse]
82- return _AgnosticContextManager (func , args , kwargs ) # type : ignore[reportArgumentType]
81+ def helper (* args : Pargs , ** kwargs : Pkwargs ) -> _AgnosticContextManager [R ]: # pyright : ignore [reportInvalidTypeVarUse]
82+ return _AgnosticContextManager (func , args , kwargs ) # pyright : ignore [reportArgumentType]
8383
8484 # Ignoring the type to keep the original signature of the function
8585 return helper # type: ignore[return-value]
0 commit comments