2828 Tuple [Generator [None , Result [object ], None ], HookImpl ],
2929 Generator [None , object , object ],
3030]
31+ else :
32+
33+ def cast (t , v ):
34+ return v
3135
3236from ._hooks import HookImpl
3337from ._result import HookCallError
@@ -94,7 +98,7 @@ def _multicall(
9498 # If this cast is not valid, a type error is raised below,
9599 # which is the desired response.
96100 res = hook_impl .function (* args )
97- wrapper_gen = cast (Generator [None , Result [object ], None ], res )
101+ wrapper_gen = cast (" Generator[None, Result[object], None]" , res )
98102 next (wrapper_gen ) # first yield
99103 teardowns .append ((wrapper_gen , hook_impl ))
100104 except StopIteration :
@@ -104,7 +108,7 @@ def _multicall(
104108 # If this cast is not valid, a type error is raised below,
105109 # which is the desired response.
106110 res = hook_impl .function (* args )
107- function_gen = cast (Generator [None , object , object ], res )
111+ function_gen = cast (" Generator[None, object, object]" , res )
108112 next (function_gen ) # first yield
109113 teardowns .append (function_gen )
110114 except StopIteration :
0 commit comments