Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions task-sdk/src/airflow/sdk/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
if TYPE_CHECKING:
from collections.abc import Iterator

import jinja2
from pydantic import AwareDatetime, JsonValue

from airflow.models.taskinstance import TaskInstance as SchedulerTaskInstance
Expand Down Expand Up @@ -135,10 +136,18 @@ class RuntimeTaskInstanceProtocol(Protocol):
start_date: AwareDatetime
end_date: AwareDatetime | None = None
state: TaskInstanceState | None = None
is_mapped: bool | None = None
rendered_map_index: str | None = None

@property
def log_url(self) -> str: ...

@property
def mark_success_url(self) -> str: ...

def xcom_pull(
self,
task_ids: str | list[str] | None = None,
task_ids: str | Iterable[str] | None = None,
dag_id: str | None = None,
key: str = BaseXCom.XCOM_RETURN_KEY,
include_prior_dates: bool = False,
Expand All @@ -152,7 +161,13 @@ def xcom_push(self, key: str, value: Any) -> None: ...

def get_template_context(self) -> Context: ...

def get_first_reschedule_date(self, first_try_number) -> AwareDatetime | None: ...
def render_templates(
self,
context: Context | None = None,
jinja_env: jinja2.Environment | None = None,
) -> BaseOperator: ...

def get_first_reschedule_date(self, context: Context) -> AwareDatetime | None: ...

def get_previous_dagrun(self, state: str | None = None) -> DagRunProtocol | None: ...

Expand Down
Loading