sadpandajoe opened a new issue, #45314:
URL: https://github.com/apache/superset/issues/45314

   ## Problem
   The nightly scheduled `pre-commit checks` run on master fails at the 
full-repo `mypy (main)` step with 7 errors in two test files: six `[arg-type]` 
errors in `tests/unit_tests/semantic_layers/query_errors_test.py` (lines 191, 
269, 476: `set[Never]` passed where `list[Dimension]`/`list[Metric]` is 
expected) and one `[unused-ignore]` in 
`tests/unit_tests/models/helpers_test.py:3085`. First failing run: 
https://github.com/apache/superset/actions/runs/38521870062 (job 115713188528).
   
   ## Root cause
   #45110 (1fced034d3) added `query_errors_test.py` calling 
`SemanticQuery(dimensions=set(), metrics=set())`, but 
`SemanticQuery.dimensions`/`.metrics` are lists 
(`superset-core/src/superset_core/semantic_layers/types.py`). The 
`superset_core.*` override uses `follow_imports="skip"`, so changed-file CI 
sees `Any`; the nightly passes `superset-core/**` and sees the real types. 
#45133 (f5404f7eae) widened `FilterValues` in 
`superset/superset_typing.py:161-163` to accept `None` list items, which makes 
the `# type: ignore[list-item]` at `helpers_test.py:3085` unused. It didn't 
touch that file, so changed-file CI never ran mypy on it.
   
   ## Steps to reproduce
   On master 54d2421, with mypy 1.15.0 as pinned in `.pre-commit-config.yaml`:
   
   `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')`
   
   (Found via automated investigation — [Agor](https://agor.live/).)
   


-- 
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