mirror of
https://github.com/apache/superset.git
synced 2026-05-21 15:55:10 +00:00
fix(mcp): resolve E402 and E501 in dataset_validator.py
- Move error_schemas import above _C TypeVar definition (E402) - Split two over-length comment lines to ≤88 chars (E501, lines 268 and 380)
This commit is contained in:
@@ -28,14 +28,14 @@ from superset.mcp_service.chart.schemas import (
|
||||
ChartConfig,
|
||||
ColumnRef,
|
||||
)
|
||||
|
||||
_C = TypeVar("_C", bound=ChartConfig)
|
||||
from superset.mcp_service.common.error_schemas import (
|
||||
ChartGenerationError,
|
||||
ColumnSuggestion,
|
||||
DatasetContext,
|
||||
)
|
||||
|
||||
_C = TypeVar("_C", bound=ChartConfig)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Exceptions that can occur during column name normalization.
|
||||
@@ -265,7 +265,8 @@ class DatasetValidator:
|
||||
5 of 7 chart types to silently skip column validation. Now delegates
|
||||
to the plugin for each chart type so all types are covered.
|
||||
"""
|
||||
# Local import: plugins call DatasetValidator helpers from normalize_column_refs().
|
||||
# Local import: plugins call DatasetValidator helpers from
|
||||
# normalize_column_refs().
|
||||
# A top-level import of registry in dataset_validator would make loading this
|
||||
# module implicitly trigger plugin registration, creating a circular dependency.
|
||||
from superset.mcp_service.chart.registry import get_registry
|
||||
@@ -377,7 +378,8 @@ class DatasetValidator:
|
||||
if not dataset_context:
|
||||
return config
|
||||
|
||||
# Local import: plugins call DatasetValidator helpers from normalize_column_refs().
|
||||
# Local import: plugins call DatasetValidator helpers from
|
||||
# normalize_column_refs().
|
||||
# A top-level import of registry in dataset_validator would make loading this
|
||||
# module implicitly trigger plugin registration, creating a circular dependency.
|
||||
from superset.mcp_service.chart.registry import get_registry
|
||||
|
||||
Reference in New Issue
Block a user