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/27 17:26:36 UTC
(superset) branch master updated: fix(tests): narrow nullable uuids in test_runtime_capture for mypy (#45781)
This is an automated email from the ASF dual-hosted git repository.
sadpandajoe 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 84a255fdedd fix(tests): narrow nullable uuids in test_runtime_capture for mypy (#45781)
84a255fdedd is described below
commit 84a255fdedde8e4094c191cc9df09fa5ffc1aef8
Author: Joe Li <jo...@preset.io>
AuthorDate: Tue Oct 27 10:26:28 2026 -0700
fix(tests): narrow nullable uuids in test_runtime_capture for mypy (#45781)
Co-authored-by: Claude Opus 5.5 <no...@anthropic.com>
---
tests/unit_tests/versioning/test_runtime_capture.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/unit_tests/versioning/test_runtime_capture.py b/tests/unit_tests/versioning/test_runtime_capture.py
index 8abc2240ea4..4728e4bf09a 100644
--- a/tests/unit_tests/versioning/test_runtime_capture.py
+++ b/tests/unit_tests/versioning/test_runtime_capture.py
@@ -102,13 +102,15 @@ def test_membership_activity_only_offers_existing_snapshots(
return_value={("Dashboard", dashboard.id): True},
):
apply_record_decoration(records, "Dashboard", dashboard.id)
+ dashboard_uuid = dashboard.uuid
+ assert dashboard_uuid is not None
for record in records:
if record["kind"] == "chart":
assert record["version_uuid"] is None
else:
assert record["version_uuid"] is not None
assert (
- get_version(Dashboard, dashboard.uuid, UUID(record["version_uuid"]))
+ get_version(Dashboard, dashboard_uuid, UUID(record["version_uuid"]))
is not None
)
@@ -144,7 +146,9 @@ def test_chart_activity_requires_its_own_snapshot(capture_session: Session) -> N
):
apply_record_decoration(records, "Slice", chart.id)
assert records[0]["version_uuid"] is not None
- assert get_version(Slice, chart.uuid, UUID(records[0]["version_uuid"])) is not None
+ chart_uuid = chart.uuid
+ assert chart_uuid is not None
+ assert get_version(Slice, chart_uuid, UUID(records[0]["version_uuid"])) is not None
assert records[1]["version_uuid"] is None
assert records[1]["entity_uuid"] == str(chart.uuid)