aminghadersohi opened a new pull request, #36907:
URL: https://github.com/apache/superset/pull/36907
## Summary
When `superset-core` is installed as an editable dependency locally (via
`apache-superset-core = { path = "./superset-core", editable = true }`), mypy
can see its type information and flags `# type: ignore` comments as unused. In
CI, the types aren't exposed the same way, so those comments are still needed.
This adds mypy overrides to:
1. Skip following imports from `superset_core` module
2. Disable `warn_unused_ignores` for modules with dynamic type assignments
that need `# type: ignore` in CI
**Affected modules:**
- `superset.core.api.core_api_injection`
- `superset.security.manager`
- `superset.daos.base`
- `superset.connectors.sqla.models`
- `superset.tags.filters`
- `superset.commands.security.update`
- `superset.commands.security.create`
## Before/After
**Before:** Local pre-commit mypy fails with 26 "Unused type: ignore
comment" errors
**After:** Local pre-commit mypy passes, matching CI behavior
## Test Plan
- [x] Verified `pre-commit run mypy --files
superset/core/api/core_api_injection.py` passes locally
- [x] Verified all previously failing files pass mypy locally
- [ ] CI should continue to pass (no behavioral change in CI)
## Additional Information
This issue started appearing for developers with local editable installs of
superset-core after the superset-core package was introduced. The fix ensures
consistent behavior between local development and CI environments.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]