Skip to content

Commit 5c8748e

Browse files
style: use __name__ for cleaner type names in error messages
1 parent 04161ff commit 5c8748e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/google/adk/tools/function_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def _preprocess_args(
170170
)
171171
except pydantic.ValidationError as e:
172172
validation_errors.append(
173-
f"Parameter '{param_name}': expected type '{target_type}',"
173+
f"Parameter '{param_name}': expected type '{getattr(target_type, '__name__', target_type)}',"
174174
f' validation error: {e}'
175175
)
176176
except (TypeError, NameError) as e:

0 commit comments

Comments
 (0)