From cb311dc5e81fa5b0d8c19c097a327aa3013f412e Mon Sep 17 00:00:00 2001 From: Ville Brofeldt Date: Thu, 16 Sep 2021 14:43:26 +0300 Subject: [PATCH] improve comments --- superset/common/query_object.py | 2 +- superset/config.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/superset/common/query_object.py b/superset/common/query_object.py index 5e4c3448864df..abc94ea11d8b5 100644 --- a/superset/common/query_object.py +++ b/superset/common/query_object.py @@ -43,7 +43,7 @@ from superset.views.utils import get_time_range_endpoints if TYPE_CHECKING: - from superset.common.query_context import QueryContext + from superset.common.query_context import QueryContext # pragma: no cover config = app.config diff --git a/superset/config.py b/superset/config.py index 08d61d19870fc..c7809690e1e58 100644 --- a/superset/config.py +++ b/superset/config.py @@ -121,7 +121,7 @@ def _try_json_readsha(filepath: str, length: int) -> Optional[str]: # default viz used in chart explorer DEFAULT_VIZ_TYPE = "table" -# default row limit to apply to chart data requests unless if unset +# default row limit when requesting chart data ROW_LIMIT = 50000 # default row limit when requesting samples from datasource in explore view SAMPLES_ROW_LIMIT = 1000 @@ -671,8 +671,7 @@ def _try_json_readsha(filepath: str, length: int) -> Optional[str]: # Set this API key to enable Mapbox visualizations MAPBOX_API_KEY = os.environ.get("MAPBOX_API_KEY", "") -# Maximum number of rows returned from a database, both SQL Lab, chart data -# requests and CSV exports +# Maximum number of rows returned for any analytical database query SQL_MAX_ROW = 100000 # Maximum number of rows displayed in SQL Lab UI @@ -1295,7 +1294,7 @@ def SQL_QUERY_MUTATOR( # pylint: disable=invalid-name,unused-argument elif importlib.util.find_spec("superset_config") and not is_test(): try: import superset_config # pylint: disable=import-error - from superset_config import * # pylint: disable=import-error,wildcard-import + from superset_config import * # type: ignore # pylint: disable=import-error,wildcard-import print(f"Loaded your LOCAL configuration at [{superset_config.__file__}]") except Exception: