You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jl...@apache.org on 2026/10/15 01:58:30 UTC
(superset) branch ultraset-semantic-query-empty-set-mypy-errors created (now 9fd39cbbae3)
This is an automated email from the ASF dual-hosted git repository.
sadpandajoe pushed a change to branch ultraset-semantic-query-empty-set-mypy-errors
in repository https://gitbox.apache.org/repos/asf/superset.git
at 9fd39cbbae3 fix(ci): restore the full-repo mypy check on two semantic-layer and sqla test files
This branch includes the following new commits:
new 9fd39cbbae3 fix(ci): restore the full-repo mypy check on two semantic-layer and sqla test files
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.
(superset) 01/01: fix(ci): restore the full-repo mypy check on two semantic-layer and sqla test files
Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sadpandajoe pushed a commit to branch ultraset-semantic-query-empty-set-mypy-errors
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 9fd39cbbae3e54bc2d9675a977607ed66d083e2a
Author: Joe Li <47...@users.noreply.github.com>
AuthorDate: Thu Oct 15 01:58:18 2026 +0000
fix(ci): restore the full-repo mypy check on two semantic-layer and sqla test files
The nightly full-repo mypy run fails on two unrelated test-only type
errors that changed-file CI cannot see:
- query_errors_test.py passed set() for SemanticQuery.metrics and
.dimensions, which are declared list[Metric] and list[Dimension]. The
superset_core.* mypy override sets follow_imports = "skip", so the type
is Any unless superset-core is on the command line, as in the nightly.
- helpers_test.py kept a "type: ignore[list-item]" on a filter value of
[33, 29.02, None]. FilterValues now accepts None list elements (#45133),
so the ignore is unused.
Pass empty lists and drop the stale ignore.
Co-Authored-By: Claude Sonnet 5.5 <no...@anthropic.com>
---
tests/unit_tests/models/helpers_test.py | 2 +-
tests/unit_tests/semantic_layers/query_errors_test.py | 10 +++-------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/tests/unit_tests/models/helpers_test.py b/tests/unit_tests/models/helpers_test.py
index 7346969e1ce..7a457548bec 100644
--- a/tests/unit_tests/models/helpers_test.py
+++ b/tests/unit_tests/models/helpers_test.py
@@ -3082,7 +3082,7 @@ def test_get_sqla_query_in_filter_preserves_float_precision_with_null(
{
"col": "global_sales",
"op": "IN",
- "val": [33, 29.02, None], # type: ignore[list-item]
+ "val": [33, 29.02, None],
},
],
extras={},
diff --git a/tests/unit_tests/semantic_layers/query_errors_test.py b/tests/unit_tests/semantic_layers/query_errors_test.py
index a889aefa35d..502f555dc85 100644
--- a/tests/unit_tests/semantic_layers/query_errors_test.py
+++ b/tests/unit_tests/semantic_layers/query_errors_test.py
@@ -188,7 +188,7 @@ def test_provider_fault_is_not_validation(
provider: MagicMock = MagicMock(side_effect=fault("private-provider-diagnostic"))
captured: pytest.ExceptionInfo[SemanticLayerExecutionError]
with pytest.raises(SemanticLayerExecutionError) as captured:
- execute_semantic_query(provider, SemanticQuery(dimensions=set(), metrics=set()))
+ execute_semantic_query(provider, SemanticQuery(dimensions=[], metrics=[]))
assert captured.value.status == 500
assert "private" not in str(captured.value.to_dict())
provider.assert_called_once()
@@ -265,9 +265,7 @@ def test_provider_control_signal_is_preserved(app_context: None, kind: str) -> N
dispatcher: MagicMock = MagicMock(side_effect=control)
captured: pytest.ExceptionInfo[Exception]
with pytest.raises(type(control)) as captured:
- execute_semantic_query(
- dispatcher, SemanticQuery(dimensions=set(), metrics=set())
- )
+ execute_semantic_query(dispatcher, SemanticQuery(dimensions=[], metrics=[]))
assert captured.value is control
dispatcher.assert_called_once()
@@ -472,9 +470,7 @@ def test_provider_rejection_uses_host_guidance(
dispatcher: MagicMock = MagicMock(side_effect=SemanticQueryRejectedError(code))
captured: pytest.ExceptionInfo[SemanticLayerQueryRejectedError]
with pytest.raises(SemanticLayerQueryRejectedError) as captured:
- execute_semantic_query(
- dispatcher, SemanticQuery(dimensions=set(), metrics=set())
- )
+ execute_semantic_query(dispatcher, SemanticQuery(dimensions=[], metrics=[]))
assert captured.value.message == expected
assert captured.value.status == 400
assert "private" not in str(captured.value.to_dict())