sadpandajoe opened a new pull request, #45138: URL: https://github.com/apache/superset/pull/45138
### SUMMARY No single introducing commit — this is a structural consequence of superset-core's abstract CoreModel classes (Dataset, Chart, KeyValue) declaring id/uuid as plain type hints for their public interface, combined with SqlaTable, Slice, and KeyValueEntry listing those abstract classes first in their MRO. mypy resolves .id/.uuid to the plain hint instead of the real SQLAlchemy descriptor whenever superset-core's own sources are part of the same mypy run — which only happens on the nightly full-tree lint, not the normal per-PR (changed-files-only) run. This exact mechanism is already documented in pyproject.toml and already ignored for three other call sites (dataset_scope.py, importers/v1, test_dataset_tools.py); this PR adds the same # type: ignore + warn_unused_ignores override treatment for three more call sites the nightly job newly flagged: superset/daos/datasource.py:111, superset/commands/security/reset.py:82, and tests/unit_tests/commands/deletion_retention/test_purge_chart_detach.py:203. None of the underlying SQLAlchemy columns are missing a runtime null-check — .is_()/.in_()/comparison operators work fine on nullable mapped columns; this is purely a static-type artifact. ### TESTING INSTRUCTIONS 1. Check out this branch. 2. From the repo root, run pre-commit run mypy --all-files (or prek run mypy --all-files). 3. Confirm no errors are reported at superset/daos/datasource.py, superset/commands/security/reset.py:82, or tests/unit_tests/commands/deletion_retention/test_purge_chart_detach.py:203 (line numbers shift slightly after formatting — check by file, not just line). 4. Run pytest tests/unit_tests/dao/datasource_test.py tests/unit_tests/commands/security/reset_test.py tests/unit_tests/commands/datasource/list_test.py tests/unit_tests/commands/deletion_retention/test_purge_chart_detach.py and confirm all pass (no runtime behavior changed). ### ADDITIONAL INFORMATION - [x] Has associated issue: Fixes #45137 - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in SIP-59) - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
