sadpandajoe opened a new pull request, #45835:
URL: https://github.com/apache/superset/pull/45835

   ### SUMMARY
   The nightly `pre-commit checks` run (`prek run --all-files`) fails `mypy 
(main)` with three errors. Per-PR runs only type-check changed files, and 
`superset_core.*` modules that are not on the command line are skipped 
(`follow_imports = "skip"`) and become `Any`, so each error only surfaces in 
the full-tree run.
   
   - #45395 introduced the two superset-core errors 
(`semantic_layers/testing.py:154`, 
`tests/semantic_layers/conformance_provider.py:153`).
   - #45681 introduced the `virtual_dataset_connections_test.py` error.
   
   Changes, typing only, no runtime behavior change:
   - `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 may be `AdhocExpression`, 
which the existing "not in columns" guard already rejects; add an `isinstance` 
filter 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
   1. With mypy 1.15.0 and the hook's `types-*` dependencies, run the full tree 
as the nightly job does: `pre-commit run mypy --all-files` (or `prek run mypy 
--all-files`).
   2. On master this reports 3 errors in 3 files; on this branch it reports 
`Success: no issues found`.
   3. Optionally run `pytest superset-core/tests/semantic_layers/` and `pytest 
tests/unit_tests/connectors/sqla/virtual_dataset_connections_test.py` to 
confirm no behavior change.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] 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
   
   Notes:
   - The `isinstance` filter in `conformance_provider.py` relies on the 
existing guard just above it; style-only observation from review, no behavior 
impact.
   
   🤖 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to