You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sadpandajoe (via GitHub)" <gi...@apache.org> on 2026/10/15 02:15:36 UTC
[PR] fix(ci): restore the full-repo mypy check on two semantic-layer and sqla test files [superset]
sadpandajoe opened a new pull request, #45315:
URL: https://github.com/apache/superset/pull/45315
### SUMMARY
The nightly full-repo `mypy (main)` pre-commit run on master fails on two test-only type errors that changed-file CI can't see.
1. `tests/unit_tests/semantic_layers/query_errors_test.py` (lines 191, 269, 476) builds `SemanticQuery(dimensions=set(), metrics=set())`, but `SemanticQuery.dimensions` and `.metrics` are declared `list[Dimension]` and `list[Metric]` (`superset-core/src/superset_core/semantic_layers/types.py`, unchanged since cb53745d43). The test file was added in #45110 (1fced034d3) with `set()`. The `superset_core.*` override in `pyproject.toml` sets `follow_imports = "skip"`, so the class is `Any` in changed-file runs and the mismatch is invisible. The nightly passes `superset-core/**` on the command line, so the real types apply and mypy reports 6 `arg-type` errors (`set[Never]` vs `list[Dimension]`/`list[Metric]`). The dataclass does no runtime validation, so the tests pass either way.
2. `tests/unit_tests/models/helpers_test.py:3085` carries `# type: ignore[list-item]` on `"val": [33, 29.02, None]`. #45133 (f5404f7eae) widened `FilterValues` in `superset/superset_typing.py` to accept `None` list elements, so the literal now type-checks and the ignore is reported as `unused-ignore`. #45133 didn't touch the test file, so changed-file CI never ran mypy on it.
The fix passes empty lists at the three call sites and removes the stale ignore. No behavior changes. The two ignores added by #44986 at lines 3149 and 3200 are still needed and are left alone. The remaining nightly errors in `cache_policy_test.py` and `metric_filter_test.py` are handled in #45268 and #45239.
### TESTING INSTRUCTIONS
Run mypy the way the nightly does, with `superset-core` on the command line:
mypy --ignore-missing-imports --scripts-are-modules --check-untyped-defs \
tests/unit_tests/models/helpers_test.py \
tests/unit_tests/semantic_layers/query_errors_test.py \
$(git ls-files 'superset-core/*.py')
Before the change this reports 7 errors in 2 files; after it, `Success: no issues found`. For the full-repo run, pass every tracked `.py`/`.pyi` file outside `superset-extensions-cli/`; only the errors in the two PRs above should remain.
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #45314
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ci): restore the full-repo mypy check on two semantic-layer and sqla test files [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #45315:
URL: https://github.com/apache/superset/pull/45315#issuecomment-6182941381
## CodeAnt PR Risk: Low Risk
- The PR appears safe to merge; the changes are limited to test inputs and a type-ignore comment.
**Assessed commit:** `9fd39cbbae3e`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ci): restore the full-repo mypy check on two semantic-layer and sqla test files [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #45315:
URL: https://github.com/apache/superset/pull/45315#issuecomment-6183166129
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/45315?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 64.93%. Comparing base ([`96e22f4`](https://app.codecov.io/gh/apache/superset/commit/96e22f4eabaa7815e492037f7115975c49740eda?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`9fd39cb`](https://app.codecov.io/gh/apache/superset/commit/9fd39cbbae3e54bc2d9675a977607ed66d083e2a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #45315 +/- ##
===========================================
- Coverage 83.41% 64.93% -18.49%
===========================================
Files 3040 3040
Lines 198718 198718
Branches 46381 46381
===========================================
- Hits 165764 129033 -36731
- Misses 29730 66779 +37049
+ Partials 3224 2906 -318
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/45315/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hive](https://app.codecov.io/gh/apache/superset/pull/45315/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `34.98% <ø> (ø)` | |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/45315/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [postgres](https://app.codecov.io/gh/apache/superset/pull/45315/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [presto](https://app.codecov.io/gh/apache/superset/pull/45315/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.74% <ø> (ø)` | |
| [python](https://app.codecov.io/gh/apache/superset/pull/45315/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `52.87% <ø> (-34.06%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/45315/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `52.76% <ø> (ø)` | |
| [unit](https://app.codecov.io/gh/apache/superset/pull/45315/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/45315?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ci): restore the full-repo mypy check on two semantic-layer and sqla test files [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #45315:
URL: https://github.com/apache/superset/pull/45315
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org