aminghadersohi commented on code in PR #44148: URL: https://github.com/apache/superset/pull/44148#discussion_r4126017145
########## 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: Fixed in ddeb9a6a1068e96c919fb07f4ed4d95157bd442a. Extracted DEFAULT_COMPILE_ROW_LIMIT = 10 in superset/mcp_service/chart/plugin.py and used it as capped_compile_row_limit’s default; Gauge/Treemap behavior and explicit cap overrides are unchanged. Added a test covering the named default, capped samples, and explicit overrides. It failed before the constant existed and passes afterward; all 534 chart-plugin contract tests pass. Pre-commit on both touched files passed, including mypy, Ruff, and Pylint. Branch-wide pre-commit against master was also run: frontend checks are blocked by missing glob, postcss-styled-syntax, and tscw-config dependencies; remaining checks passed. -- 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]
