core[patch]: consolidate conditional in BaseTool (#16530)

- **Description:** Refactor contradictory conditional to single line
  - **Issue:** #16528
pull/16550/head
arnob-sengupta 5 months ago committed by GitHub
parent 5c2538b9f7
commit f9976b9630
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -111,8 +111,7 @@ class BaseTool(RunnableSerializable[Union[str, Dict], Any]):
args_schema_type = cls.__annotations__.get("args_schema", None)
if args_schema_type is not None:
if args_schema_type is None or args_schema_type == BaseModel:
if args_schema_type is not None and args_schema_type == BaseModel:
# Throw errors for common mis-annotations.
# TODO: Use get_args / get_origin and fully
# specify valid annotations.

Loading…
Cancel
Save