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


##########
superset/mcp_service/chart/schemas.py:
##########
@@ -306,6 +306,8 @@ class GetChartInfoRequest(BaseModel):
     current chart configuration from cache.
     """
 
+    model_config = ConfigDict(populate_by_name=True)

Review Comment:
   Not making this change — `model_config = ConfigDict(...)` without a 
redundant type annotation is the documented Pydantic v2 pattern (`BaseModel` 
already declares `model_config: ClassVar[ConfigDict]`), and it's the form used 
consistently by every other Pydantic model in this file and across the codebase 
(e.g. `GenerateChartRequest`, `UpdateChartRequest`, `ListChartsRequest`). 
Adding an explicit annotation here would be inconsistent with the rest of the 
file and isn't required — mypy already passes clean on this line.



##########
superset/mcp_service/dataset/schemas.py:
##########
@@ -262,6 +263,8 @@ class DatasetList(BaseModel):
 class ListDatasetsRequest(EditedByMeMixin, CreatedByMeMixin, 
MetadataCacheControl):
     """Request schema for list_datasets with clear, unambiguous types."""
 
+    model_config = ConfigDict(populate_by_name=True)

Review Comment:
   Same as the note on the chart schema comment — this is the standard bare 
`model_config = ConfigDict(...)` Pydantic v2 form, matching every other model 
in this file (`GetDatasetInfoRequest`'s own `model_config` above it, 
`ListDatasetsRequest`, etc.). Not adding a redundant annotation; mypy is 
already clean here.



-- 
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