Skip to content

Commit 1a043a4

Browse files
committed
fix: linting problems
1 parent 494f58a commit 1a043a4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/mcp/server/fastmcp/utilities/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ def __init__(
6363
data: bytes | None = None,
6464
format: str | None = None,
6565
):
66-
if not bool(path) ^ bool(data):
66+
if not bool(path) ^ bool(data):
6767
raise ValueError("Either path or data can be provided")
68-
68+
6969
self.path = Path(path) if path else None
7070
self.data = data
7171
self._format = format

tests/server/fastmcp/test_server.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from mcp.server.fastmcp import Context, FastMCP
1111
from mcp.server.fastmcp.prompts.base import Message, UserMessage
1212
from mcp.server.fastmcp.resources import FileResource, FunctionResource
13-
from mcp.server.fastmcp.utilities.types import Image, Audio
13+
from mcp.server.fastmcp.utilities.types import Audio, Image
1414
from mcp.server.session import ServerSession
1515
from mcp.shared.exceptions import McpError
1616
from mcp.shared.memory import (
@@ -342,7 +342,7 @@ async def test_tool_audio_suffix_detection(self, tmp_path: Path, filename: str,
342342
"""Test that Audio helper correctly detects MIME types from file suffixes"""
343343
mcp = FastMCP()
344344
mcp.add_tool(audio_tool_fn)
345-
345+
346346
# Create a test audio file with the specific extension
347347
audio_path = tmp_path / filename
348348
audio_path.write_bytes(b"fake audio data")
@@ -397,15 +397,14 @@ async def test_tool_mixed_list_with_audio_and_image(self, tmp_path: Path):
397397
image_path = tmp_path / "test.png"
398398
image_path.write_bytes(b"test image data")
399399

400-
# Create a test audio
400+
# Create a test audio
401401
audio_path = tmp_path / "test.wav"
402402
audio_path.write_bytes(b"test audio data")
403403

404404
# TODO(Marcelo): It seems if we add the proper type hint, it generates an invalid JSON schema.
405405
# We need to fix this.
406406
def mixed_list_fn() -> list: # type: ignore
407407
return [ # type: ignore
408-
409408
"text message",
410409
Image(image_path),
411410
Audio(audio_path),

0 commit comments

Comments
 (0)