#44646·superset

nightly pre-commit (next) fails: mypy UUID-annotation regression in versioning tests + oxfmt 0.68 formatting drift

Author: sadpandajoeCreated Sep 25, 2026Updated Sep 25, 2026

Problem

Nightly full-repo pre-commit run fails two hooks: https://github.com/apache/superset/actions/runs/36102701456/job/107968444184 (master 599026a0e5a). mypy: Found 19 errors in 4 files (checked 2774 source files), all "Incompatible types in assignment (expression has type "UUID | None", variable has type "UUID")". oxfmt: files were modified by this hook on 2 frontend files.

Root cause

mypy: #44424 added assert x is not None narrowing after reads of UUIDMixin.uuid/description (superset/models/helpers.py:751, UUID | None), but wrote the intermediate variable with an explicit type annotation, e.g. created_uuid: UUID = created.uuid at tests/integration_tests/versioning/creation_row_tests.py:145 (and 18 more sites the same way across creation_row_tests.py, conditional_token_lock_tests.py, activity_write_after_read_tests.py, restore_fails_closed_tests.py). mypy flags the annotated assignment itself before the following assert can narrow anything.

oxfmt: dependabot bumped oxfmt 0.67.0→0.68.0 in superset-frontend/package.json + package-lock.json with no accompanying oxfmt --write pass. superset-frontend/src/features/versionHistory/VersionHistoryPanel.tsx and superset-frontend/src/setup/setupApp.ts were formatted under the older output and now fail --check.

Steps to reproduce

Run pre-commit run mypy --all-files and pre-commit run oxfmt --all-files on master. mypy reports the 19 UUID/str errors above; oxfmt reports the 2 files need reformatting. (Found via automated investigation — Agor.)