Skip to content

Commit 8ad3bde

Browse files
committed
chore: Delint
1 parent 8ccfc82 commit 8ad3bde

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

packages/toolbox-core/tests/test_client.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@
1515

1616
import inspect
1717
import json
18+
from unittest.mock import AsyncMock
1819

1920
import pytest
2021
import pytest_asyncio
2122
from aioresponses import CallbackResult
22-
from unittest.mock import AsyncMock
23-
2423
from toolbox_core import ToolboxClient
2524
from toolbox_core.protocol import ManifestSchema, ParameterSchema, ToolSchema
2625

@@ -331,16 +330,21 @@ async def test_new_invoke_tool_server_error(aioresponses, test_tool_str):
331330

332331

333332
@pytest.mark.asyncio
334-
async def test_bind_param_async_callable_value_success(aioresponses, test_tool_int_bool):
333+
async def test_bind_param_async_callable_value_success(
334+
aioresponses, test_tool_int_bool
335+
):
335336
"""
336337
Tests bind_parameters method with an async callable value.
337338
"""
338339
TOOL_NAME = "async_bind_tool"
339-
manifest = ManifestSchema(serverVersion="0.0.0", tools={TOOL_NAME: test_tool_int_bool})
340+
manifest = ManifestSchema(
341+
serverVersion="0.0.0", tools={TOOL_NAME: test_tool_int_bool}
342+
)
340343

341344
aioresponses.get(
342345
f"{TEST_BASE_URL}/api/tool/{TOOL_NAME}",
343-
payload=manifest.model_dump(), status=200
346+
payload=manifest.model_dump(),
347+
status=200,
344348
)
345349

346350
def reflect_parameters(url, **kwargs):
@@ -381,7 +385,8 @@ async def test_new_add_auth_token_getters_duplicate_fail(aioresponses, test_tool
381385

382386
aioresponses.get(
383387
f"{TEST_BASE_URL}/api/tool/{TOOL_NAME}",
384-
payload=manifest.model_dump(), status=200
388+
payload=manifest.model_dump(),
389+
status=200,
385390
)
386391

387392
def token_handler_1():
@@ -396,5 +401,8 @@ def token_handler_2():
396401
authed_tool = tool.add_auth_token_getters({AUTH_SERVICE: token_handler_1})
397402
assert AUTH_SERVICE in authed_tool._ToolboxTool__auth_service_token_getters
398403

399-
with pytest.raises(ValueError, match=f"Authentication source\\(s\\) `{AUTH_SERVICE}` already registered in tool `{TOOL_NAME}`."):
400-
authed_tool.add_auth_token_getters({AUTH_SERVICE: token_handler_2})
404+
with pytest.raises(
405+
ValueError,
406+
match=f"Authentication source\\(s\\) `{AUTH_SERVICE}` already registered in tool `{TOOL_NAME}`.",
407+
):
408+
authed_tool.add_auth_token_getters({AUTH_SERVICE: token_handler_2})

packages/toolbox-core/tests/test_protocol.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from inspect import Parameter
1717

1818
import pytest
19-
2019
from toolbox_core.protocol import ParameterSchema
2120

2221

@@ -51,9 +50,7 @@ def test_parameter_schema_boolean():
5150

5251
def test_parameter_schema_array_string():
5352
"""Tests ParameterSchema with type 'array' containing strings."""
54-
item_schema = ParameterSchema(
55-
name="", type="string", description=""
56-
)
53+
item_schema = ParameterSchema(name="", type="string", description="")
5754
schema = ParameterSchema(
5855
name="tags", type="array", description="List of tags", items=item_schema
5956
)

0 commit comments

Comments
 (0)