This is an automated email from the ASF dual-hosted git repository.

vincbeck 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 c4520e96ddb fix: Fix mypy assignment errors in HITL models (#57382)
c4520e96ddb is described below

commit c4520e96ddb385ffed06e36a217d0f521f2d2138
Author: LI,JHE-CHEN <[email protected]>
AuthorDate: Tue Oct 28 09:49:40 2025 -0400

    fix: Fix mypy assignment errors in HITL models (#57382)
---
 airflow-core/src/airflow/models/hitl.py         | 10 ++++++----
 airflow-core/src/airflow/models/hitl_history.py |  4 +++-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/airflow-core/src/airflow/models/hitl.py 
b/airflow-core/src/airflow/models/hitl.py
index 7553f2fc097..2efe7bba080 100644
--- a/airflow-core/src/airflow/models/hitl.py
+++ b/airflow-core/src/airflow/models/hitl.py
@@ -84,9 +84,9 @@ class HITLUser(TypedDict):
 class HITLDetailPropertyMixin:
     """The property part of HITLDetail and HITLDetailHistory."""
 
-    responded_at: UtcDateTime
-    responded_by: dict[str, Any]
-    assignees: list[dict[str, str]]
+    responded_at: datetime | None
+    responded_by: dict[str, Any] | None
+    assignees: list[dict[str, str]] | None
 
     @hybrid_property
     def response_received(self) -> bool:
@@ -153,7 +153,9 @@ class HITLDetail(Base, HITLDetailPropertyMixin):
     params: Mapped[dict] = mapped_column(
         sqlalchemy_jsonfield.JSONField(json=json), nullable=False, default={}
     )
-    assignees: Mapped[dict | None] = 
mapped_column(sqlalchemy_jsonfield.JSONField(json=json), nullable=True)
+    assignees: Mapped[list[dict[str, str]] | None] = mapped_column(
+        sqlalchemy_jsonfield.JSONField(json=json), nullable=True
+    )
     created_at: Mapped[datetime] = mapped_column(UtcDateTime, 
default=timezone.utcnow, nullable=False)
 
     # Response Content Detail
diff --git a/airflow-core/src/airflow/models/hitl_history.py 
b/airflow-core/src/airflow/models/hitl_history.py
index 9ac0fe430f7..fbf9e338649 100644
--- a/airflow-core/src/airflow/models/hitl_history.py
+++ b/airflow-core/src/airflow/models/hitl_history.py
@@ -57,7 +57,9 @@ class HITLDetailHistory(Base, HITLDetailPropertyMixin):
     params: Mapped[dict] = mapped_column(
         sqlalchemy_jsonfield.JSONField(json=json), nullable=False, default={}
     )
-    assignees: Mapped[dict | None] = 
mapped_column(sqlalchemy_jsonfield.JSONField(json=json), nullable=True)
+    assignees: Mapped[list[dict[str, str]] | None] = mapped_column(
+        sqlalchemy_jsonfield.JSONField(json=json), nullable=True
+    )
     created_at: Mapped[datetime] = mapped_column(UtcDateTime, 
default=timezone.utcnow, nullable=False)
 
     # Response Content Detail

Reply via email to