Skip to content

Commit 9ca3ddc

Browse files
committed
chore: can link add datasource methods
1 parent 4f2abf6 commit 9ca3ddc

File tree

1 file changed

+4
-1
lines changed
  • src/agent_toolkit/forestadmin/agent_toolkit

1 file changed

+4
-1
lines changed

src/agent_toolkit/forestadmin/agent_toolkit/agent.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ async def get_resources(self):
131131
await self.__mk_resources()
132132
return self._resources
133133

134-
def add_datasource(self, datasource: Datasource[BoundCollection], options: Optional[DataSourceOptions] = None):
134+
def add_datasource(
135+
self, datasource: Datasource[BoundCollection], options: Optional[DataSourceOptions] = None
136+
) -> Self:
135137
"""Add a datasource
136138
137139
Args:
@@ -142,6 +144,7 @@ def add_datasource(self, datasource: Datasource[BoundCollection], options: Optio
142144
options = {}
143145
self.customizer.add_datasource(datasource, options)
144146
self._resources = None
147+
return self
145148

146149
def use(self, plugin: type, options: Optional[Dict] = {}) -> Self:
147150
"""Load a plugin across all collections

0 commit comments

Comments
 (0)