We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 709d7d0 commit 96da282Copy full SHA for 96da282
1 file changed
src/mcp/server/mcpserver/utilities/types.py
@@ -27,7 +27,7 @@ def __init__(
27
28
def _get_mime_type(self) -> str:
29
"""Get MIME type from format or guess from file extension."""
30
- if self._format: # pragma: no cover
+ if self._format:
31
return f"image/{self._format.lower()}"
32
33
if self.path:
@@ -46,7 +46,7 @@ def to_image_content(self) -> ImageContent:
46
47
with open(self.path, "rb") as f:
48
data = base64.b64encode(f.read()).decode()
49
- elif self.data is not None: # pragma: no cover
+ elif self.data is not None:
50
data = base64.b64encode(self.data).decode()
51
else: # pragma: no cover
52
raise ValueError("No image data available")
0 commit comments