Repository navigation
fix(typing): restore full-tree mypy for semantic-layer kit and guest RLS test - #45835
Merged
sadpandajoe merged 1 commit intoOct 29, 2026
Merged
sadpandajoe merged 1 commit into
sadpandajoe merged 1 commit into
Conversation
…RLS test The nightly all-files mypy run fails with three errors that the per-PR changed-file runs could not see, because superset_core modules that are not on the command line are skipped (follow_imports = "skip") and typed as Any: - testing.py: [*query.dimensions, *query.metrics] joins to list[object]; build the expected name set from each list instead. - conformance_provider.py: ORDER BY members can be AdhocExpression, which the "not in columns" guard already rejects at runtime; narrow it for mypy with an isinstance filter. - virtual_dataset_connections_test.py: annotate the guest rules dict so rules that carry a dataset id are assignable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #45835 +/- ##
=======================================
Coverage 84.68% 84.68%
=======================================
Files 3069 3069
Lines 205465 205465
Branches 48310 48310
=======================================
Hits 174006 174006
Misses 28169 28169
Partials 3290 3290
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
aminghadersohi
approved these changes
Oct 29, 2026
aminghadersohi
left a comment
Contributor
There was a problem hiding this comment.
Expected member names and unsupported-order rejection are unchanged; the three edited sites are the only mypy errors at the base.
sadpandajoe
deleted the
ultraset-mypy-semantic-testing-virtual-dataset-test-errors
branch
October 29, 2026 23:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
The nightly
pre-commit checksrun (prek run --all-files) failsmypy (main)with three errors. Per-PR runs only type-check changed files, andsuperset_core.*modules that are not on the command line are skipped (follow_imports = "skip") and becomeAny, so each error only surfaces in the full-tree run.semantic_layers/testing.py:154,tests/semantic_layers/conformance_provider.py:153).virtual_dataset_connections_test.pyerror.Changes, typing only, no runtime behavior change:
testing.py:[*query.dimensions, *query.metrics]joins tolist[object]; build the expected name set from each list instead.conformance_provider.py: ORDER BY members may beAdhocExpression, which the existing "not in columns" guard already rejects; add anisinstancefilter so mypy can see it.virtual_dataset_connections_test.py: annotate the guest rules dict so a rule carrying a dataset id is assignable.TESTING INSTRUCTIONS
types-*dependencies, run the full tree as the nightly job does:pre-commit run mypy --all-files(orprek run mypy --all-files).Success: no issues found.pytest superset-core/tests/semantic_layers/andpytest tests/unit_tests/connectors/sqla/virtual_dataset_connections_test.pyto confirm no behavior change.ADDITIONAL INFORMATION
Notes:
isinstancefilter inconformance_provider.pyrelies on the existing guard just above it; style-only observation from review, no behavior impact.🤖 Generated with Claude Code