bito-code-review[bot] commented on code in PR #44148:
URL: https://github.com/apache/superset/pull/44148#discussion_r4126020231


##########
superset/mcp_service/chart/plugin.py:
##########
@@ -27,19 +27,28 @@
 
 from __future__ import annotations
 
-from collections.abc import Mapping
+from collections.abc import Callable, Mapping
 from typing import Any, ClassVar, Protocol, runtime_checkable
 
-from superset.mcp_service.chart.schemas import ColumnRef
+from superset.mcp_service.chart.schemas import ChartError, ColumnRef, 
VegaLitePreview
 from superset.mcp_service.common.error_schemas import ChartGenerationError
 
 
+def capped_compile_row_limit(form_data: Mapping[str, Any], cap: int = 10) -> 
int:

Review Comment:
   <!-- Bito Reply -->
   The suggestion to use a named constant for the compile-sample cap is valid 
and improves maintainability by centralizing the business limit and preventing 
silent drift. The implementation in the pull request correctly extracts 
`DEFAULT_COMPILE_ROW_LIMIT = 10` and applies it as the default for 
`capped_compile_row_limit` in `superset/mcp_service/chart/plugin.py`.



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