mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Add docstrings and typing to db_engine_specs and sql_parse (#8058)
* Add typing to db_engine_specs * Add more type annotations and docstrings * Add docstrings and typing to sql_parse and db_engine_specs * Refine select_star * Fix execute and add more docstrings * Revert kwargs change from execute * Remove redundant or * Align view and table getter schema types * Fix return type of latest_partition * Remove some typing from presto * Improve docstring for __extract_from_token
This commit is contained in:
@@ -26,9 +26,9 @@ from sqlalchemy.types import String, UnicodeText
|
||||
|
||||
from superset.db_engine_specs import engines
|
||||
from superset.db_engine_specs.base import (
|
||||
_create_time_grains_tuple,
|
||||
BaseEngineSpec,
|
||||
builtin_time_grains,
|
||||
create_time_grains_tuple,
|
||||
)
|
||||
from superset.db_engine_specs.bigquery import BigQueryEngineSpec
|
||||
from superset.db_engine_specs.hive import HiveEngineSpec
|
||||
@@ -318,7 +318,7 @@ class DbEngineSpecsTestCase(SupersetTestCase):
|
||||
blacklist = ["PT1M"]
|
||||
time_grains = {"PT1S": "second", "PT1M": "minute"}
|
||||
time_grain_functions = {"PT1S": "{col}", "PT1M": "{col}"}
|
||||
time_grains = create_time_grains_tuple(
|
||||
time_grains = _create_time_grains_tuple(
|
||||
time_grains, time_grain_functions, blacklist
|
||||
)
|
||||
self.assertEqual(1, len(time_grains))
|
||||
|
||||
Reference in New Issue
Block a user