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

   ### Problem
   
   The nightly full-repo `pre-commit` run on `master` fails with two unrelated 
issues in the same job: 
https://github.com/apache/superset/actions/runs/38356808963/job/115161508786 
(commit 1578b8cbc1117bdf0f828a74ad80371138f1c717).
   
   mypy fails on `tests/unit_tests/semantic_layers/metric_filter_test.py:248`, 
iterating `query.filters` in a set comprehension without narrowing away `None` 
first:
   
   ```
   tests/unit_tests/semantic_layers/metric_filter_test.py:248: error: Item 
"None" of "set[Filter] | None" has no attribute "__iter__" (not iterable) 
[union-attr]
   ```
   
   Separately, oxfmt flags 
`superset-frontend/packages/superset-ui-core/src/components/Typography/index.tsx`
 and 
`superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx`
 as drifted.
   
   ### Root cause
   
   `SemanticQuery.filters` is `set[Filter] | None` 
(`superset-core/src/superset_core/semantic_layers/types.py:234`). 
`pyproject.toml` sets `follow_imports = "skip"` for `superset_core.*`, so a 
scoped mypy run never sees the real type; this only surfaces when 
superset-core's own source is in the same mypy invocation, as the nightly 
full-repo run does.
   
   The oxfmt drift comes from #45225 (dependabot, 9c70fa4015, merged 
2026-10-12), bumping oxfmt 0.71.0 → 0.72.0. The new version reformats arrow 
functions whose body is a tagged `css` template literal differently, flagging 
the two files above.
   
   ### Steps to reproduce
   
   mypy: with mypy 1.15.0 plus the `additional_dependencies` from 
`.pre-commit-config.yaml` and `superset-core` installed editable, run `mypy 
--check-untyped-defs tests/unit_tests/semantic_layers/metric_filter_test.py 
superset-core/src/superset_core/semantic_layers/types.py`.
   
   oxfmt: run `npx oxfmt@^0.72.0 --write` on the two files above and diff 
against master.
   
   (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