@@ -47,9 +47,7 @@ def __init__(self) -> None:
4747 def execute (self , inputs : dict [str , Any ], context : Context ) -> dict [str , Any ]:
4848 return {"value" : inputs ["count" ]}
4949
50- async def stream (
51- self , inputs : dict [str , Any ], context : Context
52- ) -> AsyncIterator [dict [str , Any ]]:
50+ async def stream (self , inputs : dict [str , Any ], context : Context ) -> AsyncIterator [dict [str , Any ]]:
5351 for i in range (1 , inputs ["count" ] + 1 ):
5452 yield {"value" : i }
5553
@@ -64,9 +62,7 @@ def __init__(self) -> None:
6462 def execute (self , inputs : dict [str , Any ], context : Context ) -> dict [str , Any ]:
6563 return {"a" : "val_a" , "b" : "val_b" }
6664
67- async def stream (
68- self , inputs : dict [str , Any ], context : Context
69- ) -> AsyncIterator [dict [str , Any ]]:
65+ async def stream (self , inputs : dict [str , Any ], context : Context ) -> AsyncIterator [dict [str , Any ]]:
7066 yield {"a" : "val_a" }
7167 yield {"b" : "val_b" }
7268
@@ -138,9 +134,7 @@ def after(
138134 log .append ("after" )
139135 return None
140136
141- ex = _make_executor (
142- module = mod , module_id = "counter" , middlewares = [TrackingMiddleware ()]
143- )
137+ ex = _make_executor (module = mod , module_id = "counter" , middlewares = [TrackingMiddleware ()])
144138
145139 chunks : list [dict [str , Any ]] = []
146140 async for chunk in ex .stream ("counter" , {"count" : 2 }):
@@ -166,9 +160,7 @@ def after(
166160 after_output = dict (output )
167161 return None
168162
169- ex = _make_executor (
170- module = mod , module_id = "disjoint" , middlewares = [CaptureAfter ()]
171- )
163+ ex = _make_executor (module = mod , module_id = "disjoint" , middlewares = [CaptureAfter ()])
172164
173165 chunks : list [dict [str , Any ]] = []
174166 async for chunk in ex .stream ("disjoint" , {}):
0 commit comments