You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2023/10/24 00:00:24 UTC
[superset] branch 2.1 updated (fc468fded8 -> 532f47adca)
This is an automated email from the ASF dual-hosted git repository.
elizabeth pushed a change to branch 2.1
in repository https://gitbox.apache.org/repos/asf/superset.git
omit fc468fded8 fix tests and lint
new 532f47adca fix tests and lint
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (fc468fded8)
\
N -- N -- N refs/heads/2.1 (532f47adca)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
superset/models/helpers.py | 12 ++++++------
superset/sql_parse.py | 6 ++++--
2 files changed, 10 insertions(+), 8 deletions(-)
[superset] 01/01: fix tests and lint
Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
elizabeth pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 532f47adca0c29347d42e14fc2b773e17f367ccf
Author: Elizabeth Thompson <es...@gmail.com>
AuthorDate: Fri Oct 20 16:37:41 2023 -0700
fix tests and lint
---
requirements/development.txt | 2 --
requirements/testing.txt | 5 -----
superset-frontend/package.json | 2 +-
superset/connectors/sqla/views.py | 2 --
superset/key_value/commands/create.py | 2 +-
superset/models/helpers.py | 6 +++---
superset/sql_parse.py | 12 +++++++-----
superset/views/api.py | 2 +-
8 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/requirements/development.txt b/requirements/development.txt
index 47fe7a1737..aa92fcfda4 100644
--- a/requirements/development.txt
+++ b/requirements/development.txt
@@ -80,8 +80,6 @@ pure-sasl==0.6.2
# via thrift-sasl
pydruid==0.6.5
# via apache-superset
-pygments==2.12.0
- # via ipython
pyhive[hive]==0.6.5
# via apache-superset
pyinstrument==4.0.2
diff --git a/requirements/testing.txt b/requirements/testing.txt
index ead36ba3f6..73f3447521 100644
--- a/requirements/testing.txt
+++ b/requirements/testing.txt
@@ -137,8 +137,3 @@ trino==0.319.0
# via apache-superset
websocket-client==1.2.0
# via docker
-wrapt==1.12.1
- # via astroid
-# The following packages are considered to be unsafe in a requirements file:
-# pip
-# setuptools
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index d58dad57ee..077334f99d 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -44,7 +44,7 @@
"check-translation": "prettier --check ../superset/translations/**/LC_MESSAGES/*.json",
"chromatic": "npx chromatic --skip 'dependabot/**' --only-changed",
"clean-translation": "prettier --write ../superset/translations/**/LC_MESSAGES/*.json",
- "core:cover": "cross-env NODE_ENV=test jest --coverage --coverageThreshold='{\"global\":{\"statements\":100,\"branches\":100,\"functions\":100,\"lines\":100}}' --collectCoverageFrom='[\"packages/**/src/**/*.{js,ts}\", \"!packages/superset-ui-demo/**/*\"]' packages",
+ "core:cover": "cross-env NODE_ENV=test jest --coverage --coverageThreshold='{\"global\":{\"statements\":900,\"branches\":90,\"functions\":90,\"lines\":90}}' --collectCoverageFrom='[\"packages/**/src/**/*.{js,ts}\", \"!packages/superset-ui-demo/**/*\"]' packages",
"cover": "cross-env NODE_ENV=test jest --coverage",
"dev": "webpack --mode=development --color --watch",
"dev-server": "cross-env NODE_ENV=development BABEL_ENV=development node --max_old_space_size=4096 ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --mode=development",
diff --git a/superset/connectors/sqla/views.py b/superset/connectors/sqla/views.py
index cb57792f97..8cecc1780c 100644
--- a/superset/connectors/sqla/views.py
+++ b/superset/connectors/sqla/views.py
@@ -21,8 +21,6 @@ from typing import Any, cast
from flask import current_app, flash, Markup, redirect
from flask_appbuilder import CompactCRUDMixin, expose
-from flask import flash, Markup, redirect
-from flask_appbuilder import CompactCRUDMixin, expose
from flask_appbuilder.fields import QuerySelectField
from flask_appbuilder.fieldwidgets import Select2Widget
from flask_appbuilder.models.sqla.interface import SQLAInterface
diff --git a/superset/key_value/commands/create.py b/superset/key_value/commands/create.py
index d66d99d6e9..a39607b588 100644
--- a/superset/key_value/commands/create.py
+++ b/superset/key_value/commands/create.py
@@ -81,7 +81,7 @@ class CreateKeyValueCommand(BaseCommand):
def create(self) -> Key:
try:
value = self.codec.encode(self.value)
- except Exception as ex: # pylint: disable=broad-except
+ except Exception as ex:
raise KeyValueCreateFailedError("Unable to encode value") from ex
entry = KeyValueEntry(
resource=self.resource.value,
diff --git a/superset/models/helpers.py b/superset/models/helpers.py
index 795cc6faa3..bce95bcd99 100644
--- a/superset/models/helpers.py
+++ b/superset/models/helpers.py
@@ -185,7 +185,7 @@ class ImportExportMixin:
__mapper__: Mapper
@classmethod
- def _unique_constraints(cls) -> list[set[str]]:
+ def _unique_constraints(cls) -> List[Set[str]]:
"""Get all (single column and multi column) unique constraints"""
unique = [
{c.name for c in u.columns}
@@ -246,7 +246,7 @@ class ImportExportMixin:
dict_rep: Dict[Any, Any],
parent: Optional[Any] = None,
recursive: bool = True,
- sync: Optional[list[str]] = None,
+ sync: Optional[List[str]] = None,
allow_reparenting: bool = False,
) -> Any:
"""Import obj from a dictionary"""
@@ -1407,7 +1407,7 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
template_kwargs["removed_filters"] = removed_filters
template_kwargs["applied_filters"] = applied_template_filters
template_processor = self.get_template_processor(**template_kwargs)
- prequeries: list[str] = []
+ prequeries: List[str] = []
orderby = orderby or []
need_groupby = bool(metrics is not None or groupby)
metrics = metrics or []
diff --git a/superset/sql_parse.py b/superset/sql_parse.py
index 216b4e8825..ea2e2f621d 100644
--- a/superset/sql_parse.py
+++ b/superset/sql_parse.py
@@ -18,7 +18,7 @@ import logging
import re
from dataclasses import dataclass
from enum import Enum
-from typing import Any, cast, Iterator, List, Optional, Set, Tuple
+from typing import Any, cast, Dict, Iterator, List, Optional, Set, Tuple
from urllib import parse
import sqlparse
@@ -216,12 +216,14 @@ class ParsedQuery:
def limit(self) -> Optional[int]:
return self._limit
- def _get_cte_tables(self, parsed: dict[str, Any]) -> list[dict[str, Any]]:
+ def _get_cte_tables(
+ self, parsed: Dict[str, Any]
+ ) -> List[Dict[str, Any]]: # pylint: disable=no-self-use
if "with" not in parsed:
return []
return parsed["with"].get("cte_tables", [])
- def _check_cte_is_select(self, oxide_parse: list[dict[str, Any]]) -> bool:
+ def _check_cte_is_select(self, oxide_parse: List[Dict[str, Any]]) -> bool:
"""
Check if a oxide parsed CTE contains only SELECT statements
@@ -822,10 +824,10 @@ def extract_table_references(
"""
Find all nodes in a SQL tree matching a given key.
"""
- if isinstance(element, list):
+ if isinstance(element, List):
for child in element:
yield from find_nodes_by_key(child, target)
- elif isinstance(element, dict):
+ elif isinstance(element, Dict):
for key, value in element.items():
if key == target:
yield value
diff --git a/superset/views/api.py b/superset/views/api.py
index 820048d7c4..c49f6f1b1e 100644
--- a/superset/views/api.py
+++ b/superset/views/api.py
@@ -73,7 +73,7 @@ class Api(BaseSupersetView):
@handle_api_exception
@has_access_api
@expose("/v1/form_data/", methods=["GET"])
- def query_form_data(self) -> FlaskResponse: # pylint: disable=no-self-use
+ def query_form_data(self) -> FlaskResponse:
"""
Get the formdata stored in the database for existing slice.
params: slice_id: integer