@@ -216,6 +216,7 @@ def __init__(
216216 )
217217 if strategy is None :
218218 from apcore .builtin_steps import build_standard_strategy
219+
219220 self ._strategy = build_standard_strategy (** strategy_kwargs )
220221 elif isinstance (strategy , str ):
221222 self ._strategy = self ._resolve_strategy_name (strategy , ** strategy_kwargs )
@@ -416,9 +417,7 @@ def call(
416417 errors = _convert_validation_errors (e ),
417418 ) from e
418419
419- REDACTED_OUTPUT .set (ctx , redact_sensitive (
420- output , module .output_schema .model_json_schema ()
421- ))
420+ REDACTED_OUTPUT .set (ctx , redact_sensitive (output , module .output_schema .model_json_schema ()))
422421
423422 # Step 10 -- Middleware After
424423 output = self ._middleware_manager .execute_after (module_id , inputs , output , ctx )
@@ -922,9 +921,7 @@ async def call_async(
922921 errors = _convert_validation_errors (e ),
923922 ) from e
924923
925- REDACTED_OUTPUT .set (ctx , redact_sensitive (
926- output , module .output_schema .model_json_schema ()
927- ))
924+ REDACTED_OUTPUT .set (ctx , redact_sensitive (output , module .output_schema .model_json_schema ()))
928925
929926 # Step 10 -- Middleware After (async-aware)
930927 output = await self ._middleware_manager .execute_after_async (module_id , inputs , output , ctx )
@@ -1048,9 +1045,7 @@ async def stream(
10481045 errors = _convert_validation_errors (e ),
10491046 ) from e
10501047
1051- REDACTED_OUTPUT .set (ctx , redact_sensitive (
1052- output , module .output_schema .model_json_schema ()
1053- ))
1048+ REDACTED_OUTPUT .set (ctx , redact_sensitive (output , module .output_schema .model_json_schema ()))
10541049
10551050 # Step 10 -- Middleware After (async-aware)
10561051 output = await self ._middleware_manager .execute_after_async (module_id , effective_inputs , output , ctx )
@@ -1073,9 +1068,7 @@ async def stream(
10731068 errors = _convert_validation_errors (e ),
10741069 ) from e
10751070
1076- REDACTED_OUTPUT .set (ctx , redact_sensitive (
1077- accumulated , module .output_schema .model_json_schema ()
1078- ))
1071+ REDACTED_OUTPUT .set (ctx , redact_sensitive (accumulated , module .output_schema .model_json_schema ()))
10791072
10801073 # Step 10 -- Middleware After on accumulated result (async-aware)
10811074 accumulated = await self ._middleware_manager .execute_after_async (
@@ -1226,9 +1219,7 @@ def call_with_trace(
12261219
12271220 if loop is None :
12281221 return asyncio .run (engine .run (effective_strategy , pipe_ctx ))
1229- return self ._run_in_new_thread (
1230- engine .run (effective_strategy , pipe_ctx ), module_id , None
1231- )
1222+ return self ._run_in_new_thread (engine .run (effective_strategy , pipe_ctx ), module_id , None )
12321223
12331224 async def call_async_with_trace (
12341225 self ,
@@ -1263,7 +1254,8 @@ async def call_async_with_trace(
12631254 return await engine .run (effective_strategy , pipe_ctx )
12641255
12651256 def _effective_strategy (
1266- self , strategy : ExecutionStrategy | str | None ,
1257+ self ,
1258+ strategy : ExecutionStrategy | str | None ,
12671259 ) -> ExecutionStrategy :
12681260 """Return the strategy to use for a call, resolving strings."""
12691261 if strategy is None :
0 commit comments