Skip to content

Commit a82da28

Browse files
committed
fix(graph-workflow): pass a dict to Edge.from_nodes' metadata argument
Edge normalizes with 'metadata or {}', so kwargs and 'kwargs if kwargs else None' produce the identical edge; the Optional form only made Pyre report an incompatible parameter type at the call site.
1 parent b223123 commit a82da28

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

swarms/structs/graph_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ def from_nodes(
828828

829829
# Put all kwargs into metadata dict
830830
condition = kwargs.pop("condition", None)
831-
metadata = kwargs if kwargs else None
831+
metadata = kwargs
832832
return cls(
833833
source=src,
834834
target=tgt,

0 commit comments

Comments
 (0)