vatsrahul1001 opened a new pull request, #77780: URL: https://github.com/apache/airflow/pull/77780
Declaring Base as an alias of Any under TYPE_CHECKING makes ty (0.0.52+) treat every model as an explicit Any subclass. Instances of those may be None, so reading a Mapped column on a model instance resolves to SQLAlchemy's class-access overload and is typed InstrumentedAttribute instead of the column's value type, producing false positives for code that type-checks against Airflow's models. A value of type Any keeps the same meaning for mypy and pyright and avoids the explicit-Any semantics. (cherry picked from commit 1df83c5dff61a031338bf3bc25c3a3a183acc4f6) Co-authored-by: Felix Uellendall <[email protected]> --- Clean cherry-pick of the merge commit, no conflicts. **Verified locally:** test_base.py and test_dag.py, 242 passed; ruff clean. Typing-only change (no runtime behavior change). Backport of #76025. Generated-by: Claude Code 🤖 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]
