Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
if AIRFLOW_V_3_0_PLUS:
from airflow.providers.standard.utils.skipmixin import SkipMixin
else:
from airflow.models.skipmixin import SkipMixin # type: ignore[no-redef]
from airflow.models.skipmixin import SkipMixin

if TYPE_CHECKING:
from airflow.sdk.definitions.context import Context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
from airflow.providers.standard.operators.branch import BaseBranchOperator
from airflow.providers.standard.utils.skipmixin import SkipMixin
else:
from airflow.models.skipmixin import SkipMixin # type: ignore[no-redef]
from airflow.models.skipmixin import SkipMixin
from airflow.operators.branch import BaseBranchOperator # type: ignore[no-redef]


Expand Down Expand Up @@ -330,7 +330,7 @@ def get_tasks_to_skip():
self.skip(
dag_run=context["dag_run"],
tasks=to_skip,
execution_date=cast("DateTime", dag_run.logical_date), # type: ignore[call-arg, union-attr]
execution_date=cast("DateTime", dag_run.logical_date), # type: ignore[call-arg]
map_index=context["ti"].map_index,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
if AIRFLOW_V_3_0_PLUS:
from airflow.sdk.execution_time.xcom import XCom
else:
from airflow.models import XCom # type: ignore[no-redef]
from airflow.models import XCom


class DagIsPaused(AirflowException):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
if AIRFLOW_V_3_0_PLUS:
from airflow.sdk.definitions.context import Context
else:
from airflow.utils.context import Context # type: ignore[no-redef]
from airflow.utils.context import Context


class ExternalDagLink(BaseOperatorLink):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async def run(self) -> typing.AsyncIterator[TriggerEvent]:
return
allowed_count = await get_count_func(self.allowed_states)

if allowed_count == len(run_id_or_dates): # type: ignore[arg-type]
if allowed_count == len(run_id_or_dates):
yield TriggerEvent({"status": "success"})
return
self.log.info("Sleeping for %s seconds", self.poke_interval)
Expand All @@ -140,7 +140,7 @@ async def _get_count_af_3(self, states):
}
if self.external_task_ids:
count = await sync_to_async(RuntimeTaskInstance.get_ti_count)(
task_ids=self.external_task_ids, # type: ignore[arg-type]
task_ids=self.external_task_ids,
states=states,
**params,
)
Expand Down Expand Up @@ -233,7 +233,7 @@ async def run(self) -> typing.AsyncIterator[TriggerEvent]:
return
else:
while True:
num_dags = await self.count_dags() # type: ignore[call-arg]
num_dags = await self.count_dags()
if num_dags == runs_ids_or_dates:
yield TriggerEvent(self.serialize())
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def _ensure_tasks(nodes: Iterable[DAGNode]) -> Sequence[Operator]:
from airflow.sdk.definitions.mappedoperator import MappedOperator
else:
from airflow.models.baseoperator import BaseOperator # type: ignore[no-redef]
from airflow.models.mappedoperator import MappedOperator # type: ignore[no-redef]
from airflow.models.mappedoperator import MappedOperator

return [n for n in nodes if isinstance(n, (BaseOperator, MappedOperator))]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

class TestPythonSensor(BasePythonTest):
# TODO(kaxil) - this typing hint is fishy
opcls = PythonSensor # type: ignore[assignment]
opcls = PythonSensor

def test_python_sensor_true(self):
self.run_as_task(fn=lambda: True)
Expand Down