File tree Expand file tree Collapse file tree
dash/mcp/primitives/tools/results Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ class DataFrameResult(ResultFormatter):
5050 def format (
5151 cls , output : MCPOutput , returned_output_value : Any
5252 ) -> list [TextContent | ImageContent ]:
53- if not TABULAR .matches (output .get ("component_type" ), output . get ( "property" ) ):
53+ if not TABULAR .matches (output .get ("component_type" ), output [ "property" ] ):
5454 return []
5555 if (
5656 not isinstance (returned_output_value , list )
Original file line number Diff line number Diff line change 66import logging
77from typing import Any
88
9- import plotly .graph_objects as go
9+ import plotly .graph_objects as go # type: ignore[import-untyped]
1010from mcp .types import ImageContent , TextContent
1111
1212from dash .mcp .types import MCPOutput
@@ -46,9 +46,7 @@ class PlotlyFigureResult(ResultFormatter):
4646 def format (
4747 cls , output : MCPOutput , returned_output_value : Any
4848 ) -> list [TextContent | ImageContent ]:
49- if not PLOTLY_FIGURE .matches (
50- output .get ("component_type" ), output .get ("property" )
51- ):
49+ if not PLOTLY_FIGURE .matches (output .get ("component_type" ), output ["property" ]):
5250 return []
5351 if not isinstance (returned_output_value , dict ):
5452 return []
You can’t perform that action at this time.
0 commit comments