@devries-cameron20 / composio Mirror · read-only / commits / 386a3a561
Fork 0

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

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 22:00 UTC

fix: remove unwanted usage of abc

angrybayblade committed Jul 3, 2025 at 11:20 UTC 386a3a561c0058588989ec4643dd50cc6f3a29f4
3 files changed +5 -8
python/composio/core/provider/agentic.py
+2 -3
@@ -1,4 +1,3 @@
1 -import abc
1 import typing as t
2
3 from composio.client.types import Tool
@@ -33,18 +32,18 @@ class AgenticProvider(BaseProvider, t.Generic[TTool, TToolCollection]):
32 def __init_subclass__(cls, name: str) -> None:
33 cls.name = name
34
36 - @abc.abstractmethod
35 def wrap_tool(
36 self,
37 tool: Tool,
38 execute_tool: AgenticProviderExecuteFn,
39 ) -> TTool:
40 """Wrap a tool in the provider-specific format"""
41 + raise NotImplementedError
42
44 - @abc.abstractmethod
43 def wrap_tools(
44 self,
45 tools: t.Sequence[Tool],
46 execute_tool: AgenticProviderExecuteFn,
47 ) -> TToolCollection:
48 """Wrap a list of tools in the provider-specific format"""
49 + raise NotImplementedError
python/composio/core/provider/base.py
+1 -2
@@ -6,14 +6,13 @@ Defines the barebones provider metaclass that needs to be subclassed for every p
6
7 from __future__ import annotations
8
9 -import abc
9 import typing as t
10
11 TTool = t.TypeVar("TTool", covariant=True)
12 TToolCollection = t.TypeVar("TToolCollection", covariant=True)
13
14
16 -class BaseProvider(abc.ABC, t.Generic[TTool, TToolCollection]):
15 +class BaseProvider(t.Generic[TTool, TToolCollection]):
16 """
17 BaseProvider class
18
python/composio/core/provider/none_agentic.py
+2 -3
@@ -1,6 +1,5 @@
1 from __future__ import annotations
2
3 -import abc
3 import typing as t
4
5 from composio.client.types import Tool
@@ -44,16 +43,16 @@ class NonAgenticProvider(BaseProvider, t.Generic[TTool, TToolCollection]):
43 def set_execute_tool_fn(self, execute_tool_fn: NoneAgenticProviderExecuteFn):
44 self.execute_tool = execute_tool_fn
45
47 - @abc.abstractmethod
46 def wrap_tool(
47 self,
48 tool: Tool,
49 ) -> TTool:
50 """Wrap a tool in the provider-specific format"""
51 + raise NotImplementedError
52
54 - @abc.abstractmethod
53 def wrap_tools(
54 self,
55 tools: t.Sequence[Tool],
56 ) -> TToolCollection:
57 """Wrap a list of tools in the provider-specific format"""
58 + raise NotImplementedError