mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
[refactor] Centralizing custom Python types (#9026)
This commit is contained in:
@@ -14,9 +14,10 @@
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from typing import Any, Callable, Dict, Union
|
||||
from typing import Any, Callable, Dict, List, Optional, Union
|
||||
|
||||
from flask import Flask
|
||||
from flask_caching import Cache
|
||||
|
||||
CacheConfig = Union[Callable[[Flask], Cache], Dict[str, Any]]
|
||||
VizData = Optional[Union[List[Any], Dict[Any, Any]]]
|
||||
|
||||
@@ -32,7 +32,7 @@ from collections import defaultdict, OrderedDict
|
||||
from datetime import datetime, timedelta
|
||||
from functools import reduce
|
||||
from itertools import product
|
||||
from typing import Any, Dict, List, Optional, Set, Tuple, TYPE_CHECKING, Union
|
||||
from typing import Any, Dict, List, Optional, Set, Tuple, TYPE_CHECKING
|
||||
|
||||
import geohash
|
||||
import numpy as np
|
||||
@@ -50,6 +50,7 @@ from superset import app, cache, get_css_manifest_files
|
||||
from superset.constants import NULL_STRING
|
||||
from superset.exceptions import NullValueException, SpatialException
|
||||
from superset.models.helpers import QueryResult
|
||||
from superset.typing import VizData
|
||||
from superset.utils import core as utils
|
||||
from superset.utils.core import (
|
||||
DTTM_ALIAS,
|
||||
@@ -77,8 +78,6 @@ METRIC_KEYS = [
|
||||
"size",
|
||||
]
|
||||
|
||||
VizData = Optional[Union[List[Any], Dict[Any, Any]]]
|
||||
|
||||
|
||||
class BaseViz:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user