chore: annotate important types (#36034)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Beto Dealmeida
2025-11-17 14:41:20 -05:00
committed by GitHub
parent 282f4e5de2
commit fb7d0e0e3d
12 changed files with 386 additions and 97 deletions

View File

@@ -37,6 +37,7 @@ from superset.exceptions import SupersetException
from superset.explore.exceptions import WrongEndpointError
from superset.explore.permalink.exceptions import ExplorePermalinkGetFailedError
from superset.extensions import security_manager
from superset.superset_typing import BaseDatasourceData, QueryData
from superset.utils import core as utils, json
from superset.views.utils import (
get_datasource_info,
@@ -135,9 +136,8 @@ class GetExploreCommand(BaseCommand, ABC):
utils.merge_extra_filters(form_data)
utils.merge_request_params(form_data, request.args)
# TODO: this is a dummy placeholder - should be refactored to being just `None`
datasource_data: dict[str, Any] = {
"type": self._datasource_type,
datasource_data: BaseDatasourceData | QueryData = {
"type": self._datasource_type or "unknown",
"name": datasource_name,
"columns": [],
"metrics": [],