This is an automated email from the ASF dual-hosted git repository. jedcunningham 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 3aebe6329c7 Fix typing on TIHistory.record_ti (#47222) 3aebe6329c7 is described below commit 3aebe6329c71e4c3b5caa07ce4096d046814c875 Author: Jed Cunningham <66968678+jedcunning...@users.noreply.github.com> AuthorDate: Fri Feb 28 12:24:17 2025 -0700 Fix typing on TIHistory.record_ti (#47222) --- airflow/models/taskinstancehistory.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airflow/models/taskinstancehistory.py b/airflow/models/taskinstancehistory.py index 279e29e3aef..a55bef7f055 100644 --- a/airflow/models/taskinstancehistory.py +++ b/airflow/models/taskinstancehistory.py @@ -47,6 +47,8 @@ from airflow.utils.sqlalchemy import ( from airflow.utils.state import State, TaskInstanceState if TYPE_CHECKING: + from sqlalchemy.orm.session import Session + from airflow.models.taskinstance import TaskInstance @@ -141,7 +143,7 @@ class TaskInstanceHistory(Base): @staticmethod @provide_session - def record_ti(ti: TaskInstance, session: NEW_SESSION = None) -> None: + def record_ti(ti: TaskInstance, session: Session = NEW_SESSION) -> None: """Record a TaskInstance to TaskInstanceHistory.""" exists_q = session.scalar( select(func.count(TaskInstanceHistory.task_id)).where(