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/13 08:37:54 UTC
[I] Nightly full-repo pre-commit fails: mypy union-attr in metric_filter_test and oxfmt drift on two files [superset]
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: notifications-unsubscribe@superset.apache.org.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: [I] Nightly full-repo pre-commit fails: mypy union-attr in metric_filter_test and oxfmt drift on two files [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #45238: Nightly full-repo pre-commit fails: mypy union-attr in metric_filter_test and oxfmt drift on two files
URL: https://github.com/apache/superset/issues/45238
--
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