This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new a77625dfcc2 Fix mypy violations in test_taskinstance.py (#59863)
a77625dfcc2 is described below
commit a77625dfcc271210ccb7c9a838a72e4734287769
Author: Dev-iL <[email protected]>
AuthorDate: Sun Dec 28 13:35:40 2025 +0200
Fix mypy violations in test_taskinstance.py (#59863)
This fixes: Item "None" of "Any | None" has no attribute "id" (or "state")
[union-attr]
---
airflow-core/tests/unit/models/test_taskinstance.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/airflow-core/tests/unit/models/test_taskinstance.py
b/airflow-core/tests/unit/models/test_taskinstance.py
index c59cea89875..1498626778e 100644
--- a/airflow-core/tests/unit/models/test_taskinstance.py
+++ b/airflow-core/tests/unit/models/test_taskinstance.py
@@ -2787,6 +2787,7 @@ class TestTaskInstance:
with pytest.raises(TypeError):
ti.run()
ti = session.scalar(select(TaskInstance))
+ assert ti is not None
# the ti.id should be different from the previous one
assert ti.id != try_id
assert ti.state == State.UP_FOR_RETRY