Skip to content

Commit b58d649

Browse files
committed
lint
1 parent f23560d commit b58d649

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

packages/toolbox-langchain/src/toolbox_langchain/async_client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from typing import Any, Callable, Optional, Union, Mapping, Awaitable
15+
from typing import Any, Awaitable, Callable, Mapping, Optional, Union
1616
from warnings import warn
1717

1818
from aiohttp import ClientSession
@@ -41,7 +41,9 @@ def __init__(
4141
url: The base URL of the Toolbox service.
4242
session: An HTTP client session.
4343
"""
44-
self.__core_client = ToolboxCoreClient(url=url, session=session, client_headers=client_headers)
44+
self.__core_client = ToolboxCoreClient(
45+
url=url, session=session, client_headers=client_headers
46+
)
4547

4648
async def aload_tool(
4749
self,
@@ -188,7 +190,7 @@ def load_toolset(
188190
strict: bool = False,
189191
) -> list[AsyncToolboxTool]:
190192
raise NotImplementedError("Synchronous methods not supported by async client.")
191-
193+
192194
def add_headers(
193195
self,
194196
headers: Mapping[str, Union[Callable[[], str], Callable[[], Awaitable[str]]]],

packages/toolbox-langchain/src/toolbox_langchain/client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
from asyncio import to_thread
16-
from typing import Any, Callable, Optional, Union, Mapping, Awaitable
16+
from typing import Any, Awaitable, Callable, Mapping, Optional, Union
1717
from warnings import warn
1818

1919
from toolbox_core.sync_client import ToolboxSyncClient as ToolboxCoreSyncClient
@@ -36,7 +36,9 @@ def __init__(
3636
Args:
3737
url: The base URL of the Toolbox service.
3838
"""
39-
self.__core_client = ToolboxCoreSyncClient(url=url, client_headers=client_headers)
39+
self.__core_client = ToolboxCoreSyncClient(
40+
url=url, client_headers=client_headers
41+
)
4042

4143
async def aload_tool(
4244
self,
@@ -289,7 +291,7 @@ def load_toolset(
289291
for core_sync_tool in core_sync_tools:
290292
tools.append(ToolboxTool(core_tool=core_sync_tool))
291293
return tools
292-
294+
293295
def add_headers(
294296
self,
295297
headers: Mapping[str, Union[Callable[[], str], Callable[[], Awaitable[str]]]],

packages/toolbox-langchain/tests/test_async_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ async def test_load_toolset_not_implemented(self, mock_client):
339339
assert "Synchronous methods not supported by async client." in str(
340340
excinfo.value
341341
)
342-
342+
343343
@patch("toolbox_langchain.async_client.ToolboxCoreClient")
344344
async def test_init_with_client_headers(
345345
self, mock_core_client_constructor, mock_session
@@ -357,4 +357,4 @@ async def test_add_headers(self, mock_client):
357357
mock_client.add_headers(headers)
358358
mock_client._AsyncToolboxClient__core_client.add_headers.assert_called_once_with(
359359
headers
360-
)
360+
)

packages/toolbox-langchain/tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,4 +437,4 @@ def test_add_headers(self, mock_core_client_constructor):
437437
client = ToolboxClient(URL)
438438
headers = {"X-Another-Header": "dynamic_value"}
439439
client.add_headers(headers)
440-
mock_core_instance.add_headers.assert_called_once_with(headers)
440+
mock_core_instance.add_headers.assert_called_once_with(headers)

0 commit comments

Comments
 (0)