mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
[airflow
] Update AIR301
and AIR311
with the latest Airflow implementations (#17985)
<!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary <!-- What's the purpose of the change? What does it do, and why? --> * Remove the following rules * name * `airflow.auth.managers.base_auth_manager.is_authorized_dataset` → `airflow.api_fastapi.auth.managers.base_auth_manager.is_authorized_asset` * `airflow.providers.fab.auth_manager.fab_auth_manager.is_authorized_dataset` → `airflow.providers.fab.auth_manager.fab_auth_manager.is_authorized_asset` * Update the following rules * name * `airflow.models.baseoperatorlink.BaseOperatorLink` → `airflow.sdk.BaseOperatorLink` * `airflow.api_connexion.security.requires_access` → "Use `airflow.api_fastapi.core_api.security.requires_access_*` instead`" * `airflow.api_connexion.security.requires_access_dataset`→ `airflow.api_fastapi.core_api.security.requires_access_asset` * `airflow.notifications.basenotifier.BaseNotifier` → `airflow.sdk.bases.notifier.BaseNotifier` * `airflow.www.auth.has_access` → None * `airflow.www.auth.has_access_dataset` → None * `airflow.www.utils.get_sensitive_variables_fields`→ None * `airflow.www.utils.should_hide_value_for_key`→ None * class attribute * `airflow..sensors.weekday.DayOfWeekSensor` * `use_task_execution_day` removed * `airflow.providers.amazon.aws.auth_manager.aws_auth_manager.AwsAuthManager` * `is_authorized_dataset` * Add the following rules * class attribute * `airflow.auth.managers.base_auth_manager.BaseAuthManager` | `airflow.providers.fab.auth_manager.fab_auth_manager.FabAuthManager` * name * `airflow.auth.managers.base_auth_manager.BaseAuthManager` → `airflow.api_fastapi.auth.managers.base_auth_manager.BaseAuthManager` * `is_authorized_dataset` → `is_authorized_asset` * refactor * simplify unnecessary match with if else * rename Replacement::Name as Replacement::AttrName ## Test Plan <!-- How was it tested? --> The test fixtures have been revised and updated.
This commit is contained in:
parent
99cb89f90f
commit
236633cd42
13 changed files with 614 additions and 480 deletions
|
@ -5,6 +5,7 @@ from datetime import timedelta
|
|||
from airflow import DAG, dag
|
||||
from airflow.operators.datetime import BranchDateTimeOperator
|
||||
from airflow.operators.trigger_dagrun import TriggerDagRunOperator
|
||||
from airflow.operators.weekday import BranchDayOfWeekOperator
|
||||
from airflow.providers.amazon.aws.log.s3_task_handler import S3TaskHandler
|
||||
from airflow.providers.apache.hdfs.log.hdfs_task_handler import HdfsTaskHandler
|
||||
from airflow.providers.elasticsearch.log.es_task_handler import ElasticsearchTaskHandler
|
||||
|
@ -12,7 +13,7 @@ from airflow.providers.fab.auth_manager.fab_auth_manager import FabAuthManager
|
|||
from airflow.providers.google.cloud.log.gcs_task_handler import GCSTaskHandler
|
||||
from airflow.providers.standard.operators import datetime, trigger_dagrun
|
||||
from airflow.providers.standard.sensors import weekday
|
||||
from airflow.sensors.weekday import BranchDayOfWeekOperator, DayOfWeekSensor
|
||||
from airflow.sensors.weekday import DayOfWeekSensor
|
||||
from airflow.timetables.simple import NullTimetable
|
||||
|
||||
DAG(dag_id="class_schedule", schedule="@hourly")
|
||||
|
@ -50,10 +51,10 @@ def decorator_timetable():
|
|||
@dag()
|
||||
def decorator_deprecated_operator_args():
|
||||
trigger_dagrun_op = trigger_dagrun.TriggerDagRunOperator(
|
||||
task_id="trigger_dagrun_op1", execution_date="2024-12-04"
|
||||
task_id="trigger_dagrun_op1", trigger_dag_id="test", execution_date="2024-12-04"
|
||||
)
|
||||
trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
task_id="trigger_dagrun_op2", execution_date="2024-12-04"
|
||||
task_id="trigger_dagrun_op2", trigger_dag_id="test", execution_date="2024-12-04"
|
||||
)
|
||||
|
||||
branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
|
@ -66,16 +67,30 @@ def decorator_deprecated_operator_args():
|
|||
)
|
||||
|
||||
dof_task_sensor = weekday.DayOfWeekSensor(
|
||||
task_id="dof_task_sensor", use_task_execution_day=True
|
||||
task_id="dof_task_sensor",
|
||||
week_day=1,
|
||||
use_task_execution_day=True,
|
||||
)
|
||||
dof_task_sensor2 = DayOfWeekSensor(
|
||||
task_id="dof_task_sensor2", use_task_execution_day=True
|
||||
task_id="dof_task_sensor2",
|
||||
week_day=1,
|
||||
use_task_execution_day=True,
|
||||
)
|
||||
|
||||
bdow_op = weekday.BranchDayOfWeekOperator(
|
||||
task_id="bdow_op", use_task_execution_day=True
|
||||
task_id="bdow_op",
|
||||
follow_task_ids_if_false=None,
|
||||
follow_task_ids_if_true=None,
|
||||
week_day=1,
|
||||
use_task_execution_day=True,
|
||||
)
|
||||
bdow_op2 = BranchDayOfWeekOperator(
|
||||
task_id="bdow_op2",
|
||||
follow_task_ids_if_false=None,
|
||||
follow_task_ids_if_true=None,
|
||||
week_day=1,
|
||||
use_task_execution_day=True,
|
||||
)
|
||||
bdow_op2 = BranchDayOfWeekOperator(task_id="bdow_op2", use_task_execution_day=True)
|
||||
|
||||
trigger_dagrun_op >> trigger_dagrun_op2
|
||||
branch_dt_op >> branch_dt_op2
|
||||
|
|
|
@ -10,7 +10,7 @@ from airflow.datasets import (
|
|||
)
|
||||
from airflow.datasets.manager import DatasetManager
|
||||
from airflow.lineage.hook import DatasetLineageInfo, HookLineageCollector
|
||||
from airflow.providers.amazon.auth_manager.aws_auth_manager import AwsAuthManager
|
||||
from airflow.providers.amazon.aws.auth_manager.aws_auth_manager import AwsAuthManager
|
||||
from airflow.providers.apache.beam.hooks import BeamHook, NotAir302HookError
|
||||
from airflow.providers.google.cloud.secrets.secret_manager import (
|
||||
CloudSecretManagerBackend,
|
||||
|
@ -83,8 +83,7 @@ not_an_error.get_conn_uri()
|
|||
|
||||
# airflow.providers_manager
|
||||
pm = ProvidersManager()
|
||||
pm.initialize_providers_asset_uri_resources()
|
||||
pm.dataset_factories
|
||||
pm.initialize_providers_dataset_uri_resources()
|
||||
pm.dataset_factories
|
||||
pm.dataset_uri_handlers
|
||||
pm.dataset_to_openlineage_converters
|
||||
|
|
|
@ -159,3 +159,13 @@ sanitize_uri
|
|||
from airflow.providers.trino.datasets.trino import sanitize_uri
|
||||
|
||||
sanitize_uri
|
||||
|
||||
# airflow.notifications.basenotifier
|
||||
from airflow.notifications.basenotifier import BaseNotifier
|
||||
|
||||
BaseNotifier()
|
||||
|
||||
# airflow.auth.manager
|
||||
from airflow.auth.managers.base_auth_manager import BaseAuthManager
|
||||
|
||||
BaseAuthManager()
|
||||
|
|
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||
from airflow.api_connexion.security import requires_access_dataset
|
||||
from airflow.auth.managers.models.resource_details import (
|
||||
DatasetDetails,
|
||||
is_authorized_dataset,
|
||||
|
||||
)
|
||||
from airflow.datasets.manager import (
|
||||
DatasetManager,
|
||||
|
@ -19,7 +19,7 @@ from airflow.www.auth import has_access_dataset
|
|||
requires_access_dataset()
|
||||
|
||||
DatasetDetails()
|
||||
is_authorized_dataset()
|
||||
|
||||
|
||||
DatasetManager()
|
||||
dataset_manager()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from airflow.providers.amazon.aws.auth_manager.avp.entities.AvpEntities import DATASET
|
||||
from airflow.providers.amazon.aws.auth_manager.avp.entities import AvpEntities
|
||||
from airflow.providers.amazon.aws.datasets.s3 import (
|
||||
convert_dataset_to_openlineage as s3_convert_dataset_to_openlineage,
|
||||
)
|
||||
|
@ -9,7 +9,7 @@ from airflow.providers.common.io.dataset.file import (
|
|||
convert_dataset_to_openlineage as io_convert_dataset_to_openlineage,
|
||||
)
|
||||
from airflow.providers.common.io.dataset.file import create_dataset as io_create_dataset
|
||||
from airflow.providers.fab.auth_manager.fab_auth_manager import is_authorized_dataset as fab_is_authorized_dataset
|
||||
|
||||
from airflow.providers.google.datasets.bigquery import (
|
||||
create_dataset as bigquery_create_dataset,
|
||||
)
|
||||
|
@ -22,7 +22,7 @@ from airflow.providers.openlineage.utils.utils import (
|
|||
translate_airflow_dataset,
|
||||
)
|
||||
|
||||
DATASET
|
||||
AvpEntities.DATASET
|
||||
|
||||
s3_create_dataset()
|
||||
s3_convert_dataset_to_openlineage()
|
||||
|
@ -30,7 +30,7 @@ s3_convert_dataset_to_openlineage()
|
|||
io_create_dataset()
|
||||
io_convert_dataset_to_openlineage()
|
||||
|
||||
fab_is_authorized_dataset()
|
||||
|
||||
|
||||
# airflow.providers.google.datasets.bigquery
|
||||
bigquery_create_dataset()
|
||||
|
|
|
@ -100,8 +100,8 @@ pub(crate) fn airflow_3_removal_expr(checker: &Checker, expr: &Expr) {
|
|||
check_method(checker, call_expr);
|
||||
check_context_key_usage_in_call(checker, call_expr);
|
||||
}
|
||||
Expr::Attribute(attribute_expr @ ExprAttribute { attr, .. }) => {
|
||||
check_name(checker, expr, attr.range());
|
||||
Expr::Attribute(attribute_expr @ ExprAttribute { range, .. }) => {
|
||||
check_name(checker, expr, *range);
|
||||
check_class_attribute(checker, attribute_expr);
|
||||
}
|
||||
Expr::Name(ExprName { id, ctx, range }) => {
|
||||
|
@ -260,8 +260,9 @@ fn check_call_arguments(checker: &Checker, qualified_name: &QualifiedName, argum
|
|||
..,
|
||||
"operators",
|
||||
"weekday",
|
||||
"DayOfWeekSensor" | "BranchDayOfWeekOperator",
|
||||
] => {
|
||||
"BranchDayOfWeekOperator",
|
||||
]
|
||||
| ["airflow", .., "sensors", "weekday", "DayOfWeekSensor"] => {
|
||||
checker.report_diagnostics(diagnostic_for_argument(
|
||||
arguments,
|
||||
"use_task_execution_day",
|
||||
|
@ -496,17 +497,6 @@ fn check_method(checker: &Checker, call_expr: &ExprCall) {
|
|||
"collected_datasets" => Replacement::AttrName("collected_assets"),
|
||||
_ => return,
|
||||
},
|
||||
[
|
||||
"airflow",
|
||||
"providers",
|
||||
"amazon",
|
||||
"auth_manager",
|
||||
"aws_auth_manager",
|
||||
"AwsAuthManager",
|
||||
] => match attr.as_str() {
|
||||
"is_authorized_dataset" => Replacement::AttrName("is_authorized_asset"),
|
||||
_ => return,
|
||||
},
|
||||
["airflow", "providers_manager", "ProvidersManager"] => match attr.as_str() {
|
||||
"initialize_providers_dataset_uri_resources" => {
|
||||
Replacement::AttrName("initialize_providers_asset_uri_resources")
|
||||
|
@ -539,6 +529,12 @@ fn check_method(checker: &Checker, call_expr: &ExprCall) {
|
|||
"get_connections" => Replacement::AttrName("get_connection"),
|
||||
_ => return,
|
||||
}
|
||||
} else if is_airflow_auth_manager(segments) {
|
||||
if attr.as_str() == "is_authorized_dataset" {
|
||||
Replacement::AttrName("is_authorized_asset")
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
@ -596,20 +592,30 @@ fn check_name(checker: &Checker, expr: &Expr, range: TextRange) {
|
|||
] => Replacement::Message("Use `sys.version_info` instead"),
|
||||
|
||||
// airflow.api_connexion.security
|
||||
["airflow", "api_connexion", "security", "requires_access"] => {
|
||||
Replacement::Message("Use `airflow.api_connexion.security.requires_access_*` instead")
|
||||
}
|
||||
["airflow", "api_connexion", "security", "requires_access"] => Replacement::Message(
|
||||
"Use `airflow.api_fastapi.core_api.security.requires_access_*` instead",
|
||||
),
|
||||
[
|
||||
"airflow",
|
||||
"api_connexion",
|
||||
"security",
|
||||
"requires_access_dataset",
|
||||
] => Replacement::AutoImport {
|
||||
module: "airflow.api_connexion.security",
|
||||
module: "airflow.api_fastapi.core_api.security",
|
||||
name: "requires_access_asset",
|
||||
},
|
||||
|
||||
// airflow.auth.managers
|
||||
[
|
||||
"airflow",
|
||||
"auth",
|
||||
"managers",
|
||||
"base_auth_manager",
|
||||
"BaseAuthManager",
|
||||
] => Replacement::AutoImport {
|
||||
module: "airflow.api_fastapi.auth.managers.base_auth_manager",
|
||||
name: "BaseAuthManager",
|
||||
},
|
||||
[
|
||||
"airflow",
|
||||
"auth",
|
||||
|
@ -621,26 +627,17 @@ fn check_name(checker: &Checker, expr: &Expr, range: TextRange) {
|
|||
module: "airflow.api_fastapi.auth.managers.models.resource_details",
|
||||
name: "AssetDetails",
|
||||
},
|
||||
[
|
||||
"airflow",
|
||||
"auth",
|
||||
"managers",
|
||||
"base_auth_manager",
|
||||
"is_authorized_dataset",
|
||||
] => Replacement::AutoImport {
|
||||
module: "airflow.api_fastapi.auth.managers.base_auth_manager",
|
||||
name: "is_authorized_asset",
|
||||
},
|
||||
|
||||
// airflow.configuration
|
||||
// TODO: check whether we could improve it
|
||||
[
|
||||
"airflow",
|
||||
"configuration",
|
||||
rest @ ("as_dict" | "get" | "getboolean" | "getfloat" | "getint" | "has_option"
|
||||
| "remove_option" | "set"),
|
||||
] => Replacement::SourceModuleMoved {
|
||||
module: "airflow.configuration.conf",
|
||||
name: (*rest).to_string(),
|
||||
module: "airflow.configuration",
|
||||
name: format!("conf.{rest}"),
|
||||
},
|
||||
|
||||
// airflow.contrib.*
|
||||
|
@ -680,7 +677,6 @@ fn check_name(checker: &Checker, expr: &Expr, range: TextRange) {
|
|||
},
|
||||
|
||||
// airflow.listeners.spec
|
||||
// TODO: this is removed
|
||||
["airflow", "listeners", "spec", "dataset", rest] => match *rest {
|
||||
"on_dataset_created" => Replacement::AutoImport {
|
||||
module: "airflow.listeners.spec.asset",
|
||||
|
@ -708,7 +704,7 @@ fn check_name(checker: &Checker, expr: &Expr, range: TextRange) {
|
|||
|
||||
// airflow.notifications
|
||||
["airflow", "notifications", "basenotifier", "BaseNotifier"] => Replacement::AutoImport {
|
||||
module: "airflow.sdk",
|
||||
module: "airflow.sdk.bases.notifier",
|
||||
name: "BaseNotifier",
|
||||
},
|
||||
|
||||
|
@ -818,22 +814,18 @@ fn check_name(checker: &Checker, expr: &Expr, range: TextRange) {
|
|||
},
|
||||
|
||||
// airflow.www
|
||||
// TODO: www has been removed
|
||||
["airflow", "www", "auth", "has_access"] => {
|
||||
Replacement::Message("Use `airflow.www.auth.has_access_*` instead")
|
||||
}
|
||||
["airflow", "www", "auth", "has_access_dataset"] => Replacement::AutoImport {
|
||||
module: "airflow.www.auth",
|
||||
name: "has_access_asset",
|
||||
},
|
||||
["airflow", "www", "utils", "get_sensitive_variables_fields"] => Replacement::AutoImport {
|
||||
module: "airflow.utils.log.secrets_masker",
|
||||
name: "get_sensitive_variables_fields",
|
||||
},
|
||||
["airflow", "www", "utils", "should_hide_value_for_key"] => Replacement::AutoImport {
|
||||
module: "airflow.utils.log.secrets_masker",
|
||||
name: "should_hide_value_for_key",
|
||||
},
|
||||
[
|
||||
"airflow",
|
||||
"www",
|
||||
"auth",
|
||||
"has_access" | "has_access_dataset",
|
||||
] => Replacement::None,
|
||||
[
|
||||
"airflow",
|
||||
"www",
|
||||
"utils",
|
||||
"get_sensitive_variables_fields" | "should_hide_value_for_key",
|
||||
] => Replacement::None,
|
||||
|
||||
// airflow.providers.amazon
|
||||
[
|
||||
|
@ -870,8 +862,8 @@ fn check_name(checker: &Checker, expr: &Expr, range: TextRange) {
|
|||
"AvpEntities",
|
||||
"DATASET",
|
||||
] => Replacement::AutoImport {
|
||||
module: "airflow.providers.amazon.aws.auth_manager.avp.entities.AvpEntities",
|
||||
name: "ASSET",
|
||||
module: "airflow.providers.amazon.aws.auth_manager.avp.entities",
|
||||
name: "AvpEntities.ASSET",
|
||||
},
|
||||
|
||||
// airflow.providers.common.io
|
||||
|
@ -900,19 +892,6 @@ fn check_name(checker: &Checker, expr: &Expr, range: TextRange) {
|
|||
_ => return,
|
||||
},
|
||||
|
||||
// airflow.providers.fab
|
||||
[
|
||||
"airflow",
|
||||
"providers",
|
||||
"fab",
|
||||
"auth_manager",
|
||||
"fab_auth_manager",
|
||||
"is_authorized_dataset",
|
||||
] => Replacement::AutoImport {
|
||||
module: "airflow.providers.fab.auth_manager.fab_auth_manager",
|
||||
name: "is_authorized_asset",
|
||||
},
|
||||
|
||||
// airflow.providers.google
|
||||
// airflow.providers.google.datasets
|
||||
["airflow", "providers", "google", "datasets", rest @ ..] => match &rest {
|
||||
|
@ -1016,13 +995,16 @@ fn check_name(checker: &Checker, expr: &Expr, range: TextRange) {
|
|||
if is_guarded_by_try_except(expr, module, name, semantic) {
|
||||
return;
|
||||
}
|
||||
|
||||
let import_target = name.split('.').next().unwrap_or(name);
|
||||
|
||||
diagnostic.try_set_fix(|| {
|
||||
let (import_edit, binding) = checker.importer().get_or_import_symbol(
|
||||
&ImportRequest::import_from(module, name),
|
||||
let (import_edit, _) = checker.importer().get_or_import_symbol(
|
||||
&ImportRequest::import_from(module, import_target),
|
||||
expr.start(),
|
||||
checker.semantic(),
|
||||
)?;
|
||||
let replacement_edit = Edit::range_replacement(binding, range);
|
||||
let replacement_edit = Edit::range_replacement(name.to_string(), range);
|
||||
Ok(Fix::safe_edits(import_edit, [replacement_edit]))
|
||||
});
|
||||
}
|
||||
|
|
|
@ -248,16 +248,18 @@ fn check_name(checker: &Checker, expr: &Expr, range: TextRange) {
|
|||
}
|
||||
|
||||
// airflow.models.baseoperator
|
||||
["airflow", "models", "baseoperator", rest] => match *rest {
|
||||
"chain" | "chain_linear" | "cross_downstream" => Replacement::SourceModuleMoved {
|
||||
module: "airflow.sdk",
|
||||
name: (*rest).to_string(),
|
||||
},
|
||||
"BaseOperatorLink" => Replacement::AutoImport {
|
||||
module: "airflow.sdk.definitions.baseoperatorlink",
|
||||
name: "BaseOperatorLink",
|
||||
},
|
||||
_ => return,
|
||||
[
|
||||
"airflow",
|
||||
"models",
|
||||
"baseoperator",
|
||||
rest @ ("chain" | "chain_linear" | "cross_downstream"),
|
||||
] => Replacement::SourceModuleMoved {
|
||||
module: "airflow.sdk",
|
||||
name: (*rest).to_string(),
|
||||
},
|
||||
["airflow", "models", "baseoperatorlink", "BaseOperatorLink"] => Replacement::AutoImport {
|
||||
module: "airflow.sdk.definitions.baseoperatorlink",
|
||||
name: "BaseOperatorLink",
|
||||
},
|
||||
// airflow.model..DAG
|
||||
["airflow", "models", .., "DAG"] => Replacement::SourceModuleMoved {
|
||||
|
|
|
@ -1,268 +1,288 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR301_args.py:20:39: AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
AIR301_args.py:21:39: AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
|
|
||||
18 | DAG(dag_id="class_schedule", schedule="@hourly")
|
||||
19 |
|
||||
20 | DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
|
||||
19 | DAG(dag_id="class_schedule", schedule="@hourly")
|
||||
20 |
|
||||
21 | DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
21 |
|
||||
22 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
22 |
|
||||
23 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
|
|
||||
= help: Use `schedule` instead
|
||||
|
||||
ℹ Safe fix
|
||||
17 17 |
|
||||
18 18 | DAG(dag_id="class_schedule", schedule="@hourly")
|
||||
19 19 |
|
||||
20 |-DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
|
||||
20 |+DAG(dag_id="class_schedule_interval", schedule="@hourly")
|
||||
21 21 |
|
||||
22 22 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
23 23 |
|
||||
|
||||
AIR301_args.py:22:31: AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
|
|
||||
20 | DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
|
||||
21 |
|
||||
22 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
| ^^^^^^^^^ AIR301
|
||||
|
|
||||
= help: Use `schedule` instead
|
||||
|
||||
ℹ Safe fix
|
||||
19 19 |
|
||||
20 20 | DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
|
||||
21 21 |
|
||||
22 |-DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
22 |+DAG(dag_id="class_timetable", schedule=NullTimetable())
|
||||
23 23 |
|
||||
18 18 |
|
||||
19 19 | DAG(dag_id="class_schedule", schedule="@hourly")
|
||||
20 20 |
|
||||
21 |-DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
|
||||
21 |+DAG(dag_id="class_schedule_interval", schedule="@hourly")
|
||||
22 22 |
|
||||
23 23 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
24 24 |
|
||||
25 25 | DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
|
||||
AIR301_args.py:25:31: AIR301 [*] `fail_stop` is removed in Airflow 3.0
|
||||
AIR301_args.py:23:31: AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
|
|
||||
25 | DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
21 | DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
|
||||
22 |
|
||||
23 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
| ^^^^^^^^^ AIR301
|
||||
26 |
|
||||
27 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
|
|
||||
= help: Use `schedule` instead
|
||||
|
||||
ℹ Safe fix
|
||||
20 20 |
|
||||
21 21 | DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
|
||||
22 22 |
|
||||
23 |-DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
23 |+DAG(dag_id="class_timetable", schedule=NullTimetable())
|
||||
24 24 |
|
||||
25 25 |
|
||||
26 26 | DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
|
||||
AIR301_args.py:26:31: AIR301 [*] `fail_stop` is removed in Airflow 3.0
|
||||
|
|
||||
26 | DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
| ^^^^^^^^^ AIR301
|
||||
27 |
|
||||
28 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
|
|
||||
= help: Use `fail_fast` instead
|
||||
|
||||
ℹ Safe fix
|
||||
22 22 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
23 23 |
|
||||
23 23 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
24 24 |
|
||||
25 |-DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
25 |+DAG(dag_id="class_fail_stop", fail_fast=True)
|
||||
26 26 |
|
||||
27 27 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
28 28 |
|
||||
25 25 |
|
||||
26 |-DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
26 |+DAG(dag_id="class_fail_stop", fail_fast=True)
|
||||
27 27 |
|
||||
28 28 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
29 29 |
|
||||
|
||||
AIR301_args.py:27:34: AIR301 `default_view` is removed in Airflow 3.0
|
||||
AIR301_args.py:28:34: AIR301 `default_view` is removed in Airflow 3.0
|
||||
|
|
||||
25 | DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
26 |
|
||||
27 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
26 | DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
27 |
|
||||
28 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
28 |
|
||||
29 | DAG(dag_id="class_orientation", orientation="BT")
|
||||
29 |
|
||||
30 | DAG(dag_id="class_orientation", orientation="BT")
|
||||
|
|
||||
|
||||
AIR301_args.py:29:33: AIR301 `orientation` is removed in Airflow 3.0
|
||||
AIR301_args.py:30:33: AIR301 `orientation` is removed in Airflow 3.0
|
||||
|
|
||||
27 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
28 |
|
||||
29 | DAG(dag_id="class_orientation", orientation="BT")
|
||||
28 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
29 |
|
||||
30 | DAG(dag_id="class_orientation", orientation="BT")
|
||||
| ^^^^^^^^^^^ AIR301
|
||||
30 |
|
||||
31 | allow_future_exec_dates_dag = DAG(dag_id="class_allow_future_exec_dates")
|
||||
31 |
|
||||
32 | allow_future_exec_dates_dag = DAG(dag_id="class_allow_future_exec_dates")
|
||||
|
|
||||
|
||||
AIR301_args.py:40:6: AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
AIR301_args.py:41:6: AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
|
|
||||
40 | @dag(schedule_interval="0 * * * *")
|
||||
41 | @dag(schedule_interval="0 * * * *")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
41 | def decorator_schedule_interval():
|
||||
42 | pass
|
||||
42 | def decorator_schedule_interval():
|
||||
43 | pass
|
||||
|
|
||||
= help: Use `schedule` instead
|
||||
|
||||
ℹ Safe fix
|
||||
37 37 | pass
|
||||
38 38 |
|
||||
38 38 | pass
|
||||
39 39 |
|
||||
40 |-@dag(schedule_interval="0 * * * *")
|
||||
40 |+@dag(schedule="0 * * * *")
|
||||
41 41 | def decorator_schedule_interval():
|
||||
42 42 | pass
|
||||
43 43 |
|
||||
40 40 |
|
||||
41 |-@dag(schedule_interval="0 * * * *")
|
||||
41 |+@dag(schedule="0 * * * *")
|
||||
42 42 | def decorator_schedule_interval():
|
||||
43 43 | pass
|
||||
44 44 |
|
||||
|
||||
AIR301_args.py:45:6: AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
AIR301_args.py:46:6: AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
|
|
||||
45 | @dag(timetable=NullTimetable())
|
||||
46 | @dag(timetable=NullTimetable())
|
||||
| ^^^^^^^^^ AIR301
|
||||
46 | def decorator_timetable():
|
||||
47 | pass
|
||||
47 | def decorator_timetable():
|
||||
48 | pass
|
||||
|
|
||||
= help: Use `schedule` instead
|
||||
|
||||
ℹ Safe fix
|
||||
42 42 | pass
|
||||
43 43 |
|
||||
43 43 | pass
|
||||
44 44 |
|
||||
45 |-@dag(timetable=NullTimetable())
|
||||
45 |+@dag(schedule=NullTimetable())
|
||||
46 46 | def decorator_timetable():
|
||||
47 47 | pass
|
||||
48 48 |
|
||||
45 45 |
|
||||
46 |-@dag(timetable=NullTimetable())
|
||||
46 |+@dag(schedule=NullTimetable())
|
||||
47 47 | def decorator_timetable():
|
||||
48 48 | pass
|
||||
49 49 |
|
||||
|
||||
AIR301_args.py:53:39: AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
AIR301_args.py:54:62: AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
|
|
||||
51 | def decorator_deprecated_operator_args():
|
||||
52 | trigger_dagrun_op = trigger_dagrun.TriggerDagRunOperator(
|
||||
53 | task_id="trigger_dagrun_op1", execution_date="2024-12-04"
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
54 | )
|
||||
55 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
52 | def decorator_deprecated_operator_args():
|
||||
53 | trigger_dagrun_op = trigger_dagrun.TriggerDagRunOperator(
|
||||
54 | task_id="trigger_dagrun_op1", trigger_dag_id="test", execution_date="2024-12-04"
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
55 | )
|
||||
56 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
|
|
||||
= help: Use `logical_date` instead
|
||||
|
||||
ℹ Safe fix
|
||||
50 50 | @dag()
|
||||
51 51 | def decorator_deprecated_operator_args():
|
||||
52 52 | trigger_dagrun_op = trigger_dagrun.TriggerDagRunOperator(
|
||||
53 |- task_id="trigger_dagrun_op1", execution_date="2024-12-04"
|
||||
53 |+ task_id="trigger_dagrun_op1", logical_date="2024-12-04"
|
||||
54 54 | )
|
||||
55 55 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
56 56 | task_id="trigger_dagrun_op2", execution_date="2024-12-04"
|
||||
51 51 | @dag()
|
||||
52 52 | def decorator_deprecated_operator_args():
|
||||
53 53 | trigger_dagrun_op = trigger_dagrun.TriggerDagRunOperator(
|
||||
54 |- task_id="trigger_dagrun_op1", trigger_dag_id="test", execution_date="2024-12-04"
|
||||
54 |+ task_id="trigger_dagrun_op1", trigger_dag_id="test", logical_date="2024-12-04"
|
||||
55 55 | )
|
||||
56 56 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
57 57 | task_id="trigger_dagrun_op2", trigger_dag_id="test", execution_date="2024-12-04"
|
||||
|
||||
AIR301_args.py:56:39: AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
AIR301_args.py:57:62: AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
|
|
||||
54 | )
|
||||
55 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
56 | task_id="trigger_dagrun_op2", execution_date="2024-12-04"
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
57 | )
|
||||
55 | )
|
||||
56 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
57 | task_id="trigger_dagrun_op2", trigger_dag_id="test", execution_date="2024-12-04"
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
58 | )
|
||||
|
|
||||
= help: Use `logical_date` instead
|
||||
|
||||
ℹ Safe fix
|
||||
53 53 | task_id="trigger_dagrun_op1", execution_date="2024-12-04"
|
||||
54 54 | )
|
||||
55 55 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
56 |- task_id="trigger_dagrun_op2", execution_date="2024-12-04"
|
||||
56 |+ task_id="trigger_dagrun_op2", logical_date="2024-12-04"
|
||||
57 57 | )
|
||||
58 58 |
|
||||
59 59 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
54 54 | task_id="trigger_dagrun_op1", trigger_dag_id="test", execution_date="2024-12-04"
|
||||
55 55 | )
|
||||
56 56 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
57 |- task_id="trigger_dagrun_op2", trigger_dag_id="test", execution_date="2024-12-04"
|
||||
57 |+ task_id="trigger_dagrun_op2", trigger_dag_id="test", logical_date="2024-12-04"
|
||||
58 58 | )
|
||||
59 59 |
|
||||
60 60 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
|
||||
AIR301_args.py:60:33: AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
AIR301_args.py:61:33: AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
|
|
||||
59 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
60 | task_id="branch_dt_op", use_task_execution_day=True, task_concurrency=5
|
||||
60 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
61 | task_id="branch_dt_op", use_task_execution_day=True, task_concurrency=5
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
61 | )
|
||||
62 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
62 | )
|
||||
63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
|
|
||||
= help: Use `use_task_logical_date` instead
|
||||
|
||||
ℹ Safe fix
|
||||
57 57 | )
|
||||
58 58 |
|
||||
59 59 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
60 |- task_id="branch_dt_op", use_task_execution_day=True, task_concurrency=5
|
||||
60 |+ task_id="branch_dt_op", use_task_logical_date=True, task_concurrency=5
|
||||
61 61 | )
|
||||
62 62 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
63 63 | task_id="branch_dt_op2",
|
||||
58 58 | )
|
||||
59 59 |
|
||||
60 60 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
61 |- task_id="branch_dt_op", use_task_execution_day=True, task_concurrency=5
|
||||
61 |+ task_id="branch_dt_op", use_task_logical_date=True, task_concurrency=5
|
||||
62 62 | )
|
||||
63 63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
64 64 | task_id="branch_dt_op2",
|
||||
|
||||
AIR301_args.py:60:62: AIR301 [*] `task_concurrency` is removed in Airflow 3.0
|
||||
AIR301_args.py:61:62: AIR301 [*] `task_concurrency` is removed in Airflow 3.0
|
||||
|
|
||||
59 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
60 | task_id="branch_dt_op", use_task_execution_day=True, task_concurrency=5
|
||||
60 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
61 | task_id="branch_dt_op", use_task_execution_day=True, task_concurrency=5
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
61 | )
|
||||
62 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
62 | )
|
||||
63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
|
|
||||
= help: Use `max_active_tis_per_dag` instead
|
||||
|
||||
ℹ Safe fix
|
||||
57 57 | )
|
||||
58 58 |
|
||||
59 59 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
60 |- task_id="branch_dt_op", use_task_execution_day=True, task_concurrency=5
|
||||
60 |+ task_id="branch_dt_op", use_task_execution_day=True, max_active_tis_per_dag=5
|
||||
61 61 | )
|
||||
62 62 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
63 63 | task_id="branch_dt_op2",
|
||||
58 58 | )
|
||||
59 59 |
|
||||
60 60 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
61 |- task_id="branch_dt_op", use_task_execution_day=True, task_concurrency=5
|
||||
61 |+ task_id="branch_dt_op", use_task_execution_day=True, max_active_tis_per_dag=5
|
||||
62 62 | )
|
||||
63 63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
64 64 | task_id="branch_dt_op2",
|
||||
|
||||
AIR301_args.py:64:9: AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
AIR301_args.py:65:9: AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
|
|
||||
62 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
63 | task_id="branch_dt_op2",
|
||||
64 | use_task_execution_day=True,
|
||||
63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
64 | task_id="branch_dt_op2",
|
||||
65 | use_task_execution_day=True,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
65 | sla=timedelta(seconds=10),
|
||||
66 | )
|
||||
66 | sla=timedelta(seconds=10),
|
||||
67 | )
|
||||
|
|
||||
= help: Use `use_task_logical_date` instead
|
||||
|
||||
ℹ Safe fix
|
||||
61 61 | )
|
||||
62 62 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
63 63 | task_id="branch_dt_op2",
|
||||
64 |- use_task_execution_day=True,
|
||||
64 |+ use_task_logical_date=True,
|
||||
65 65 | sla=timedelta(seconds=10),
|
||||
66 66 | )
|
||||
67 67 |
|
||||
62 62 | )
|
||||
63 63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
64 64 | task_id="branch_dt_op2",
|
||||
65 |- use_task_execution_day=True,
|
||||
65 |+ use_task_logical_date=True,
|
||||
66 66 | sla=timedelta(seconds=10),
|
||||
67 67 | )
|
||||
68 68 |
|
||||
|
||||
AIR301_args.py:87:15: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
AIR301_args.py:92:9: AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
|
|
||||
86 | # deprecated filename_template argument in FileTaskHandler
|
||||
87 | S3TaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
88 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
89 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
90 | follow_task_ids_if_true=None,
|
||||
91 | week_day=1,
|
||||
92 | use_task_execution_day=True,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
93 | )
|
||||
|
|
||||
= help: Use `use_task_logical_date` instead
|
||||
|
||||
AIR301_args.py:88:17: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
|
|
||||
86 | # deprecated filename_template argument in FileTaskHandler
|
||||
87 | S3TaskHandler(filename_template="/tmp/test")
|
||||
88 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
89 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
90 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
|
|
||||
ℹ Safe fix
|
||||
89 89 | follow_task_ids_if_false=None,
|
||||
90 90 | follow_task_ids_if_true=None,
|
||||
91 91 | week_day=1,
|
||||
92 |- use_task_execution_day=True,
|
||||
92 |+ use_task_logical_date=True,
|
||||
93 93 | )
|
||||
94 94 |
|
||||
95 95 | trigger_dagrun_op >> trigger_dagrun_op2
|
||||
|
||||
AIR301_args.py:89:26: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
|
|
||||
87 | S3TaskHandler(filename_template="/tmp/test")
|
||||
88 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
89 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
90 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
|
|
||||
AIR301_args.py:102:15: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
|
|
||||
101 | # deprecated filename_template argument in FileTaskHandler
|
||||
102 | S3TaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
103 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
104 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
|
|
||||
|
||||
AIR301_args.py:90:16: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
|
|
||||
88 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
89 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
90 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
91 |
|
||||
92 | FabAuthManager(None)
|
||||
|
|
||||
AIR301_args.py:103:17: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
|
|
||||
101 | # deprecated filename_template argument in FileTaskHandler
|
||||
102 | S3TaskHandler(filename_template="/tmp/test")
|
||||
103 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
104 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
105 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
|
|
||||
|
||||
AIR301_args.py:92:15: AIR301 `appbuilder` is removed in Airflow 3.0
|
||||
|
|
||||
90 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
91 |
|
||||
92 | FabAuthManager(None)
|
||||
| ^^^^^^ AIR301
|
||||
|
|
||||
= help: The constructor takes no parameter now
|
||||
AIR301_args.py:104:26: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
|
|
||||
102 | S3TaskHandler(filename_template="/tmp/test")
|
||||
103 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
104 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
105 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
|
|
||||
|
||||
AIR301_args.py:105:16: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
|
|
||||
103 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
104 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
105 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
106 |
|
||||
107 | FabAuthManager(None)
|
||||
|
|
||||
|
||||
AIR301_args.py:107:15: AIR301 `appbuilder` is removed in Airflow 3.0
|
||||
|
|
||||
105 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
106 |
|
||||
107 | FabAuthManager(None)
|
||||
| ^^^^^^ AIR301
|
||||
|
|
||||
= help: The constructor takes no parameter now
|
||||
|
|
|
@ -310,7 +310,7 @@ AIR301_class_attribute.py:50:11: AIR301 [*] `airflow.lineage.hook.DatasetLineage
|
|||
11 11 | from airflow.datasets.manager import DatasetManager
|
||||
12 |-from airflow.lineage.hook import DatasetLineageInfo, HookLineageCollector
|
||||
12 |+from airflow.lineage.hook import DatasetLineageInfo, HookLineageCollector, AssetLineageInfo
|
||||
13 13 | from airflow.providers.amazon.auth_manager.aws_auth_manager import AwsAuthManager
|
||||
13 13 | from airflow.providers.amazon.aws.auth_manager.aws_auth_manager import AwsAuthManager
|
||||
14 14 | from airflow.providers.apache.beam.hooks import BeamHook, NotAir302HookError
|
||||
15 15 | from airflow.providers.google.cloud.secrets.secret_manager import (
|
||||
--------------------------------------------------------------------------------
|
||||
|
@ -529,142 +529,142 @@ AIR301_class_attribute.py:79:15: AIR301 [*] `get_connections` is removed in Airf
|
|||
81 81 | not_an_error = NotAir302SecretError()
|
||||
82 82 | not_an_error.get_conn_uri()
|
||||
|
||||
AIR301_class_attribute.py:86:4: AIR301 [*] `initialize_providers_dataset_uri_resources` is removed in Airflow 3.0
|
||||
|
|
||||
84 | # airflow.providers_manager
|
||||
85 | pm = ProvidersManager()
|
||||
86 | pm.initialize_providers_dataset_uri_resources()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
87 | pm.dataset_factories
|
||||
88 | pm.dataset_uri_handlers
|
||||
|
|
||||
= help: Use `initialize_providers_asset_uri_resources` instead
|
||||
|
||||
ℹ Safe fix
|
||||
83 83 |
|
||||
84 84 | # airflow.providers_manager
|
||||
85 85 | pm = ProvidersManager()
|
||||
86 |-pm.initialize_providers_dataset_uri_resources()
|
||||
86 |+pm.initialize_providers_asset_uri_resources()
|
||||
87 87 | pm.dataset_factories
|
||||
88 88 | pm.dataset_uri_handlers
|
||||
89 89 | pm.dataset_to_openlineage_converters
|
||||
|
||||
AIR301_class_attribute.py:87:4: AIR301 [*] `dataset_factories` is removed in Airflow 3.0
|
||||
|
|
||||
85 | pm = ProvidersManager()
|
||||
86 | pm.initialize_providers_asset_uri_resources()
|
||||
86 | pm.initialize_providers_dataset_uri_resources()
|
||||
87 | pm.dataset_factories
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
88 | pm.dataset_factories
|
||||
89 | pm.dataset_uri_handlers
|
||||
88 | pm.dataset_uri_handlers
|
||||
89 | pm.dataset_to_openlineage_converters
|
||||
|
|
||||
= help: Use `asset_factories` instead
|
||||
|
||||
ℹ Safe fix
|
||||
84 84 | # airflow.providers_manager
|
||||
85 85 | pm = ProvidersManager()
|
||||
86 86 | pm.initialize_providers_asset_uri_resources()
|
||||
86 86 | pm.initialize_providers_dataset_uri_resources()
|
||||
87 |-pm.dataset_factories
|
||||
87 |+pm.asset_factories
|
||||
88 88 | pm.dataset_factories
|
||||
89 89 | pm.dataset_uri_handlers
|
||||
90 90 | pm.dataset_to_openlineage_converters
|
||||
88 88 | pm.dataset_uri_handlers
|
||||
89 89 | pm.dataset_to_openlineage_converters
|
||||
90 90 |
|
||||
|
||||
AIR301_class_attribute.py:88:4: AIR301 [*] `dataset_factories` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:88:4: AIR301 [*] `dataset_uri_handlers` is removed in Airflow 3.0
|
||||
|
|
||||
86 | pm.initialize_providers_asset_uri_resources()
|
||||
86 | pm.initialize_providers_dataset_uri_resources()
|
||||
87 | pm.dataset_factories
|
||||
88 | pm.dataset_factories
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
89 | pm.dataset_uri_handlers
|
||||
90 | pm.dataset_to_openlineage_converters
|
||||
|
|
||||
= help: Use `asset_factories` instead
|
||||
|
||||
ℹ Safe fix
|
||||
85 85 | pm = ProvidersManager()
|
||||
86 86 | pm.initialize_providers_asset_uri_resources()
|
||||
87 87 | pm.dataset_factories
|
||||
88 |-pm.dataset_factories
|
||||
88 |+pm.asset_factories
|
||||
89 89 | pm.dataset_uri_handlers
|
||||
90 90 | pm.dataset_to_openlineage_converters
|
||||
91 91 |
|
||||
|
||||
AIR301_class_attribute.py:89:4: AIR301 [*] `dataset_uri_handlers` is removed in Airflow 3.0
|
||||
|
|
||||
87 | pm.dataset_factories
|
||||
88 | pm.dataset_factories
|
||||
89 | pm.dataset_uri_handlers
|
||||
88 | pm.dataset_uri_handlers
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
90 | pm.dataset_to_openlineage_converters
|
||||
89 | pm.dataset_to_openlineage_converters
|
||||
|
|
||||
= help: Use `asset_uri_handlers` instead
|
||||
|
||||
ℹ Safe fix
|
||||
86 86 | pm.initialize_providers_asset_uri_resources()
|
||||
85 85 | pm = ProvidersManager()
|
||||
86 86 | pm.initialize_providers_dataset_uri_resources()
|
||||
87 87 | pm.dataset_factories
|
||||
88 88 | pm.dataset_factories
|
||||
89 |-pm.dataset_uri_handlers
|
||||
89 |+pm.asset_uri_handlers
|
||||
90 90 | pm.dataset_to_openlineage_converters
|
||||
91 91 |
|
||||
92 92 | # airflow.secrets.base_secrets
|
||||
88 |-pm.dataset_uri_handlers
|
||||
88 |+pm.asset_uri_handlers
|
||||
89 89 | pm.dataset_to_openlineage_converters
|
||||
90 90 |
|
||||
91 91 | # airflow.secrets.base_secrets
|
||||
|
||||
AIR301_class_attribute.py:90:4: AIR301 [*] `dataset_to_openlineage_converters` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:89:4: AIR301 [*] `dataset_to_openlineage_converters` is removed in Airflow 3.0
|
||||
|
|
||||
88 | pm.dataset_factories
|
||||
89 | pm.dataset_uri_handlers
|
||||
90 | pm.dataset_to_openlineage_converters
|
||||
87 | pm.dataset_factories
|
||||
88 | pm.dataset_uri_handlers
|
||||
89 | pm.dataset_to_openlineage_converters
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
91 |
|
||||
92 | # airflow.secrets.base_secrets
|
||||
90 |
|
||||
91 | # airflow.secrets.base_secrets
|
||||
|
|
||||
= help: Use `asset_to_openlineage_converters` instead
|
||||
|
||||
ℹ Safe fix
|
||||
86 86 | pm.initialize_providers_dataset_uri_resources()
|
||||
87 87 | pm.dataset_factories
|
||||
88 88 | pm.dataset_factories
|
||||
89 89 | pm.dataset_uri_handlers
|
||||
90 |-pm.dataset_to_openlineage_converters
|
||||
90 |+pm.asset_to_openlineage_converters
|
||||
91 91 |
|
||||
92 92 | # airflow.secrets.base_secrets
|
||||
93 93 | base_secret_backend = BaseSecretsBackend()
|
||||
88 88 | pm.dataset_uri_handlers
|
||||
89 |-pm.dataset_to_openlineage_converters
|
||||
89 |+pm.asset_to_openlineage_converters
|
||||
90 90 |
|
||||
91 91 | # airflow.secrets.base_secrets
|
||||
92 92 | base_secret_backend = BaseSecretsBackend()
|
||||
|
||||
AIR301_class_attribute.py:94:21: AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:93:21: AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
|
|
||||
92 | # airflow.secrets.base_secrets
|
||||
93 | base_secret_backend = BaseSecretsBackend()
|
||||
94 | base_secret_backend.get_conn_uri()
|
||||
91 | # airflow.secrets.base_secrets
|
||||
92 | base_secret_backend = BaseSecretsBackend()
|
||||
93 | base_secret_backend.get_conn_uri()
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
95 | base_secret_backend.get_connections()
|
||||
94 | base_secret_backend.get_connections()
|
||||
|
|
||||
= help: Use `get_conn_value` instead
|
||||
|
||||
ℹ Safe fix
|
||||
91 91 |
|
||||
92 92 | # airflow.secrets.base_secrets
|
||||
93 93 | base_secret_backend = BaseSecretsBackend()
|
||||
94 |-base_secret_backend.get_conn_uri()
|
||||
94 |+base_secret_backend.get_conn_value()
|
||||
95 95 | base_secret_backend.get_connections()
|
||||
96 96 |
|
||||
97 97 | # airflow.secrets.local_filesystem
|
||||
90 90 |
|
||||
91 91 | # airflow.secrets.base_secrets
|
||||
92 92 | base_secret_backend = BaseSecretsBackend()
|
||||
93 |-base_secret_backend.get_conn_uri()
|
||||
93 |+base_secret_backend.get_conn_value()
|
||||
94 94 | base_secret_backend.get_connections()
|
||||
95 95 |
|
||||
96 96 | # airflow.secrets.local_filesystem
|
||||
|
||||
AIR301_class_attribute.py:95:21: AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:94:21: AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
|
|
||||
93 | base_secret_backend = BaseSecretsBackend()
|
||||
94 | base_secret_backend.get_conn_uri()
|
||||
95 | base_secret_backend.get_connections()
|
||||
92 | base_secret_backend = BaseSecretsBackend()
|
||||
93 | base_secret_backend.get_conn_uri()
|
||||
94 | base_secret_backend.get_connections()
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
96 |
|
||||
97 | # airflow.secrets.local_filesystem
|
||||
95 |
|
||||
96 | # airflow.secrets.local_filesystem
|
||||
|
|
||||
= help: Use `get_connection` instead
|
||||
|
||||
ℹ Safe fix
|
||||
92 92 | # airflow.secrets.base_secrets
|
||||
93 93 | base_secret_backend = BaseSecretsBackend()
|
||||
94 94 | base_secret_backend.get_conn_uri()
|
||||
95 |-base_secret_backend.get_connections()
|
||||
95 |+base_secret_backend.get_connection()
|
||||
96 96 |
|
||||
97 97 | # airflow.secrets.local_filesystem
|
||||
98 98 | lfb = LocalFilesystemBackend()
|
||||
91 91 | # airflow.secrets.base_secrets
|
||||
92 92 | base_secret_backend = BaseSecretsBackend()
|
||||
93 93 | base_secret_backend.get_conn_uri()
|
||||
94 |-base_secret_backend.get_connections()
|
||||
94 |+base_secret_backend.get_connection()
|
||||
95 95 |
|
||||
96 96 | # airflow.secrets.local_filesystem
|
||||
97 97 | lfb = LocalFilesystemBackend()
|
||||
|
||||
AIR301_class_attribute.py:99:5: AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:98:5: AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
|
|
||||
97 | # airflow.secrets.local_filesystem
|
||||
98 | lfb = LocalFilesystemBackend()
|
||||
99 | lfb.get_connections()
|
||||
96 | # airflow.secrets.local_filesystem
|
||||
97 | lfb = LocalFilesystemBackend()
|
||||
98 | lfb.get_connections()
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
|
|
||||
= help: Use `get_connection` instead
|
||||
|
||||
ℹ Safe fix
|
||||
96 96 |
|
||||
97 97 | # airflow.secrets.local_filesystem
|
||||
98 98 | lfb = LocalFilesystemBackend()
|
||||
99 |-lfb.get_connections()
|
||||
99 |+lfb.get_connection()
|
||||
95 95 |
|
||||
96 96 | # airflow.secrets.local_filesystem
|
||||
97 97 | lfb = LocalFilesystemBackend()
|
||||
98 |-lfb.get_connections()
|
||||
98 |+lfb.get_connection()
|
||||
|
|
|
@ -77,9 +77,9 @@ AIR301_names.py:56:1: AIR301 `airflow.api_connexion.security.requires_access` is
|
|||
56 | requires_access
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
|
|
||||
= help: Use `airflow.api_connexion.security.requires_access_*` instead
|
||||
= help: Use `airflow.api_fastapi.core_api.security.requires_access_*` instead
|
||||
|
||||
AIR301_names.py:60:1: AIR301 `airflow.configuration.get` is removed in Airflow 3.0
|
||||
AIR301_names.py:60:1: AIR301 [*] `airflow.configuration.get` is removed in Airflow 3.0
|
||||
|
|
||||
59 | # airflow.configuration
|
||||
60 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
|
@ -87,7 +87,25 @@ AIR301_names.py:60:1: AIR301 `airflow.configuration.get` is removed in Airflow 3
|
|||
|
|
||||
= help: Use `airflow.configuration.conf.get` instead
|
||||
|
||||
AIR301_names.py:60:6: AIR301 `airflow.configuration.getboolean` is removed in Airflow 3.0
|
||||
ℹ Safe fix
|
||||
19 19 | has_option,
|
||||
20 20 | remove_option,
|
||||
21 21 | set,
|
||||
22 |+conf,
|
||||
22 23 | )
|
||||
23 24 | from airflow.contrib.aws_athena_hook import AWSAthenaHook
|
||||
24 25 | from airflow.datasets import DatasetAliasEvent
|
||||
--------------------------------------------------------------------------------
|
||||
57 58 |
|
||||
58 59 |
|
||||
59 60 | # airflow.configuration
|
||||
60 |-get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
61 |+conf.get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
61 62 |
|
||||
62 63 |
|
||||
63 64 | # airflow.contrib.*
|
||||
|
||||
AIR301_names.py:60:6: AIR301 [*] `airflow.configuration.getboolean` is removed in Airflow 3.0
|
||||
|
|
||||
59 | # airflow.configuration
|
||||
60 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
|
@ -95,7 +113,25 @@ AIR301_names.py:60:6: AIR301 `airflow.configuration.getboolean` is removed in Ai
|
|||
|
|
||||
= help: Use `airflow.configuration.conf.getboolean` instead
|
||||
|
||||
AIR301_names.py:60:18: AIR301 `airflow.configuration.getfloat` is removed in Airflow 3.0
|
||||
ℹ Safe fix
|
||||
19 19 | has_option,
|
||||
20 20 | remove_option,
|
||||
21 21 | set,
|
||||
22 |+conf,
|
||||
22 23 | )
|
||||
23 24 | from airflow.contrib.aws_athena_hook import AWSAthenaHook
|
||||
24 25 | from airflow.datasets import DatasetAliasEvent
|
||||
--------------------------------------------------------------------------------
|
||||
57 58 |
|
||||
58 59 |
|
||||
59 60 | # airflow.configuration
|
||||
60 |-get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
61 |+get, conf.getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
61 62 |
|
||||
62 63 |
|
||||
63 64 | # airflow.contrib.*
|
||||
|
||||
AIR301_names.py:60:18: AIR301 [*] `airflow.configuration.getfloat` is removed in Airflow 3.0
|
||||
|
|
||||
59 | # airflow.configuration
|
||||
60 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
|
@ -103,7 +139,25 @@ AIR301_names.py:60:18: AIR301 `airflow.configuration.getfloat` is removed in Air
|
|||
|
|
||||
= help: Use `airflow.configuration.conf.getfloat` instead
|
||||
|
||||
AIR301_names.py:60:28: AIR301 `airflow.configuration.getint` is removed in Airflow 3.0
|
||||
ℹ Safe fix
|
||||
19 19 | has_option,
|
||||
20 20 | remove_option,
|
||||
21 21 | set,
|
||||
22 |+conf,
|
||||
22 23 | )
|
||||
23 24 | from airflow.contrib.aws_athena_hook import AWSAthenaHook
|
||||
24 25 | from airflow.datasets import DatasetAliasEvent
|
||||
--------------------------------------------------------------------------------
|
||||
57 58 |
|
||||
58 59 |
|
||||
59 60 | # airflow.configuration
|
||||
60 |-get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
61 |+get, getboolean, conf.getfloat, getint, has_option, remove_option, as_dict, set
|
||||
61 62 |
|
||||
62 63 |
|
||||
63 64 | # airflow.contrib.*
|
||||
|
||||
AIR301_names.py:60:28: AIR301 [*] `airflow.configuration.getint` is removed in Airflow 3.0
|
||||
|
|
||||
59 | # airflow.configuration
|
||||
60 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
|
@ -111,7 +165,25 @@ AIR301_names.py:60:28: AIR301 `airflow.configuration.getint` is removed in Airfl
|
|||
|
|
||||
= help: Use `airflow.configuration.conf.getint` instead
|
||||
|
||||
AIR301_names.py:60:36: AIR301 `airflow.configuration.has_option` is removed in Airflow 3.0
|
||||
ℹ Safe fix
|
||||
19 19 | has_option,
|
||||
20 20 | remove_option,
|
||||
21 21 | set,
|
||||
22 |+conf,
|
||||
22 23 | )
|
||||
23 24 | from airflow.contrib.aws_athena_hook import AWSAthenaHook
|
||||
24 25 | from airflow.datasets import DatasetAliasEvent
|
||||
--------------------------------------------------------------------------------
|
||||
57 58 |
|
||||
58 59 |
|
||||
59 60 | # airflow.configuration
|
||||
60 |-get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
61 |+get, getboolean, getfloat, conf.getint, has_option, remove_option, as_dict, set
|
||||
61 62 |
|
||||
62 63 |
|
||||
63 64 | # airflow.contrib.*
|
||||
|
||||
AIR301_names.py:60:36: AIR301 [*] `airflow.configuration.has_option` is removed in Airflow 3.0
|
||||
|
|
||||
59 | # airflow.configuration
|
||||
60 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
|
@ -119,7 +191,25 @@ AIR301_names.py:60:36: AIR301 `airflow.configuration.has_option` is removed in A
|
|||
|
|
||||
= help: Use `airflow.configuration.conf.has_option` instead
|
||||
|
||||
AIR301_names.py:60:48: AIR301 `airflow.configuration.remove_option` is removed in Airflow 3.0
|
||||
ℹ Safe fix
|
||||
19 19 | has_option,
|
||||
20 20 | remove_option,
|
||||
21 21 | set,
|
||||
22 |+conf,
|
||||
22 23 | )
|
||||
23 24 | from airflow.contrib.aws_athena_hook import AWSAthenaHook
|
||||
24 25 | from airflow.datasets import DatasetAliasEvent
|
||||
--------------------------------------------------------------------------------
|
||||
57 58 |
|
||||
58 59 |
|
||||
59 60 | # airflow.configuration
|
||||
60 |-get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
61 |+get, getboolean, getfloat, getint, conf.has_option, remove_option, as_dict, set
|
||||
61 62 |
|
||||
62 63 |
|
||||
63 64 | # airflow.contrib.*
|
||||
|
||||
AIR301_names.py:60:48: AIR301 [*] `airflow.configuration.remove_option` is removed in Airflow 3.0
|
||||
|
|
||||
59 | # airflow.configuration
|
||||
60 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
|
@ -127,7 +217,25 @@ AIR301_names.py:60:48: AIR301 `airflow.configuration.remove_option` is removed i
|
|||
|
|
||||
= help: Use `airflow.configuration.conf.remove_option` instead
|
||||
|
||||
AIR301_names.py:60:63: AIR301 `airflow.configuration.as_dict` is removed in Airflow 3.0
|
||||
ℹ Safe fix
|
||||
19 19 | has_option,
|
||||
20 20 | remove_option,
|
||||
21 21 | set,
|
||||
22 |+conf,
|
||||
22 23 | )
|
||||
23 24 | from airflow.contrib.aws_athena_hook import AWSAthenaHook
|
||||
24 25 | from airflow.datasets import DatasetAliasEvent
|
||||
--------------------------------------------------------------------------------
|
||||
57 58 |
|
||||
58 59 |
|
||||
59 60 | # airflow.configuration
|
||||
60 |-get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
61 |+get, getboolean, getfloat, getint, has_option, conf.remove_option, as_dict, set
|
||||
61 62 |
|
||||
62 63 |
|
||||
63 64 | # airflow.contrib.*
|
||||
|
||||
AIR301_names.py:60:63: AIR301 [*] `airflow.configuration.as_dict` is removed in Airflow 3.0
|
||||
|
|
||||
59 | # airflow.configuration
|
||||
60 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
|
@ -135,7 +243,25 @@ AIR301_names.py:60:63: AIR301 `airflow.configuration.as_dict` is removed in Airf
|
|||
|
|
||||
= help: Use `airflow.configuration.conf.as_dict` instead
|
||||
|
||||
AIR301_names.py:60:72: AIR301 `airflow.configuration.set` is removed in Airflow 3.0
|
||||
ℹ Safe fix
|
||||
19 19 | has_option,
|
||||
20 20 | remove_option,
|
||||
21 21 | set,
|
||||
22 |+conf,
|
||||
22 23 | )
|
||||
23 24 | from airflow.contrib.aws_athena_hook import AWSAthenaHook
|
||||
24 25 | from airflow.datasets import DatasetAliasEvent
|
||||
--------------------------------------------------------------------------------
|
||||
57 58 |
|
||||
58 59 |
|
||||
59 60 | # airflow.configuration
|
||||
60 |-get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
61 |+get, getboolean, getfloat, getint, has_option, remove_option, conf.as_dict, set
|
||||
61 62 |
|
||||
62 63 |
|
||||
63 64 | # airflow.contrib.*
|
||||
|
||||
AIR301_names.py:60:72: AIR301 [*] `airflow.configuration.set` is removed in Airflow 3.0
|
||||
|
|
||||
59 | # airflow.configuration
|
||||
60 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
|
@ -143,6 +269,24 @@ AIR301_names.py:60:72: AIR301 `airflow.configuration.set` is removed in Airflow
|
|||
|
|
||||
= help: Use `airflow.configuration.conf.set` instead
|
||||
|
||||
ℹ Safe fix
|
||||
19 19 | has_option,
|
||||
20 20 | remove_option,
|
||||
21 21 | set,
|
||||
22 |+conf,
|
||||
22 23 | )
|
||||
23 24 | from airflow.contrib.aws_athena_hook import AWSAthenaHook
|
||||
24 25 | from airflow.datasets import DatasetAliasEvent
|
||||
--------------------------------------------------------------------------------
|
||||
57 58 |
|
||||
58 59 |
|
||||
59 60 | # airflow.configuration
|
||||
60 |-get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
61 |+get, getboolean, getfloat, getint, has_option, remove_option, as_dict, conf.set
|
||||
61 62 |
|
||||
62 63 |
|
||||
63 64 | # airflow.contrib.*
|
||||
|
||||
AIR301_names.py:64:1: AIR301 `airflow.contrib.aws_athena_hook.AWSAthenaHook` is removed in Airflow 3.0
|
||||
|
|
||||
63 | # airflow.contrib.*
|
||||
|
@ -191,20 +335,20 @@ AIR301_names.py:89:1: AIR301 `airflow.triggers.external_task.TaskStateTrigger` i
|
|||
91 | # airflow.utils.date
|
||||
|
|
||||
|
||||
AIR301_names.py:92:7: AIR301 `airflow.utils.dates.date_range` is removed in Airflow 3.0
|
||||
AIR301_names.py:92:1: AIR301 `airflow.utils.dates.date_range` is removed in Airflow 3.0
|
||||
|
|
||||
91 | # airflow.utils.date
|
||||
92 | dates.date_range
|
||||
| ^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
93 | dates.days_ago
|
||||
|
|
||||
|
||||
AIR301_names.py:93:7: AIR301 `airflow.utils.dates.days_ago` is removed in Airflow 3.0
|
||||
AIR301_names.py:93:1: AIR301 `airflow.utils.dates.days_ago` is removed in Airflow 3.0
|
||||
|
|
||||
91 | # airflow.utils.date
|
||||
92 | dates.date_range
|
||||
93 | dates.days_ago
|
||||
| ^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
94 |
|
||||
95 | date_range
|
||||
|
|
||||
|
@ -399,20 +543,20 @@ AIR301_names.py:129:1: AIR301 `airflow.utils.state.terminating_states` is remove
|
|||
131 | # airflow.utils.trigger_rule
|
||||
|
|
||||
|
||||
AIR301_names.py:132:13: AIR301 `airflow.utils.trigger_rule.TriggerRule.DUMMY` is removed in Airflow 3.0
|
||||
AIR301_names.py:132:1: AIR301 `airflow.utils.trigger_rule.TriggerRule.DUMMY` is removed in Airflow 3.0
|
||||
|
|
||||
131 | # airflow.utils.trigger_rule
|
||||
132 | TriggerRule.DUMMY
|
||||
| ^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
133 | TriggerRule.NONE_FAILED_OR_SKIPPED
|
||||
|
|
||||
|
||||
AIR301_names.py:133:13: AIR301 `airflow.utils.trigger_rule.TriggerRule.NONE_FAILED_OR_SKIPPED` is removed in Airflow 3.0
|
||||
AIR301_names.py:133:1: AIR301 `airflow.utils.trigger_rule.TriggerRule.NONE_FAILED_OR_SKIPPED` is removed in Airflow 3.0
|
||||
|
|
||||
131 | # airflow.utils.trigger_rule
|
||||
132 | TriggerRule.DUMMY
|
||||
133 | TriggerRule.NONE_FAILED_OR_SKIPPED
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
|
|
||||
|
||||
AIR301_names.py:137:1: AIR301 `airflow.www.auth.has_access` is removed in Airflow 3.0
|
||||
|
@ -423,7 +567,6 @@ AIR301_names.py:137:1: AIR301 `airflow.www.auth.has_access` is removed in Airflo
|
|||
138 |
|
||||
139 | # airflow.www.utils
|
||||
|
|
||||
= help: Use `airflow.www.auth.has_access_*` instead
|
||||
|
||||
AIR301_names.py:140:1: AIR301 `airflow.www.utils.get_sensitive_variables_fields` is removed in Airflow 3.0
|
||||
|
|
||||
|
@ -432,7 +575,6 @@ AIR301_names.py:140:1: AIR301 `airflow.www.utils.get_sensitive_variables_fields`
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
141 | should_hide_value_for_key
|
||||
|
|
||||
= help: Use `airflow.utils.log.secrets_masker.get_sensitive_variables_fields` instead
|
||||
|
||||
AIR301_names.py:141:1: AIR301 `airflow.www.utils.should_hide_value_for_key` is removed in Airflow 3.0
|
||||
|
|
||||
|
@ -443,7 +585,6 @@ AIR301_names.py:141:1: AIR301 `airflow.www.utils.should_hide_value_for_key` is r
|
|||
142 |
|
||||
143 | # airflow.operators.python
|
||||
|
|
||||
= help: Use `airflow.utils.log.secrets_masker.should_hide_value_for_key` instead
|
||||
|
||||
AIR301_names.py:146:1: AIR301 `airflow.operators.python.get_current_context` is removed in Airflow 3.0
|
||||
|
|
||||
|
@ -484,5 +625,27 @@ AIR301_names.py:161:1: AIR301 `airflow.providers.trino.datasets.trino.sanitize_u
|
|||
160 |
|
||||
161 | sanitize_uri
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
162 |
|
||||
163 | # airflow.notifications.basenotifier
|
||||
|
|
||||
= help: Use `airflow.providers.trino.assets.trino.sanitize_uri` instead
|
||||
|
||||
AIR301_names.py:166:1: AIR301 `airflow.notifications.basenotifier.BaseNotifier` is removed in Airflow 3.0
|
||||
|
|
||||
164 | from airflow.notifications.basenotifier import BaseNotifier
|
||||
165 |
|
||||
166 | BaseNotifier()
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
167 |
|
||||
168 | # airflow.auth.manager
|
||||
|
|
||||
= help: Use `airflow.sdk.bases.notifier.BaseNotifier` instead
|
||||
|
||||
AIR301_names.py:171:1: AIR301 `airflow.auth.managers.base_auth_manager.BaseAuthManager` is removed in Airflow 3.0
|
||||
|
|
||||
169 | from airflow.auth.managers.base_auth_manager import BaseAuthManager
|
||||
170 |
|
||||
171 | BaseAuthManager()
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
|
|
||||
= help: Use `airflow.api_fastapi.auth.managers.base_auth_manager.BaseAuthManager` instead
|
||||
|
|
|
@ -10,25 +10,19 @@ AIR301_names_fix.py:19:1: AIR301 [*] `airflow.api_connexion.security.requires_ac
|
|||
20 |
|
||||
21 | DatasetDetails()
|
||||
|
|
||||
= help: Use `airflow.api_connexion.security.requires_access_asset` instead
|
||||
= help: Use `airflow.api_fastapi.core_api.security.requires_access_asset` instead
|
||||
|
||||
ℹ Safe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 |-from airflow.api_connexion.security import requires_access_dataset
|
||||
3 |+from airflow.api_connexion.security import requires_access_dataset, requires_access_asset
|
||||
4 4 | from airflow.auth.managers.models.resource_details import (
|
||||
5 5 | DatasetDetails,
|
||||
6 6 | is_authorized_dataset,
|
||||
--------------------------------------------------------------------------------
|
||||
15 15 | from airflow.secrets.local_filesystm import load_connections
|
||||
16 16 | from airflow.security.permissions import RESOURCE_DATASET
|
||||
17 17 | from airflow.www.auth import has_access_dataset
|
||||
18 18 |
|
||||
18 |+from airflow.api_fastapi.core_api.security import requires_access_asset
|
||||
18 19 |
|
||||
19 |-requires_access_dataset()
|
||||
19 |+requires_access_asset()
|
||||
20 20 |
|
||||
21 21 | DatasetDetails()
|
||||
22 22 | is_authorized_dataset()
|
||||
20 |+requires_access_asset()
|
||||
20 21 |
|
||||
21 22 | DatasetDetails()
|
||||
22 23 |
|
||||
|
||||
AIR301_names_fix.py:21:1: AIR301 [*] `airflow.auth.managers.models.resource_details.DatasetDetails` is removed in Airflow 3.0
|
||||
|
|
||||
|
@ -36,7 +30,6 @@ AIR301_names_fix.py:21:1: AIR301 [*] `airflow.auth.managers.models.resource_deta
|
|||
20 |
|
||||
21 | DatasetDetails()
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
22 | is_authorized_dataset()
|
||||
|
|
||||
= help: Use `airflow.api_fastapi.auth.managers.models.resource_details.AssetDetails` instead
|
||||
|
||||
|
@ -50,14 +43,12 @@ AIR301_names_fix.py:21:1: AIR301 [*] `airflow.auth.managers.models.resource_deta
|
|||
20 21 |
|
||||
21 |-DatasetDetails()
|
||||
22 |+AssetDetails()
|
||||
22 23 | is_authorized_dataset()
|
||||
22 23 |
|
||||
23 24 |
|
||||
24 25 | DatasetManager()
|
||||
|
||||
AIR301_names_fix.py:24:1: AIR301 [*] `airflow.datasets.manager.DatasetManager` is removed in Airflow 3.0
|
||||
|
|
||||
22 | is_authorized_dataset()
|
||||
23 |
|
||||
24 | DatasetManager()
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
25 | dataset_manager()
|
||||
|
@ -74,7 +65,7 @@ AIR301_names_fix.py:24:1: AIR301 [*] `airflow.datasets.manager.DatasetManager` i
|
|||
19 20 | requires_access_dataset()
|
||||
20 21 |
|
||||
21 22 | DatasetDetails()
|
||||
22 23 | is_authorized_dataset()
|
||||
22 23 |
|
||||
23 24 |
|
||||
24 |-DatasetManager()
|
||||
25 |+AssetManager()
|
||||
|
@ -100,7 +91,7 @@ AIR301_names_fix.py:25:1: AIR301 [*] `airflow.datasets.manager.dataset_manager`
|
|||
19 20 | requires_access_dataset()
|
||||
20 21 |
|
||||
--------------------------------------------------------------------------------
|
||||
22 23 | is_authorized_dataset()
|
||||
22 23 |
|
||||
23 24 |
|
||||
24 25 | DatasetManager()
|
||||
25 |-dataset_manager()
|
||||
|
@ -256,7 +247,7 @@ AIR301_names_fix.py:35:1: AIR301 [*] `airflow.security.permissions.RESOURCE_DATA
|
|||
37 37 | has_access_dataset()
|
||||
38 38 |
|
||||
|
||||
AIR301_names_fix.py:37:1: AIR301 [*] `airflow.www.auth.has_access_dataset` is removed in Airflow 3.0
|
||||
AIR301_names_fix.py:37:1: AIR301 `airflow.www.auth.has_access_dataset` is removed in Airflow 3.0
|
||||
|
|
||||
35 | RESOURCE_DATASET
|
||||
36 |
|
||||
|
@ -265,26 +256,6 @@ AIR301_names_fix.py:37:1: AIR301 [*] `airflow.www.auth.has_access_dataset` is re
|
|||
38 |
|
||||
39 | from airflow.listeners.spec.dataset import (
|
||||
|
|
||||
= help: Use `airflow.www.auth.has_access_asset` instead
|
||||
|
||||
ℹ Safe fix
|
||||
14 14 | from airflow.metrics.validators import AllowListValidator, BlockListValidator
|
||||
15 15 | from airflow.secrets.local_filesystm import load_connections
|
||||
16 16 | from airflow.security.permissions import RESOURCE_DATASET
|
||||
17 |-from airflow.www.auth import has_access_dataset
|
||||
17 |+from airflow.www.auth import has_access_dataset, has_access_asset
|
||||
18 18 |
|
||||
19 19 | requires_access_dataset()
|
||||
20 20 |
|
||||
--------------------------------------------------------------------------------
|
||||
34 34 |
|
||||
35 35 | RESOURCE_DATASET
|
||||
36 36 |
|
||||
37 |-has_access_dataset()
|
||||
37 |+has_access_asset()
|
||||
38 38 |
|
||||
39 39 | from airflow.listeners.spec.dataset import (
|
||||
40 40 | on_dataset_changed,
|
||||
|
||||
AIR301_names_fix.py:44:1: AIR301 [*] `airflow.listeners.spec.dataset.on_dataset_created` is removed in Airflow 3.0
|
||||
|
|
||||
|
|
|
@ -5,34 +5,26 @@ AIR301_provider_names_fix.py:25:1: AIR301 [*] `airflow.providers.amazon.aws.auth
|
|||
|
|
||||
23 | )
|
||||
24 |
|
||||
25 | DATASET
|
||||
| ^^^^^^^ AIR301
|
||||
25 | AvpEntities.DATASET
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
26 |
|
||||
27 | s3_create_dataset()
|
||||
|
|
||||
= help: Use `airflow.providers.amazon.aws.auth_manager.avp.entities.AvpEntities.ASSET` instead
|
||||
|
||||
ℹ Safe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 |-from airflow.providers.amazon.aws.auth_manager.avp.entities.AvpEntities import DATASET
|
||||
3 |+from airflow.providers.amazon.aws.auth_manager.avp.entities.AvpEntities import DATASET, ASSET
|
||||
4 4 | from airflow.providers.amazon.aws.datasets.s3 import (
|
||||
5 5 | convert_dataset_to_openlineage as s3_convert_dataset_to_openlineage,
|
||||
6 6 | )
|
||||
--------------------------------------------------------------------------------
|
||||
22 22 | translate_airflow_dataset,
|
||||
23 23 | )
|
||||
24 24 |
|
||||
25 |-DATASET
|
||||
25 |+ASSET
|
||||
25 |-AvpEntities.DATASET
|
||||
25 |+AvpEntities.ASSET
|
||||
26 26 |
|
||||
27 27 | s3_create_dataset()
|
||||
28 28 | s3_convert_dataset_to_openlineage()
|
||||
|
||||
AIR301_provider_names_fix.py:27:1: AIR301 [*] `airflow.providers.amazon.aws.datasets.s3.create_dataset` is removed in Airflow 3.0
|
||||
|
|
||||
25 | DATASET
|
||||
25 | AvpEntities.DATASET
|
||||
26 |
|
||||
27 | s3_create_dataset()
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
|
@ -46,7 +38,7 @@ AIR301_provider_names_fix.py:27:1: AIR301 [*] `airflow.providers.amazon.aws.data
|
|||
23 23 | )
|
||||
24 |+from airflow.providers.amazon.aws.assets.s3 import create_asset
|
||||
24 25 |
|
||||
25 26 | DATASET
|
||||
25 26 | AvpEntities.DATASET
|
||||
26 27 |
|
||||
27 |-s3_create_dataset()
|
||||
28 |+create_asset()
|
||||
|
@ -70,7 +62,7 @@ AIR301_provider_names_fix.py:28:1: AIR301 [*] `airflow.providers.amazon.aws.data
|
|||
23 23 | )
|
||||
24 |+from airflow.providers.amazon.aws.assets.s3 import convert_asset_to_openlineage
|
||||
24 25 |
|
||||
25 26 | DATASET
|
||||
25 26 | AvpEntities.DATASET
|
||||
26 27 |
|
||||
27 28 | s3_create_dataset()
|
||||
28 |-s3_convert_dataset_to_openlineage()
|
||||
|
@ -79,36 +71,6 @@ AIR301_provider_names_fix.py:28:1: AIR301 [*] `airflow.providers.amazon.aws.data
|
|||
30 31 | io_create_dataset()
|
||||
31 32 | io_convert_dataset_to_openlineage()
|
||||
|
||||
AIR301_provider_names_fix.py:33:1: AIR301 [*] `airflow.providers.fab.auth_manager.fab_auth_manager.is_authorized_dataset` is removed in Airflow 3.0
|
||||
|
|
||||
31 | io_convert_dataset_to_openlineage()
|
||||
32 |
|
||||
33 | fab_is_authorized_dataset()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
34 |
|
||||
35 | # airflow.providers.google.datasets.bigquery
|
||||
|
|
||||
= help: Use `airflow.providers.fab.auth_manager.fab_auth_manager.is_authorized_asset` instead
|
||||
|
||||
ℹ Safe fix
|
||||
9 9 | convert_dataset_to_openlineage as io_convert_dataset_to_openlineage,
|
||||
10 10 | )
|
||||
11 11 | from airflow.providers.common.io.dataset.file import create_dataset as io_create_dataset
|
||||
12 |-from airflow.providers.fab.auth_manager.fab_auth_manager import is_authorized_dataset as fab_is_authorized_dataset
|
||||
12 |+from airflow.providers.fab.auth_manager.fab_auth_manager import is_authorized_dataset as fab_is_authorized_dataset, is_authorized_asset
|
||||
13 13 | from airflow.providers.google.datasets.bigquery import (
|
||||
14 14 | create_dataset as bigquery_create_dataset,
|
||||
15 15 | )
|
||||
--------------------------------------------------------------------------------
|
||||
30 30 | io_create_dataset()
|
||||
31 31 | io_convert_dataset_to_openlineage()
|
||||
32 32 |
|
||||
33 |-fab_is_authorized_dataset()
|
||||
33 |+is_authorized_asset()
|
||||
34 34 |
|
||||
35 35 | # airflow.providers.google.datasets.bigquery
|
||||
36 36 | bigquery_create_dataset()
|
||||
|
||||
AIR301_provider_names_fix.py:36:1: AIR301 [*] `airflow.providers.google.datasets.bigquery.create_dataset` is removed in Airflow 3.0
|
||||
|
|
||||
35 | # airflow.providers.google.datasets.bigquery
|
||||
|
@ -125,10 +87,10 @@ AIR301_provider_names_fix.py:36:1: AIR301 [*] `airflow.providers.google.datasets
|
|||
23 23 | )
|
||||
24 |+from airflow.providers.google.assets.bigquery import create_asset
|
||||
24 25 |
|
||||
25 26 | DATASET
|
||||
25 26 | AvpEntities.DATASET
|
||||
26 27 |
|
||||
--------------------------------------------------------------------------------
|
||||
33 34 | fab_is_authorized_dataset()
|
||||
33 34 |
|
||||
34 35 |
|
||||
35 36 | # airflow.providers.google.datasets.bigquery
|
||||
36 |-bigquery_create_dataset()
|
||||
|
@ -154,7 +116,7 @@ AIR301_provider_names_fix.py:38:1: AIR301 [*] `airflow.providers.google.datasets
|
|||
23 23 | )
|
||||
24 |+from airflow.providers.google.assets.gcs import create_asset
|
||||
24 25 |
|
||||
25 26 | DATASET
|
||||
25 26 | AvpEntities.DATASET
|
||||
26 27 |
|
||||
--------------------------------------------------------------------------------
|
||||
35 36 | # airflow.providers.google.datasets.bigquery
|
||||
|
@ -183,7 +145,7 @@ AIR301_provider_names_fix.py:39:1: AIR301 [*] `airflow.providers.google.datasets
|
|||
23 23 | )
|
||||
24 |+from airflow.providers.google.assets.gcs import convert_asset_to_openlineage
|
||||
24 25 |
|
||||
25 26 | DATASET
|
||||
25 26 | AvpEntities.DATASET
|
||||
26 27 |
|
||||
--------------------------------------------------------------------------------
|
||||
36 37 | bigquery_create_dataset()
|
||||
|
@ -213,7 +175,7 @@ AIR301_provider_names_fix.py:41:1: AIR301 [*] `airflow.providers.openlineage.uti
|
|||
23 |+AssetInfo,
|
||||
23 24 | )
|
||||
24 25 |
|
||||
25 26 | DATASET
|
||||
25 26 | AvpEntities.DATASET
|
||||
--------------------------------------------------------------------------------
|
||||
38 39 | gcs_create_dataset()
|
||||
39 40 | gcs_convert_dataset_to_openlineage()
|
||||
|
@ -242,7 +204,7 @@ AIR301_provider_names_fix.py:42:1: AIR301 [*] `airflow.providers.openlineage.uti
|
|||
23 |+translate_airflow_asset,
|
||||
23 24 | )
|
||||
24 25 |
|
||||
25 26 | DATASET
|
||||
25 26 | AvpEntities.DATASET
|
||||
--------------------------------------------------------------------------------
|
||||
39 40 | gcs_convert_dataset_to_openlineage()
|
||||
40 41 | # airflow.providers.openlineage.utils.utils
|
||||
|
|
|
@ -328,6 +328,16 @@ AIR311_names.py:56:1: AIR311 `airflow.models.baseoperator.cross_downstream` is r
|
|||
|
|
||||
= help: Use `airflow.sdk.cross_downstream` instead
|
||||
|
||||
AIR311_names.py:59:1: AIR311 `airflow.models.baseoperatorlink.BaseOperatorLink` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
|
|
||||
58 | # airflow.models.baseoperatolinker
|
||||
59 | BaseOperatorLink()
|
||||
| ^^^^^^^^^^^^^^^^ AIR311
|
||||
60 |
|
||||
61 | # airflow.models.dag
|
||||
|
|
||||
= help: Use `airflow.sdk.definitions.baseoperatorlink.BaseOperatorLink` instead
|
||||
|
||||
AIR311_names.py:62:1: AIR311 [*] `airflow.models.dag.DAG` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
|
|
||||
61 | # airflow.models.dag
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue