Skip to content

Commit a77625d

Browse files
authored
Fix mypy violations in test_taskinstance.py (#59863)
This fixes: Item "None" of "Any | None" has no attribute "id" (or "state") [union-attr]
1 parent 9941f18 commit a77625d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

airflow-core/tests/unit/models/test_taskinstance.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2787,6 +2787,7 @@ def test_task_instance_history_with_hitl_history_is_created_when_ti_goes_for_ret
27872787
with pytest.raises(TypeError):
27882788
ti.run()
27892789
ti = session.scalar(select(TaskInstance))
2790+
assert ti is not None
27902791
# the ti.id should be different from the previous one
27912792
assert ti.id != try_id
27922793
assert ti.state == State.UP_FOR_RETRY

0 commit comments

Comments
 (0)