mirror of
https://github.com/apache/superset.git
synced 2026-04-21 00:54:44 +00:00
chore: improve types (#36367)
This commit is contained in:
@@ -46,10 +46,9 @@ from superset.models.dashboard import Dashboard
|
||||
from superset.models.slice import Slice
|
||||
from superset.models.sql_lab import Query
|
||||
from superset.superset_typing import (
|
||||
BaseDatasourceData,
|
||||
ExplorableData,
|
||||
FlaskResponse,
|
||||
FormData,
|
||||
QueryData,
|
||||
)
|
||||
from superset.utils import json
|
||||
from superset.utils.core import DatasourceType
|
||||
@@ -92,12 +91,10 @@ def redirect_to_login(next_target: str | None = None) -> FlaskResponse:
|
||||
|
||||
|
||||
def sanitize_datasource_data(
|
||||
datasource_data: BaseDatasourceData | QueryData,
|
||||
datasource_data: ExplorableData,
|
||||
) -> dict[str, Any]:
|
||||
"""
|
||||
Sanitize datasource data by removing sensitive database parameters.
|
||||
|
||||
Accepts TypedDict types (BaseDatasourceData, QueryData).
|
||||
"""
|
||||
if datasource_data:
|
||||
datasource_database = datasource_data.get("database")
|
||||
|
||||
Reference in New Issue
Block a user