@@ -269,7 +269,7 @@ def __init__(
269
269
self .name = name
270
270
self .model_settings = model_settings
271
271
272
- if 'result_type' in _deprecated_kwargs : # pragma: not covered
272
+ if 'result_type' in _deprecated_kwargs : # pragma: no cover
273
273
if output_type is not str :
274
274
raise TypeError ('`result_type` and `output_type` cannot be set at the same time.' )
275
275
warnings .warn ('`result_type` is deprecated, use `output_type` instead' , DeprecationWarning )
@@ -282,20 +282,20 @@ def __init__(
282
282
self ._deps_type = deps_type
283
283
284
284
self ._deprecated_result_tool_name = _deprecated_kwargs .get ('result_tool_name' )
285
- if self ._deprecated_result_tool_name is not None : # pragma: not covered
285
+ if self ._deprecated_result_tool_name is not None : # pragma: no cover
286
286
warnings .warn (
287
287
'`result_tool_name` is deprecated, use `output_type` with `ToolOutput` instead' ,
288
288
DeprecationWarning ,
289
289
)
290
290
291
291
self ._deprecated_result_tool_description = _deprecated_kwargs .get ('result_tool_description' )
292
- if self ._deprecated_result_tool_description is not None : # pragma: not covered
292
+ if self ._deprecated_result_tool_description is not None : # pragma: no cover
293
293
warnings .warn (
294
294
'`result_tool_description` is deprecated, use `output_type` with `ToolOutput` instead' ,
295
295
DeprecationWarning ,
296
296
)
297
297
result_retries = _deprecated_kwargs .get ('result_retries' )
298
- if result_retries is not None : # pragma: not covered
298
+ if result_retries is not None : # pragma: no cover
299
299
if output_retries is not None :
300
300
raise TypeError ('`output_retries` and `result_retries` cannot be set at the same time.' )
301
301
warnings .warn ('`result_retries` is deprecated, use `max_result_retries` instead' , DeprecationWarning )
@@ -432,7 +432,7 @@ async def main():
432
432
if infer_name and self .name is None :
433
433
self ._infer_name (inspect .currentframe ())
434
434
435
- if 'result_type' in _deprecated_kwargs : # pragma: not covered
435
+ if 'result_type' in _deprecated_kwargs : # pragma: no cover
436
436
if output_type is not str :
437
437
raise TypeError ('`result_type` and `output_type` cannot be set at the same time.' )
438
438
warnings .warn ('`result_type` is deprecated, use `output_type` instead.' , DeprecationWarning )
@@ -583,7 +583,7 @@ async def main():
583
583
model_used = self ._get_model (model )
584
584
del model
585
585
586
- if 'result_type' in _deprecated_kwargs : # pragma: not covered
586
+ if 'result_type' in _deprecated_kwargs : # pragma: no cover
587
587
if output_type is not str :
588
588
raise TypeError ('`result_type` and `output_type` cannot be set at the same time.' )
589
589
warnings .warn ('`result_type` is deprecated, use `output_type` instead.' , DeprecationWarning )
@@ -810,7 +810,7 @@ def run_sync(
810
810
if infer_name and self .name is None :
811
811
self ._infer_name (inspect .currentframe ())
812
812
813
- if 'result_type' in _deprecated_kwargs : # pragma: not covered
813
+ if 'result_type' in _deprecated_kwargs : # pragma: no cover
814
814
if output_type is not str :
815
815
raise TypeError ('`result_type` and `output_type` cannot be set at the same time.' )
816
816
warnings .warn ('`result_type` is deprecated, use `output_type` instead.' , DeprecationWarning )
@@ -926,7 +926,7 @@ async def main():
926
926
if frame := inspect .currentframe (): # pragma: no branch
927
927
self ._infer_name (frame .f_back )
928
928
929
- if 'result_type' in _deprecated_kwargs : # pragma: not covered
929
+ if 'result_type' in _deprecated_kwargs : # pragma: no cover
930
930
if output_type is not str :
931
931
raise TypeError ('`result_type` and `output_type` cannot be set at the same time.' )
932
932
warnings .warn ('`result_type` is deprecated, use `output_type` instead.' , DeprecationWarning )
@@ -1741,7 +1741,7 @@ def _traceparent(self, *, required: Literal[False]) -> str | None: ...
1741
1741
def _traceparent (self ) -> str : ...
1742
1742
def _traceparent (self , * , required : bool = True ) -> str | None :
1743
1743
traceparent = self ._graph_run ._traceparent (required = False ) # type: ignore[reportPrivateUsage]
1744
- if traceparent is None and required : # pragma: not covered
1744
+ if traceparent is None and required : # pragma: no cover
1745
1745
raise AttributeError ('No span was created for this agent run' )
1746
1746
return traceparent
1747
1747
@@ -1765,7 +1765,7 @@ def next_node(
1765
1765
return next_node
1766
1766
if _agent_graph .is_agent_node (next_node ):
1767
1767
return next_node
1768
- raise exceptions .AgentRunError (f'Unexpected node type: { type (next_node )} ' ) # pragma: not covered
1768
+ raise exceptions .AgentRunError (f'Unexpected node type: { type (next_node )} ' ) # pragma: no cover
1769
1769
1770
1770
@property
1771
1771
def result (self ) -> AgentRunResult [OutputDataT ] | None :
@@ -1907,7 +1907,7 @@ def _traceparent(self, *, required: Literal[False]) -> str | None: ...
1907
1907
@overload
1908
1908
def _traceparent (self ) -> str : ...
1909
1909
def _traceparent (self , * , required : bool = True ) -> str | None :
1910
- if self ._traceparent_value is None and required : # pragma: not covered
1910
+ if self ._traceparent_value is None and required : # pragma: no cover
1911
1911
raise AttributeError ('No span was created for this agent run' )
1912
1912
return self ._traceparent_value
1913
1913
0 commit comments