Commit ba6cfe6 1 parent 34defc9 commit ba6cfe6 Copy full SHA for ba6cfe6
File tree 2 files changed +7
-20
lines changed
2 files changed +7
-20
lines changed Original file line number Diff line number Diff line change @@ -388,19 +388,6 @@ def add(a: int, b: int) -> int:
388
388
)
389
389
390
390
391
- def _placeholder_call () -> Call :
392
- # Import here to avoid circular dependency
393
- from weave .trace .weave_client import Call
394
-
395
- return Call (
396
- _op_name = "" ,
397
- trace_id = "" ,
398
- project_id = "" ,
399
- parent_id = None ,
400
- inputs = {},
401
- )
402
-
403
-
404
391
def _do_call (
405
392
op : Op ,
406
393
* args : Any ,
@@ -409,7 +396,7 @@ def _do_call(
409
396
** kwargs : Any ,
410
397
) -> tuple [Any , Call ]:
411
398
func = op .resolve_fn
412
- call = _placeholder_call ()
399
+ call = Call ()
413
400
414
401
pargs = None
415
402
if op ._on_input_handler is not None :
@@ -481,7 +468,7 @@ async def _do_call_async(
481
468
** kwargs : Any ,
482
469
) -> tuple [Any , Call ]:
483
470
func = op .resolve_fn
484
- call = _placeholder_call ()
471
+ call = Call ()
485
472
486
473
# Handle all of the possible cases where we would skip tracing.
487
474
if settings .should_disable_weave ():
Original file line number Diff line number Diff line change @@ -499,11 +499,11 @@ class CallDict(TypedDict):
499
499
class Call :
500
500
"""A Call represents a single operation that was executed as part of a trace."""
501
501
502
- _op_name : str | Future [str ]
503
- trace_id : str
504
- project_id : str
505
- parent_id : str | None
506
- inputs : dict
502
+ _op_name : str | Future [str ] = ""
503
+ trace_id : str = ""
504
+ project_id : str = ""
505
+ parent_id : str | None = None
506
+ inputs : dict = dataclasses . field ( default_factory = dict )
507
507
id : str | None = None
508
508
output : Any = None
509
509
exception : str | None = None
You can’t perform that action at this time.
0 commit comments