Skip to content

Commit 2d54f02

Browse files
committed
Fix ruff format in test_files.py, add ruff-format to pre-commit hooks
1 parent c5c56d5 commit 2d54f02

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ repos:
2929
rev: v0.12.4
3030
hooks:
3131
- id: ruff-check
32+
- id: ruff-format

tests/integration/test_files.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,7 @@ class TestGetFileImageHandling:
355355
async def test_image_returns_image_content(self, nc_mcp: McpTestHelper) -> None:
356356
await nc_mcp.create_test_dir()
357357
await nc_mcp.client.dav_put(f"{TEST_BASE_DIR}/test.png", _TINY_PNG, content_type="image/png")
358-
result = await nc_mcp.mcp._tool_manager.call_tool(
359-
"get_file", {"path": f"{TEST_BASE_DIR}/test.png"}
360-
)
358+
result = await nc_mcp.mcp._tool_manager.call_tool("get_file", {"path": f"{TEST_BASE_DIR}/test.png"})
361359
assert isinstance(result, list)
362360
item = result[0] # type: ignore[index]
363361
assert item.type == "image" # type: ignore[union-attr]
@@ -394,9 +392,7 @@ async def test_jpeg_returns_image_content(self, nc_mcp: McpTestHelper) -> None:
394392
await nc_mcp.create_test_dir()
395393
jpeg_data = b"\xff\xd8\xff\xe0" + b"\x00" * 100 + b"\xff\xd9"
396394
await nc_mcp.client.dav_put(f"{TEST_BASE_DIR}/test.jpg", jpeg_data, content_type="image/jpeg")
397-
result = await nc_mcp.mcp._tool_manager.call_tool(
398-
"get_file", {"path": f"{TEST_BASE_DIR}/test.jpg"}
399-
)
395+
result = await nc_mcp.mcp._tool_manager.call_tool("get_file", {"path": f"{TEST_BASE_DIR}/test.jpg"})
400396
assert isinstance(result, list)
401397
item = result[0] # type: ignore[index]
402398
assert item.type == "image" # type: ignore[union-attr]

0 commit comments

Comments
 (0)