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: skip classmethods from the trace wrapper
angrybaybladedcc1cb67aa59
diff --git a/python/composio/core/models/base.py b/python/composio/core/models/base.pyindex 1797371c5..730f63928 100644--- a/python/composio/core/models/base.py+++ b/python/composio/core/models/base.py@@ -24,6 +24,10 @@ _environment = os.getenv("ENVIRONMENT", "development")def trace_method(method: t.Callable, name: str, **attributes: t.Any) -> t.Callable:"""Wrap a method to log the call."""+ # Check if the method is a class method+ if getattr(method, "__self__", None) is not None:+ return method+@functools.wraps(method)def trace_wrapper(self, *args, **kwargs):if not allow_tracking.get():diff --git a/python/composio/core/models/connected_accounts.py b/python/composio/core/models/connected_accounts.pyindex 3f9dade12..449b3c234 100644--- a/python/composio/core/models/connected_accounts.py+++ b/python/composio/core/models/connected_accounts.py@@ -360,16 +360,10 @@ class ConnectedAccounts:"""Wait for connected account with given ID to be active"""- # Get the connection status first- connection = self._client.connected_accounts.retrieve(nanoid=id)- # Create a ConnectionRequest instance- connection_request = ConnectionRequest(+ return ConnectionRequest.from_id(id=id,- status=connection.status,- redirect_url=None,client=self._client,- )- return connection_request.wait_for_connection(+ ).wait_for_connection(timeout=timeout,)