Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix: remove unwanted usage of abc

angrybayblade386a3a561c00
diff --git a/python/composio/core/provider/agentic.py b/python/composio/core/provider/agentic.py
index 0c3a3db77..7ab3908bc 100644
--- a/python/composio/core/provider/agentic.py
+++ b/python/composio/core/provider/agentic.py
@@ -1,4 +1,3 @@
-import abc
import typing as t
from composio.client.types import Tool
@@ -33,18 +32,18 @@ class AgenticProvider(BaseProvider, t.Generic[TTool, TToolCollection]):
def __init_subclass__(cls, name: str) -> None:
cls.name = name
- @abc.abstractmethod
def wrap_tool(
self,
tool: Tool,
execute_tool: AgenticProviderExecuteFn,
) -> TTool:
"""Wrap a tool in the provider-specific format"""
+ raise NotImplementedError
- @abc.abstractmethod
def wrap_tools(
self,
tools: t.Sequence[Tool],
execute_tool: AgenticProviderExecuteFn,
) -> TToolCollection:
"""Wrap a list of tools in the provider-specific format"""
+ raise NotImplementedError
diff --git a/python/composio/core/provider/base.py b/python/composio/core/provider/base.py
index 413203beb..f7e74de7b 100644
--- a/python/composio/core/provider/base.py
+++ b/python/composio/core/provider/base.py
@@ -6,14 +6,13 @@ Defines the barebones provider metaclass that needs to be subclassed for every p
from __future__ import annotations
-import abc
import typing as t
TTool = t.TypeVar("TTool", covariant=True)
TToolCollection = t.TypeVar("TToolCollection", covariant=True)
-class BaseProvider(abc.ABC, t.Generic[TTool, TToolCollection]):
+class BaseProvider(t.Generic[TTool, TToolCollection]):
"""
BaseProvider class
diff --git a/python/composio/core/provider/none_agentic.py b/python/composio/core/provider/none_agentic.py
index 595b134df..8eb99510e 100644
--- a/python/composio/core/provider/none_agentic.py
+++ b/python/composio/core/provider/none_agentic.py
@@ -1,6 +1,5 @@
from __future__ import annotations
-import abc
import typing as t
from composio.client.types import Tool
@@ -44,16 +43,16 @@ class NonAgenticProvider(BaseProvider, t.Generic[TTool, TToolCollection]):
def set_execute_tool_fn(self, execute_tool_fn: NoneAgenticProviderExecuteFn):
self.execute_tool = execute_tool_fn
- @abc.abstractmethod
def wrap_tool(
self,
tool: Tool,
) -> TTool:
"""Wrap a tool in the provider-specific format"""
+ raise NotImplementedError
- @abc.abstractmethod
def wrap_tools(
self,
tools: t.Sequence[Tool],
) -> TToolCollection:
"""Wrap a list of tools in the provider-specific format"""
+ raise NotImplementedError