kokhlo commented on issue #44423: URL: https://github.com/apache/superset/issues/44423#issuecomment-5727017698
Root cause confirmed on master: `UUIDMixin.uuid` (`superset/models/helpers.py:751`) is a nullable `sa.Column`, so mypy infers `UUID | None` for instance reads, and the four versioning test files pass it (and `BaseDatasource.description`, `str | None` at `superset/connectors/sqla/models.py:223`) straight into strictly-typed callees (`get_activity`, `derive_version_uuid`, `restore_version`, `VersionDAO.current_live_transaction_id(_locked)`) without narrowing. The nightly leg is the first `--all-files` sweep since #44258/#44251/#44091 merged, because the "next" mypy leg in `pre-commit.yml` only runs on push/schedule, not on `pull_request` — same class as #44384/#44394. Fix: add `assert <value> is not None` (or a pre-read narrowed local) immediately at each of the 23 flagged sites, matching the idiom already used in #44394/#42654. Test-only change, no runtime behaviour difference. I reproduced 22/23 diagnostics locally with mypy 1.15.0 (the pinned pre-commit rev) and verified all 23 sites on current master. PR within the hour. -- 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]
