This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new b24323d500 chore(🦾): bump python pre-commit 3.7.1 -> 4.0.1 (#31050)
b24323d500 is described below
commit b24323d500f1353d732f4d223733fb1832895a36
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun Nov 24 17:34:36 2024 -0800
chore(🦾): bump python pre-commit 3.7.1 -> 4.0.1 (#31050)
Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Maxime Beauchemin <[email protected]>
---
.pre-commit-config.yaml | 12 ++++++------
requirements/development.txt | 2 +-
superset/connectors/sqla/models.py | 2 +-
superset/extensions/__init__.py | 2 +-
superset/jinja_context.py | 3 +--
superset/models/core.py | 2 +-
superset/security/manager.py | 2 +-
superset/tasks/async_queries.py | 2 +-
superset/utils/core.py | 5 ++---
superset/viz.py | 2 +-
tests/integration_tests/conftest.py | 2 +-
11 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index cd08edcf40..07f77eb4f8 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -16,11 +16,11 @@
#
repos:
- repo: https://github.com/MarcoGorelli/auto-walrus
- rev: v0.2.2
+ rev: 0.3.4
hooks:
- id: auto-walrus
- repo: https://github.com/pre-commit/mirrors-mypy
- rev: v1.3.0
+ rev: v1.13.0
hooks:
- id: mypy
args: [--check-untyped-defs]
@@ -39,11 +39,11 @@ repos:
types-Markdown,
]
- repo: https://github.com/peterdemin/pip-compile-multi
- rev: v2.6.2
+ rev: v2.6.4
hooks:
- id: pip-compile-multi-verify
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.4.0
+ rev: v5.0.0
hooks:
- id: check-docstring-first
- id: check-added-large-files
@@ -56,7 +56,7 @@ repos:
exclude: ^.*\.(snap)
args: ["--markdown-linebreak-ext=md"]
- repo: https://github.com/pre-commit/mirrors-prettier
- rev: v3.1.0 # Use the sha or tag you want to point at
+ rev: v4.0.0-alpha.8 # Use the sha or tag you want to point at
hooks:
- id: prettier
additional_dependencies:
@@ -70,7 +70,7 @@ repos:
- id: blacklist
args: ["--blacklisted-names=make_url", "--ignore=tests/"]
- repo: https://github.com/norwoodj/helm-docs
- rev: v1.11.0
+ rev: v1.14.2
hooks:
- id: helm-docs
files: helm
diff --git a/requirements/development.txt b/requirements/development.txt
index f0e5438e45..4571a33465 100644
--- a/requirements/development.txt
+++ b/requirements/development.txt
@@ -141,7 +141,7 @@ pluggy==1.4.0
# via
# pytest
# tox
-pre-commit==3.7.1
+pre-commit==4.0.1
# via apache-superset
progress==1.6
# via apache-superset
diff --git a/superset/connectors/sqla/models.py
b/superset/connectors/sqla/models.py
index fb7409adba..292a230aea 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -921,7 +921,7 @@ class TableColumn(AuditMixinNullable, ImportExportMixin,
CertificationMixin, Mod
@property
def database(self) -> Database:
- return self.table.database if self.table else self._database
+ return self.table.database if self.table else self._database # type:
ignore
@property
def db_engine_spec(self) -> builtins.type[BaseEngineSpec]:
diff --git a/superset/extensions/__init__.py b/superset/extensions/__init__.py
index cc2106b012..3559f7ba35 100644
--- a/superset/extensions/__init__.py
+++ b/superset/extensions/__init__.py
@@ -85,7 +85,7 @@ class UIManifestProcessor:
return {
"js_manifest": lambda bundle: get_files(bundle, "js"),
"css_manifest": lambda bundle: get_files(bundle, "css"),
- "assets_prefix": (
+ "assets_prefix": ( # type: ignore
self.app.config["STATIC_ASSETS_PREFIX"] if self.app else ""
),
}
diff --git a/superset/jinja_context.py b/superset/jinja_context.py
index 604e26b1db..b0e29505a0 100644
--- a/superset/jinja_context.py
+++ b/superset/jinja_context.py
@@ -352,8 +352,7 @@ class ExtraCache:
for flt in form_data.get("adhoc_filters", []):
val: Union[Any, list[Any]] = flt.get("comparator")
- op: str = flt["operator"].upper() if flt.get("operator") else None
- # fltOpName: str = flt.get("filterOptionName")
+ op: str = flt["operator"].upper() if flt.get("operator") else None
# type: ignore
if (
flt.get("expressionType") == "SIMPLE"
and flt.get("clause") == "WHERE"
diff --git a/superset/models/core.py b/superset/models/core.py
index 4181412727..1baf372c5f 100755
--- a/superset/models/core.py
+++ b/superset/models/core.py
@@ -1055,7 +1055,7 @@ class Database(Model, AuditMixinNullable,
ImportExportMixin): # pylint: disable
)
def get_perm(self) -> str:
- return self.perm # type: ignore
+ return self.perm
def has_table(self, table: Table) -> bool:
with self.get_sqla_engine(catalog=table.catalog, schema=table.schema)
as engine:
diff --git a/superset/security/manager.py b/superset/security/manager.py
index 9fd84ed58f..c0773f9f76 100644
--- a/superset/security/manager.py
+++ b/superset/security/manager.py
@@ -477,7 +477,7 @@ class SupersetSecurityManager( # pylint:
disable=too-many-public-methods
return (
self.can_access_all_datasources()
or self.can_access_all_databases()
- or self.can_access("database_access", database.perm) # type:
ignore
+ or self.can_access("database_access", database.perm)
)
def can_access_catalog(self, database: "Database", catalog: str) -> bool:
diff --git a/superset/tasks/async_queries.py b/superset/tasks/async_queries.py
index 2fdf094842..9ee633f158 100644
--- a/superset/tasks/async_queries.py
+++ b/superset/tasks/async_queries.py
@@ -174,7 +174,7 @@ def load_explore_json_into_cache( # pylint:
disable=too-many-locals
errors = ex.errors
else:
error = ex.message if hasattr(ex, "message") else str(ex)
- errors = [error]
+ errors = [error] # type: ignore
async_query_manager.update_job(
job_metadata, async_query_manager.STATUS_ERROR, errors=errors
diff --git a/superset/utils/core.py b/superset/utils/core.py
index 9480e54733..ada40053c1 100644
--- a/superset/utils/core.py
+++ b/superset/utils/core.py
@@ -919,14 +919,13 @@ def merge_extra_form_data(form_data: dict[str, Any]) ->
None:
"adhoc_filters", []
)
adhoc_filters.extend(
- {"isExtra": True, **adhoc_filter} # type: ignore
- for adhoc_filter in append_adhoc_filters
+ {"isExtra": True, **adhoc_filter} for adhoc_filter in
append_adhoc_filters
)
if append_filters:
for key, value in form_data.items():
if re.match("adhoc_filter.*", key):
value.extend(
- simple_filter_to_adhoc({"isExtra": True, **fltr}) # type:
ignore
+ simple_filter_to_adhoc({"isExtra": True, **fltr})
for fltr in append_filters
if fltr
)
diff --git a/superset/viz.py b/superset/viz.py
index 43b85a29f2..f36a17a34d 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -2458,7 +2458,7 @@ class RoseViz(NVD3TimeSeriesViz):
result[timestamp].append(
{
"key": key,
- "value": value,
+ "value": value, # type: ignore
"name": ", ".join(key) if isinstance(key, list) else
key,
"time": val["x"],
}
diff --git a/tests/integration_tests/conftest.py
b/tests/integration_tests/conftest.py
index 4aa570c5e6..c0d960f495 100644
--- a/tests/integration_tests/conftest.py
+++ b/tests/integration_tests/conftest.py
@@ -69,7 +69,7 @@ def login_as(test_client: FlaskClient[Any]):
@pytest.fixture
def login_as_admin(login_as: Callable[..., None]):
- yield login_as("admin")
+ yield login_as("admin") # type: ignore
@pytest.fixture