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 @@ -41,13 +41,13 @@
from airflow.sdk import DAG, Param, Variable, task, task_group
except ImportError:
# Airflow 2.10 compat
from airflow.decorators import task, task_group # type: ignore[no-redef,attr-defined]
from airflow.models.dag import DAG # type: ignore[no-redef,attr-defined,assignment]
from airflow.models.param import Param # type: ignore[no-redef,attr-defined]
from airflow.models.variable import Variable # type: ignore[no-redef,attr-defined]
from airflow.operators.bash import BashOperator # type: ignore[no-redef,attr-defined]
from airflow.operators.empty import EmptyOperator # type: ignore[no-redef,attr-defined]
from airflow.operators.python import PythonOperator # type: ignore[no-redef,attr-defined]
from airflow.decorators import task, task_group
from airflow.models.dag import DAG # type: ignore[assignment]
from airflow.models.param import Param # type: ignore[no-redef]
from airflow.models.variable import Variable
from airflow.operators.bash import BashOperator # type: ignore[no-redef]
from airflow.operators.empty import EmptyOperator # type: ignore[no-redef]
from airflow.operators.python import PythonOperator # type: ignore[no-redef]

with DAG(
dag_id="integration_test",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
try:
from airflow.sdk.types import RuntimeTaskInstanceProtocol as TaskInstance
except ImportError:
from airflow.models import TaskInstance # type: ignore[assignment, no-redef]
from airflow.models import TaskInstance # type: ignore[assignment]
from airflow.utils.context import Context

try:
from airflow.operators.python import PythonOperator # type: ignore
from airflow.operators.python import PythonOperator
except ImportError:
from airflow.providers.common.compat.standard.operators import PythonOperator

Expand Down Expand Up @@ -277,7 +277,7 @@ def branching():

@task.virtualenv(requirements="numpy")
def virtualenv():
import numpy # type: ignore
import numpy

print(f"Welcome to virtualenv with numpy version {numpy.__version__}.")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def jwt_validate(authorization: str) -> dict:

else:
# Airflow 2.10 compatibility
from airflow.utils.jwt_signer import JWTSigner # type: ignore
from airflow.utils.jwt_signer import JWTSigner

@cache
def jwt_signer() -> JWTSigner:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def decorator(func: Callable) -> Callable:

# In Airflow 3 with AIP-72 we get workload addressed by ExecuteTask
# But in Airflow 2.10 it is a command line array
ExecuteTask = list[str] # type: ignore[no-redef,assignment,misc]
ExecuteTask = list[str] # type: ignore[assignment,misc]

def parse_command(command: str) -> ExecuteTask:
from ast import literal_eval
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def rpcapi_v2(body: dict[str, Any]) -> APIResponse:
# Note: Except the method map this _was_ a 100% copy of internal API module
# airflow.api_internal.endpoints.rpc_api_endpoint.internal_airflow_api()
# As of rework for FastAPI in Airflow 3.0, this is updated and to be removed in the future.
from airflow.api_internal.endpoints.rpc_api_endpoint import ( # type: ignore[attr-defined]
from airflow.api_internal.endpoints.rpc_api_endpoint import (
# Note: This is just for compatibility with Airflow 2.10, not working for Airflow 3 / main as removed
initialize_method_map,
)
Expand Down