You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2021/10/20 17:25:34 UTC
[superset] 01/01: pylint
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a commit to branch update-amit
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 4321c0b0d045c439fee0bb666f0ed8e2869de716
Author: hughhhh <hu...@gmail.com>
AuthorDate: Wed Oct 20 13:20:44 2021 -0400
pylint
---
superset/sql_lab.py | 4 +++-
tests/integration_tests/sqllab_tests.py | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/superset/sql_lab.py b/superset/sql_lab.py
index 2017ad6..9efebfb 100644
--- a/superset/sql_lab.py
+++ b/superset/sql_lab.py
@@ -287,7 +287,9 @@ def execute_sql_statement( # pylint: disable=too-many-arguments,too-many-locals
return SupersetResultSet(data, cursor_description, db_engine_spec)
-def apply_limit_if_exists(database: Database, increased_limit: int, query: Query, sql: str) -> str:
+def apply_limit_if_exists(
+ database: Database, increased_limit: Optional[int], query: Query, sql: str
+) -> str:
if query.limit and increased_limit:
# We are fetching one more than the requested limit in order
# to test whether there are more rows than the limit.
diff --git a/tests/integration_tests/sqllab_tests.py b/tests/integration_tests/sqllab_tests.py
index df09187..6738759 100644
--- a/tests/integration_tests/sqllab_tests.py
+++ b/tests/integration_tests/sqllab_tests.py
@@ -43,7 +43,8 @@ from superset.sql_lab import (
execute_sql_statements,
execute_sql_statement,
get_sql_results,
- SqlLabException, apply_limit_if_exists,
+ SqlLabException,
+ apply_limit_if_exists,
)
from superset.sql_parse import CtasMethod
from superset.utils.core import (
@@ -1003,7 +1004,6 @@ class TestSqlLab(SupersetTestCase):
assert final_sql == sql
-
@pytest.mark.parametrize("spec", [HiveEngineSpec, PrestoEngineSpec])
def test_cancel_query_implicit(spec: BaseEngineSpec) -> None:
query = mock.MagicMock()