Repository navigation
Commit 26ae212
fix(typing): restore full-tree mypy for semantic-layer testing kit and mapper tests
The scheduled full-tree mypy run reports 17 errors that per-PR runs miss,
because superset_core.* is follow_imports=skip and resolves to Any when
only changed files are checked.
- testing.py (#45893): the `Dimension | None` annotation on the min(...,
default=None) result made mypy infer the element type as
`Dimension | None`, so the `Dimension`-typed key function no longer
matched. Let mypy infer the result type instead.
- mapper_test.py (#46339): narrow `SemanticQuery.filters` and each
member to `Filter` (and its column to non-None) before reading
`.column.id` / `.value`, keeping the same assertions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 3565acb commit 26ae212
2 files changed
Lines changed: 27 additions & 9 deletions
File tree
- superset-core/src/superset_core/semantic_layers
- tests/unit_tests/semantic_layers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5674 | 5674 | | |
5675 | 5675 | | |
5676 | 5676 | | |
5677 | | - | |
5678 | | - | |
5679 | | - | |
| 5677 | + | |
| 5678 | + | |
| 5679 | + | |
| 5680 | + | |
| 5681 | + | |
| 5682 | + | |
| 5683 | + | |
| 5684 | + | |
| 5685 | + | |
5680 | 5686 | | |
5681 | 5687 | | |
5682 | 5688 | | |
| |||
5820 | 5826 | | |
5821 | 5827 | | |
5822 | 5828 | | |
5823 | | - | |
5824 | | - | |
| 5829 | + | |
| 5830 | + | |
| 5831 | + | |
| 5832 | + | |
| 5833 | + | |
| 5834 | + | |
| 5835 | + | |
| 5836 | + | |
5825 | 5837 | | |
5826 | 5838 | | |
5827 | 5839 | | |
| |||
5971 | 5983 | | |
5972 | 5984 | | |
5973 | 5985 | | |
5974 | | - | |
5975 | | - | |
5976 | | - | |
| 5986 | + | |
| 5987 | + | |
| 5988 | + | |
| 5989 | + | |
| 5990 | + | |
| 5991 | + | |
| 5992 | + | |
| 5993 | + | |
| 5994 | + | |
5977 | 5995 | | |
5978 | 5996 | | |
5979 | 5997 | | |
| |||
0 commit comments