aminghadersohi commented on PR #40473:
URL: https://github.com/apache/superset/pull/40473#issuecomment-4585139852

   ## Review feedback addressed — commit be1a407188
   
   Addressing the BLOCKER, HIGH, and MEDIUM items from the review:
   
   **BLOCKER: Inline imports → module top-level** (`chart/schemas.py`, 
`dashboard/schemas.py`, `dataset/schemas.py`)
   - Moved all `from superset.mcp_service.utils.schema_utils import 
parse_json_or_list / parse_json_or_model_list` from inside validator methods to 
module-level imports. This eliminates the anti-pattern in both the new 
validators and the pre-existing `parse_filters` / `parse_select_columns` 
validators in `ListXxxRequest`.
   
   **HIGH: `List[str]` → `list[str]`**
   - Updated `DEFAULT_GET_CHART_INFO_COLUMNS`, 
`DEFAULT_GET_DASHBOARD_INFO_COLUMNS`, `DEFAULT_GET_DATASET_INFO_COLUMNS`, 
`DEFAULT_GET_DATASET_INFO_COLUMN_FIELDS` to `list[str]`.
   - Updated `select_columns` and `column_fields` field annotations on 
`GetChartInfoRequest`, `GetDashboardInfoRequest`, `GetDatasetInfoRequest` to 
`list[str]`.
   
   **MEDIUM: Validator return types `-> Any` → `-> list[str]`**
   - Updated `_parse_select_columns` in all three request schemas and 
`_parse_column_fields` in `GetDatasetInfoRequest`.
   
   **MEDIUM: `-> None` on test methods**
   - Added `-> None` return annotations to all 15 test methods in 
`TestGetChartInfoRequestSchema`, `TestResolveFilterOperatorAndValue`, and 
`TestBuildAppliedDashboardFilters`.
   
   **MEDIUM: Tests for lean default behavior**
   - Added `test_get_dashboard_info_default_select_columns_excludes_css` — 
verifies that a default `get_dashboard_info` call omits `css` and 
`filter_state` while including `id`, `dashboard_title`, `charts`, 
`native_filters`.
   - Added 
`test_get_dataset_info_default_select_columns_excludes_verbose_fields` — 
verifies that a default `get_dataset_info` call omits `params`, 
`template_params`, `extra` while including `id`, `table_name`, `columns`, 
`metrics`.
   
   **NIT: `filter_state` in description vs defaults** — The description already 
says the default excludes `filter_state`, and the default list at the current 
HEAD does not include it (removed in commit 3c917c7f99). The description is 
accurate.


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