Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
fix(schema-converter): silence mypy on null-only-anyOf fallback return
venkat82164563486697
diff --git a/python/composio/utils/schema_converter.py b/python/composio/utils/schema_converter.pyindex 233c78b0b..b8e341608 100644--- a/python/composio/utils/schema_converter.py+++ b/python/composio/utils/schema_converter.py@@ -234,6 +234,8 @@ def _handle_toplevel_combiner(allow_undefined_array_items=True,allow_undefined_type=True,)+ if result is type(None):+ return t.Optional[t.Any]# If result is a type (like a Union or Optional), return it directly# If result is a model class, return itreturn result@@ -270,7 +272,7 @@ def _build_union_from_options(options: t.List[t.Dict[str, t.Any]]) -> t.Type:pydantic_types.append(ptype)if len(pydantic_types) == 0:- return str # Fallback+ return t.Optional[t.Any] if has_null else str # type: ignoreif len(pydantic_types) == 1:base_type = pydantic_types[0]