@@ -316,7 +316,7 @@ def await_scored(
316316 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
317317 ) -> ScenarioRunView :
318318 """Wait for a scenario run to be scored.
319-
319+
320320 Args:
321321 id: The ID of the scenario run to wait for
322322 polling_config: Optional polling configuration
@@ -332,13 +332,10 @@ def await_scored(
332332 PollingTimeout: If polling times out before scenario run is scored
333333 RunloopError: If scenario run enters a non-scored terminal state
334334 """
335+
335336 def retrieve_run () -> ScenarioRunView :
336337 return self .retrieve (
337- id ,
338- extra_headers = extra_headers ,
339- extra_query = extra_query ,
340- extra_body = extra_body ,
341- timeout = timeout
338+ id , extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
342339 )
343340
344341 def is_done_scoring (run : ScenarioRunView ) -> bool :
@@ -347,9 +344,7 @@ def is_done_scoring(run: ScenarioRunView) -> bool:
347344 run = poll_until (retrieve_run , is_done_scoring , polling_config )
348345
349346 if run .state != "scored" :
350- raise RunloopError (
351- f"Scenario run entered non-scored state unexpectedly: { run .state } "
352- )
347+ raise RunloopError (f"Scenario run entered non-scored state unexpectedly: { run .state } " )
353348
354349 return run
355350
@@ -366,7 +361,7 @@ def score_and_await(
366361 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
367362 ) -> ScenarioRunView :
368363 """Score a scenario run and wait for it to be scored.
369-
364+
370365 Args:
371366 id: The ID of the scenario run to score and wait for
372367 polling_config: Optional polling configuration
@@ -412,7 +407,7 @@ def score_and_complete(
412407 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
413408 ) -> ScenarioRunView :
414409 """Score a scenario run, wait for it to be scored, then complete it.
415-
410+
416411 Args:
417412 id: The ID of the scenario run to score, wait for, and complete
418413 polling_config: Optional polling configuration
@@ -445,6 +440,7 @@ def score_and_complete(
445440 timeout = timeout ,
446441 )
447442
443+
448444class AsyncRunsResource (AsyncAPIResource ):
449445 @cached_property
450446 def with_raw_response (self ) -> AsyncRunsResourceWithRawResponse :
@@ -728,7 +724,7 @@ async def await_scored(
728724 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
729725 ) -> ScenarioRunView :
730726 """Wait for a scenario run to be scored.
731-
727+
732728 Args:
733729 id: The ID of the scenario run to wait for
734730 polling_config: Optional polling configuration
@@ -744,13 +740,10 @@ async def await_scored(
744740 PollingTimeout: If polling times out before scenario run is scored
745741 RunloopError: If scenario run enters a non-scored terminal state
746742 """
743+
747744 async def retrieve_run () -> ScenarioRunView :
748745 return await self .retrieve (
749- id ,
750- extra_headers = extra_headers ,
751- extra_query = extra_query ,
752- extra_body = extra_body ,
753- timeout = timeout
746+ id , extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
754747 )
755748
756749 def is_done_scoring (run : ScenarioRunView ) -> bool :
@@ -759,9 +752,7 @@ def is_done_scoring(run: ScenarioRunView) -> bool:
759752 run = await async_poll_until (retrieve_run , is_done_scoring , polling_config )
760753
761754 if run .state != "scored" :
762- raise RunloopError (
763- f"Scenario run entered non-scored state unexpectedly: { run .state } "
764- )
755+ raise RunloopError (f"Scenario run entered non-scored state unexpectedly: { run .state } " )
765756
766757 return run
767758
@@ -778,7 +769,7 @@ async def score_and_await(
778769 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
779770 ) -> ScenarioRunView :
780771 """Score a scenario run and wait for it to be scored.
781-
772+
782773 Args:
783774 id: The ID of the scenario run to score and wait for
784775 polling_config: Optional polling configuration
@@ -824,7 +815,7 @@ async def score_and_complete(
824815 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
825816 ) -> ScenarioRunView :
826817 """Score a scenario run, wait for it to be scored, then complete it.
827-
818+
828819 Args:
829820 id: The ID of the scenario run to score, wait for, and complete
830821 polling_config: Optional polling configuration
0 commit comments