aminghadersohi commented on code in PR #38562:
URL: https://github.com/apache/superset/pull/38562#discussion_r2920138880


##########
superset/mcp_service/chart/schemas.py:
##########
@@ -403,26 +396,18 @@ def sanitize_label(cls, v: str | None) -> str | None:
 
 
 class AxisConfig(BaseModel):
-    title: str | None = Field(None, description="Axis title", max_length=200)
-    scale: Literal["linear", "log"] | None = Field(
-        "linear", description="Axis scale type"
-    )
-    format: str | None = Field(
-        None, description="Format string (e.g. '$,.2f')", max_length=50
-    )
+    title: str | None = Field(None, max_length=200)
+    scale: Literal["linear", "log"] | None = "linear"
+    format: str | None = Field(None, description="e.g. '$,.2f'", max_length=50)
 
 
 class LegendConfig(BaseModel):
-    show: bool = Field(True, description="Whether to show legend")
-    position: Literal["top", "bottom", "left", "right"] | None = Field(
-        "right", description="Legend position"
-    )
+    show: bool = True
+    position: Literal["top", "bottom", "left", "right"] | None = "right"
 
 
 class FilterConfig(BaseModel):
-    column: str = Field(
-        ..., description="Column to filter on", min_length=1, max_length=255
-    )
+    column: str = Field(..., min_length=1, max_length=255)

Review Comment:
   Good catch — added the same pattern validation 
(`r"^[a-zA-Z0-9_][a-zA-Z0-9_\s\-\.]*$"`) to `FilterConfig.column` for 
consistency with `ColumnRef.name`. Fixed in 558f70bb8a.



##########
tests/unit_tests/mcp_service/test_mcp_tool_registration.py:
##########
@@ -17,25 +17,32 @@
 
 """Test MCP app imports and tool/prompt registration."""
 
+import asyncio
+
+
+def _run(coro):
+    """Run an async coroutine synchronously."""
+    return asyncio.get_event_loop().run_until_complete(coro)

Review Comment:
   Agreed — switched from `asyncio.get_event_loop().run_until_complete()` to 
`asyncio.run()` which is the modern approach for Python 3.10+. Fixed in 
558f70bb8a.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to