Skip to content

Commit 1c58507

Browse files
Update src/a2a/utils/proto_utils.py
Co-authored-by: Holt Skinner <[email protected]>
1 parent ff153f4 commit 1c58507

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/a2a/utils/proto_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ def make_dict_serializable(value: Any) -> Any:
5757
Returns:
5858
A serializable value.
5959
"""
60+
if isinstance(value, (str, int, float, bool)) or value is None:
61+
return value
6062
if isinstance(value, dict):
6163
return {k: make_dict_serializable(v) for k, v in value.items()}
6264
if isinstance(value, list | tuple):
6365
return [make_dict_serializable(item) for item in value]
64-
if isinstance(value, str | int | float | bool) or value is None:
65-
return value
6666
return str(value)
6767

6868

0 commit comments

Comments
 (0)