mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:15:12 +00:00
[airflow
] Move AIR302
to AIR301
and AIR303
to AIR302
(#17151)
## Summary Following up the discussion in https://github.com/astral-sh/ruff/issues/14626#issuecomment-2766548545, we're to reorganize airflow rules. Before this discussion happens, we combine required changes and suggested changes in to one single error code. This PR first rename the original error code to the new error code as we discussed. We will gradually extract suggested changes out of AIR301 and AIR302 to AIR311 and AIR312 in the following PRs ## Test Plan Except for file, error code rename, the test case should work as it used to be.
This commit is contained in:
parent
adeba3dca7
commit
8833484b10
20 changed files with 750 additions and 754 deletions
|
@ -1069,8 +1069,8 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
|
|||
// airflow
|
||||
(Airflow, "001") => (RuleGroup::Stable, rules::airflow::rules::AirflowVariableNameTaskIdMismatch),
|
||||
(Airflow, "002") => (RuleGroup::Preview, rules::airflow::rules::AirflowDagNoScheduleArgument),
|
||||
(Airflow, "302") => (RuleGroup::Preview, rules::airflow::rules::Airflow3Removal),
|
||||
(Airflow, "303") => (RuleGroup::Preview, rules::airflow::rules::Airflow3MovedToProvider),
|
||||
(Airflow, "301") => (RuleGroup::Preview, rules::airflow::rules::Airflow3Removal),
|
||||
(Airflow, "302") => (RuleGroup::Preview, rules::airflow::rules::Airflow3MovedToProvider),
|
||||
|
||||
// perflint
|
||||
(Perflint, "101") => (RuleGroup::Stable, rules::perflint::rules::UnnecessaryListCast),
|
||||
|
|
|
@ -15,13 +15,13 @@ mod tests {
|
|||
|
||||
#[test_case(Rule::AirflowVariableNameTaskIdMismatch, Path::new("AIR001.py"))]
|
||||
#[test_case(Rule::AirflowDagNoScheduleArgument, Path::new("AIR002.py"))]
|
||||
#[test_case(Rule::Airflow3Removal, Path::new("AIR302_args.py"))]
|
||||
#[test_case(Rule::Airflow3Removal, Path::new("AIR302_names.py"))]
|
||||
#[test_case(Rule::Airflow3Removal, Path::new("AIR302_names_try.py"))]
|
||||
#[test_case(Rule::Airflow3Removal, Path::new("AIR302_class_attribute.py"))]
|
||||
#[test_case(Rule::Airflow3Removal, Path::new("AIR302_airflow_plugin.py"))]
|
||||
#[test_case(Rule::Airflow3Removal, Path::new("AIR302_context.py"))]
|
||||
#[test_case(Rule::Airflow3MovedToProvider, Path::new("AIR303.py"))]
|
||||
#[test_case(Rule::Airflow3Removal, Path::new("AIR301_args.py"))]
|
||||
#[test_case(Rule::Airflow3Removal, Path::new("AIR301_names.py"))]
|
||||
#[test_case(Rule::Airflow3Removal, Path::new("AIR301_names_try.py"))]
|
||||
#[test_case(Rule::Airflow3Removal, Path::new("AIR301_class_attribute.py"))]
|
||||
#[test_case(Rule::Airflow3Removal, Path::new("AIR301_airflow_plugin.py"))]
|
||||
#[test_case(Rule::Airflow3Removal, Path::new("AIR301_context.py"))]
|
||||
#[test_case(Rule::Airflow3MovedToProvider, Path::new("AIR302.py"))]
|
||||
fn rules(rule_code: Rule, path: &Path) -> Result<()> {
|
||||
let snapshot = format!("{}_{}", rule_code.noqa_code(), path.to_string_lossy());
|
||||
let diagnostics = test_path(
|
||||
|
|
|
@ -77,7 +77,7 @@ pub(crate) fn dag_no_schedule_argument(checker: &Checker, expr: &Expr) {
|
|||
// If there's a schedule keyword argument, we are good.
|
||||
// This includes the canonical 'schedule', and the deprecated 'timetable'
|
||||
// and 'schedule_interval'. Usages of deprecated schedule arguments are
|
||||
// covered by AIR302.
|
||||
// covered by AIR301.
|
||||
if ["schedule", "schedule_interval", "timetable"]
|
||||
.iter()
|
||||
.any(|a| arguments.find_keyword(a).is_some())
|
||||
|
|
|
@ -82,7 +82,7 @@ impl Violation for Airflow3MovedToProvider {
|
|||
}
|
||||
}
|
||||
|
||||
/// AIR303
|
||||
/// AIR302
|
||||
pub(crate) fn moved_to_provider_in_3(checker: &Checker, expr: &Expr) {
|
||||
if !checker.semantic().seen_module(Modules::AIRFLOW) {
|
||||
return;
|
||||
|
|
|
@ -77,7 +77,7 @@ impl Violation for Airflow3Removal {
|
|||
}
|
||||
}
|
||||
|
||||
/// AIR302
|
||||
/// AIR301
|
||||
pub(crate) fn airflow_3_removal_expr(checker: &Checker, expr: &Expr) {
|
||||
if !checker.semantic().seen_module(Modules::AIRFLOW) {
|
||||
return;
|
||||
|
@ -114,7 +114,7 @@ pub(crate) fn airflow_3_removal_expr(checker: &Checker, expr: &Expr) {
|
|||
}
|
||||
}
|
||||
|
||||
/// AIR302
|
||||
/// AIR301
|
||||
pub(crate) fn airflow_3_removal_function_def(checker: &Checker, function_def: &StmtFunctionDef) {
|
||||
if !checker.semantic().seen_module(Modules::AIRFLOW) {
|
||||
return;
|
||||
|
|
|
@ -1,43 +1,42 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
AIR302_airflow_plugin.py:7:5: AIR302 `operators` is removed in Airflow 3.0; This extension should just be imported as a regular python module.
|
||||
AIR301_airflow_plugin.py:7:5: AIR301 `operators` is removed in Airflow 3.0; This extension should just be imported as a regular python module.
|
||||
|
|
||||
5 | name = "test_plugin"
|
||||
6 | # --- Invalid extensions start
|
||||
7 | operators = [PluginOperator]
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^ AIR301
|
||||
8 | sensors = [PluginSensorOperator]
|
||||
9 | hooks = [PluginHook]
|
||||
|
|
||||
|
||||
AIR302_airflow_plugin.py:8:5: AIR302 `sensors` is removed in Airflow 3.0; This extension should just be imported as a regular python module.
|
||||
AIR301_airflow_plugin.py:8:5: AIR301 `sensors` is removed in Airflow 3.0; This extension should just be imported as a regular python module.
|
||||
|
|
||||
6 | # --- Invalid extensions start
|
||||
7 | operators = [PluginOperator]
|
||||
8 | sensors = [PluginSensorOperator]
|
||||
| ^^^^^^^ AIR302
|
||||
| ^^^^^^^ AIR301
|
||||
9 | hooks = [PluginHook]
|
||||
10 | executors = [PluginExecutor]
|
||||
|
|
||||
|
||||
AIR302_airflow_plugin.py:9:5: AIR302 `hooks` is removed in Airflow 3.0; This extension should just be imported as a regular python module.
|
||||
AIR301_airflow_plugin.py:9:5: AIR301 `hooks` is removed in Airflow 3.0; This extension should just be imported as a regular python module.
|
||||
|
|
||||
7 | operators = [PluginOperator]
|
||||
8 | sensors = [PluginSensorOperator]
|
||||
9 | hooks = [PluginHook]
|
||||
| ^^^^^ AIR302
|
||||
| ^^^^^ AIR301
|
||||
10 | executors = [PluginExecutor]
|
||||
11 | # --- Invalid extensions end
|
||||
|
|
||||
|
||||
AIR302_airflow_plugin.py:10:5: AIR302 `executors` is removed in Airflow 3.0; This extension should just be imported as a regular python module.
|
||||
AIR301_airflow_plugin.py:10:5: AIR301 `executors` is removed in Airflow 3.0; This extension should just be imported as a regular python module.
|
||||
|
|
||||
8 | sensors = [PluginSensorOperator]
|
||||
9 | hooks = [PluginHook]
|
||||
10 | executors = [PluginExecutor]
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^ AIR301
|
||||
11 | # --- Invalid extensions end
|
||||
12 | macros = [plugin_macro]
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_args.py:20:39: AIR302 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
AIR301_args.py:20: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")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
21 |
|
||||
22 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
|
|
||||
|
@ -22,12 +22,12 @@ AIR302_args.py:20:39: AIR302 [*] `schedule_interval` is removed in Airflow 3.0
|
|||
22 22 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
23 23 |
|
||||
|
||||
AIR302_args.py:22:31: AIR302 [*] `timetable` is removed in Airflow 3.0
|
||||
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())
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^ AIR301
|
||||
|
|
||||
= help: Use `schedule` instead
|
||||
|
||||
|
@ -41,20 +41,20 @@ AIR302_args.py:22:31: AIR302 [*] `timetable` is removed in Airflow 3.0
|
|||
24 24 |
|
||||
25 25 | def sla_callback(*arg, **kwargs):
|
||||
|
||||
AIR302_args.py:29:34: AIR302 `sla_miss_callback` is removed in Airflow 3.0
|
||||
AIR301_args.py:29:34: AIR301 `sla_miss_callback` is removed in Airflow 3.0
|
||||
|
|
||||
29 | DAG(dag_id="class_sla_callback", sla_miss_callback=sla_callback)
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
30 |
|
||||
31 | DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
|
|
||||
|
||||
AIR302_args.py:31:31: AIR302 [*] `fail_stop` is removed in Airflow 3.0
|
||||
AIR301_args.py:31:31: AIR301 [*] `fail_stop` is removed in Airflow 3.0
|
||||
|
|
||||
29 | DAG(dag_id="class_sla_callback", sla_miss_callback=sla_callback)
|
||||
30 |
|
||||
31 | DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^ AIR301
|
||||
32 |
|
||||
33 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
|
|
||||
|
@ -70,30 +70,30 @@ AIR302_args.py:31:31: AIR302 [*] `fail_stop` is removed in Airflow 3.0
|
|||
33 33 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
34 34 |
|
||||
|
||||
AIR302_args.py:33:34: AIR302 `default_view` is removed in Airflow 3.0
|
||||
AIR301_args.py:33:34: AIR301 `default_view` is removed in Airflow 3.0
|
||||
|
|
||||
31 | DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
32 |
|
||||
33 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
| ^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
34 |
|
||||
35 | DAG(dag_id="class_orientation", orientation="BT")
|
||||
|
|
||||
|
||||
AIR302_args.py:35:33: AIR302 `orientation` is removed in Airflow 3.0
|
||||
AIR301_args.py:35:33: AIR301 `orientation` is removed in Airflow 3.0
|
||||
|
|
||||
33 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
34 |
|
||||
35 | DAG(dag_id="class_orientation", orientation="BT")
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^ AIR301
|
||||
36 |
|
||||
37 | allow_future_exec_dates_dag = DAG(dag_id="class_allow_future_exec_dates")
|
||||
|
|
||||
|
||||
AIR302_args.py:46:6: AIR302 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
AIR301_args.py:46:6: AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
|
|
||||
46 | @dag(schedule_interval="0 * * * *")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
47 | def decorator_schedule_interval():
|
||||
48 | pass
|
||||
|
|
||||
|
@ -109,10 +109,10 @@ AIR302_args.py:46:6: AIR302 [*] `schedule_interval` is removed in Airflow 3.0
|
|||
48 48 | pass
|
||||
49 49 |
|
||||
|
||||
AIR302_args.py:51:6: AIR302 [*] `timetable` is removed in Airflow 3.0
|
||||
AIR301_args.py:51:6: AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
|
|
||||
51 | @dag(timetable=NullTimetable())
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^ AIR301
|
||||
52 | def decorator_timetable():
|
||||
53 | pass
|
||||
|
|
||||
|
@ -128,20 +128,20 @@ AIR302_args.py:51:6: AIR302 [*] `timetable` is removed in Airflow 3.0
|
|||
53 53 | pass
|
||||
54 54 |
|
||||
|
||||
AIR302_args.py:56:6: AIR302 `sla_miss_callback` is removed in Airflow 3.0
|
||||
AIR301_args.py:56:6: AIR301 `sla_miss_callback` is removed in Airflow 3.0
|
||||
|
|
||||
56 | @dag(sla_miss_callback=sla_callback)
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
57 | def decorator_sla_callback():
|
||||
58 | pass
|
||||
|
|
||||
|
||||
AIR302_args.py:64:39: AIR302 [*] `execution_date` is removed in Airflow 3.0
|
||||
AIR301_args.py:64:39: AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
|
|
||||
62 | def decorator_deprecated_operator_args():
|
||||
63 | trigger_dagrun_op = trigger_dagrun.TriggerDagRunOperator(
|
||||
64 | task_id="trigger_dagrun_op1", execution_date="2024-12-04"
|
||||
| ^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
65 | )
|
||||
66 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
|
|
||||
|
@ -157,12 +157,12 @@ AIR302_args.py:64:39: AIR302 [*] `execution_date` is removed in Airflow 3.0
|
|||
66 66 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
67 67 | task_id="trigger_dagrun_op2", execution_date="2024-12-04"
|
||||
|
||||
AIR302_args.py:67:39: AIR302 [*] `execution_date` is removed in Airflow 3.0
|
||||
AIR301_args.py:67:39: AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
|
|
||||
65 | )
|
||||
66 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
67 | task_id="trigger_dagrun_op2", execution_date="2024-12-04"
|
||||
| ^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
68 | )
|
||||
|
|
||||
= help: Use `logical_date` instead
|
||||
|
@ -177,11 +177,11 @@ AIR302_args.py:67:39: AIR302 [*] `execution_date` is removed in Airflow 3.0
|
|||
69 69 |
|
||||
70 70 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
|
||||
AIR302_args.py:71:33: AIR302 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
AIR301_args.py:71:33: AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
|
|
||||
70 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
71 | task_id="branch_dt_op", use_task_execution_day=True, task_concurrency=5
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
72 | )
|
||||
73 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
|
|
||||
|
@ -197,11 +197,11 @@ AIR302_args.py:71:33: AIR302 [*] `use_task_execution_day` is removed in Airflow
|
|||
73 73 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
74 74 | task_id="branch_dt_op2",
|
||||
|
||||
AIR302_args.py:71:62: AIR302 [*] `task_concurrency` is removed in Airflow 3.0
|
||||
AIR301_args.py:71:62: AIR301 [*] `task_concurrency` is removed in Airflow 3.0
|
||||
|
|
||||
70 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
71 | task_id="branch_dt_op", use_task_execution_day=True, task_concurrency=5
|
||||
| ^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
72 | )
|
||||
73 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
|
|
||||
|
@ -217,12 +217,12 @@ AIR302_args.py:71:62: AIR302 [*] `task_concurrency` is removed in Airflow 3.0
|
|||
73 73 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
74 74 | task_id="branch_dt_op2",
|
||||
|
||||
AIR302_args.py:75:9: AIR302 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
AIR301_args.py:75:9: AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
|
|
||||
73 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
74 | task_id="branch_dt_op2",
|
||||
75 | use_task_execution_day=True,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
76 | sla=timedelta(seconds=10),
|
||||
77 | )
|
||||
|
|
||||
|
@ -238,57 +238,57 @@ AIR302_args.py:75:9: AIR302 [*] `use_task_execution_day` is removed in Airflow 3
|
|||
77 77 | )
|
||||
78 78 |
|
||||
|
||||
AIR302_args.py:76:9: AIR302 `sla` is removed in Airflow 3.0
|
||||
AIR301_args.py:76:9: AIR301 `sla` is removed in Airflow 3.0
|
||||
|
|
||||
74 | task_id="branch_dt_op2",
|
||||
75 | use_task_execution_day=True,
|
||||
76 | sla=timedelta(seconds=10),
|
||||
| ^^^ AIR302
|
||||
| ^^^ AIR301
|
||||
77 | )
|
||||
|
|
||||
|
||||
AIR302_args.py:98:15: AIR302 `filename_template` is removed in Airflow 3.0
|
||||
AIR301_args.py:98:15: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
|
|
||||
97 | # deprecated filename_template argument in FileTaskHandler
|
||||
98 | S3TaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
99 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
100 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
|
|
||||
|
||||
AIR302_args.py:99:17: AIR302 `filename_template` is removed in Airflow 3.0
|
||||
AIR301_args.py:99:17: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
|
|
||||
97 | # deprecated filename_template argument in FileTaskHandler
|
||||
98 | S3TaskHandler(filename_template="/tmp/test")
|
||||
99 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
100 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
101 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
|
|
||||
|
||||
AIR302_args.py:100:26: AIR302 `filename_template` is removed in Airflow 3.0
|
||||
AIR301_args.py:100:26: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
|
|
||||
98 | S3TaskHandler(filename_template="/tmp/test")
|
||||
99 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
100 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
101 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
|
|
||||
|
||||
AIR302_args.py:101:16: AIR302 `filename_template` is removed in Airflow 3.0
|
||||
AIR301_args.py:101:16: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
|
|
||||
99 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
100 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
101 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
102 |
|
||||
103 | FabAuthManager(None)
|
||||
|
|
||||
|
||||
AIR302_args.py:103:15: AIR302 `appbuilder` is removed in Airflow 3.0; The constructor takes no parameter now
|
||||
AIR301_args.py:103:15: AIR301 `appbuilder` is removed in Airflow 3.0; The constructor takes no parameter now
|
||||
|
|
||||
101 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
102 |
|
||||
103 | FabAuthManager(None)
|
||||
| ^^^^^^ AIR302
|
||||
| ^^^^^^ AIR301
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_class_attribute.py:24:21: AIR302 [*] `airflow.Dataset` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:24:21: AIR301 [*] `airflow.Dataset` is removed in Airflow 3.0
|
||||
|
|
||||
23 | # airflow.Dataset
|
||||
24 | dataset_from_root = DatasetFromRoot()
|
||||
| ^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
25 | dataset_from_root.iter_datasets()
|
||||
26 | dataset_from_root.iter_dataset_aliases()
|
||||
|
|
||||
|
@ -24,12 +24,12 @@ AIR302_class_attribute.py:24:21: AIR302 [*] `airflow.Dataset` is removed in Airf
|
|||
26 27 | dataset_from_root.iter_dataset_aliases()
|
||||
27 28 |
|
||||
|
||||
AIR302_class_attribute.py:25:19: AIR302 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:25:19: AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
|
|
||||
23 | # airflow.Dataset
|
||||
24 | dataset_from_root = DatasetFromRoot()
|
||||
25 | dataset_from_root.iter_datasets()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
26 | dataset_from_root.iter_dataset_aliases()
|
||||
|
|
||||
= help: Use `iter_assets` instead
|
||||
|
@ -44,12 +44,12 @@ AIR302_class_attribute.py:25:19: AIR302 [*] `iter_datasets` is removed in Airflo
|
|||
27 27 |
|
||||
28 28 | # airflow.datasets
|
||||
|
||||
AIR302_class_attribute.py:26:19: AIR302 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:26:19: AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
|
|
||||
24 | dataset_from_root = DatasetFromRoot()
|
||||
25 | dataset_from_root.iter_datasets()
|
||||
26 | dataset_from_root.iter_dataset_aliases()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
27 |
|
||||
28 | # airflow.datasets
|
||||
|
|
||||
|
@ -65,11 +65,11 @@ AIR302_class_attribute.py:26:19: AIR302 [*] `iter_dataset_aliases` is removed in
|
|||
28 28 | # airflow.datasets
|
||||
29 29 | dataset_to_test_method_call = Dataset()
|
||||
|
||||
AIR302_class_attribute.py:29:31: AIR302 [*] `airflow.datasets.Dataset` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:29:31: AIR301 [*] `airflow.datasets.Dataset` is removed in Airflow 3.0
|
||||
|
|
||||
28 | # airflow.datasets
|
||||
29 | dataset_to_test_method_call = Dataset()
|
||||
| ^^^^^^^ AIR302
|
||||
| ^^^^^^^ AIR301
|
||||
30 | dataset_to_test_method_call.iter_datasets()
|
||||
31 | dataset_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
||||
|
@ -93,12 +93,12 @@ AIR302_class_attribute.py:29:31: AIR302 [*] `airflow.datasets.Dataset` is remove
|
|||
31 32 | dataset_to_test_method_call.iter_dataset_aliases()
|
||||
32 33 |
|
||||
|
||||
AIR302_class_attribute.py:30:29: AIR302 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:30:29: AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
|
|
||||
28 | # airflow.datasets
|
||||
29 | dataset_to_test_method_call = Dataset()
|
||||
30 | dataset_to_test_method_call.iter_datasets()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
31 | dataset_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
||||
= help: Use `iter_assets` instead
|
||||
|
@ -113,12 +113,12 @@ AIR302_class_attribute.py:30:29: AIR302 [*] `iter_datasets` is removed in Airflo
|
|||
32 32 |
|
||||
33 33 | alias_to_test_method_call = DatasetAlias()
|
||||
|
||||
AIR302_class_attribute.py:31:29: AIR302 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:31:29: AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
|
|
||||
29 | dataset_to_test_method_call = Dataset()
|
||||
30 | dataset_to_test_method_call.iter_datasets()
|
||||
31 | dataset_to_test_method_call.iter_dataset_aliases()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
32 |
|
||||
33 | alias_to_test_method_call = DatasetAlias()
|
||||
|
|
||||
|
@ -134,22 +134,22 @@ AIR302_class_attribute.py:31:29: AIR302 [*] `iter_dataset_aliases` is removed in
|
|||
33 33 | alias_to_test_method_call = DatasetAlias()
|
||||
34 34 | alias_to_test_method_call.iter_datasets()
|
||||
|
||||
AIR302_class_attribute.py:33:29: AIR302 `airflow.datasets.DatasetAlias` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:33:29: AIR301 `airflow.datasets.DatasetAlias` is removed in Airflow 3.0
|
||||
|
|
||||
31 | dataset_to_test_method_call.iter_dataset_aliases()
|
||||
32 |
|
||||
33 | alias_to_test_method_call = DatasetAlias()
|
||||
| ^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
34 | alias_to_test_method_call.iter_datasets()
|
||||
35 | alias_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
||||
= help: Use `airflow.sdk.AssetAlias` instead
|
||||
|
||||
AIR302_class_attribute.py:34:27: AIR302 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:34:27: AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
|
|
||||
33 | alias_to_test_method_call = DatasetAlias()
|
||||
34 | alias_to_test_method_call.iter_datasets()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
35 | alias_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
||||
= help: Use `iter_assets` instead
|
||||
|
@ -164,12 +164,12 @@ AIR302_class_attribute.py:34:27: AIR302 [*] `iter_datasets` is removed in Airflo
|
|||
36 36 |
|
||||
37 37 | any_to_test_method_call = DatasetAny()
|
||||
|
||||
AIR302_class_attribute.py:35:27: AIR302 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:35:27: AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
|
|
||||
33 | alias_to_test_method_call = DatasetAlias()
|
||||
34 | alias_to_test_method_call.iter_datasets()
|
||||
35 | alias_to_test_method_call.iter_dataset_aliases()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
36 |
|
||||
37 | any_to_test_method_call = DatasetAny()
|
||||
|
|
||||
|
@ -185,22 +185,22 @@ AIR302_class_attribute.py:35:27: AIR302 [*] `iter_dataset_aliases` is removed in
|
|||
37 37 | any_to_test_method_call = DatasetAny()
|
||||
38 38 | any_to_test_method_call.iter_datasets()
|
||||
|
||||
AIR302_class_attribute.py:37:27: AIR302 `airflow.datasets.DatasetAny` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:37:27: AIR301 `airflow.datasets.DatasetAny` is removed in Airflow 3.0
|
||||
|
|
||||
35 | alias_to_test_method_call.iter_dataset_aliases()
|
||||
36 |
|
||||
37 | any_to_test_method_call = DatasetAny()
|
||||
| ^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^ AIR301
|
||||
38 | any_to_test_method_call.iter_datasets()
|
||||
39 | any_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
||||
= help: Use `airflow.sdk.AssetAny` instead
|
||||
|
||||
AIR302_class_attribute.py:38:25: AIR302 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:38:25: AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
|
|
||||
37 | any_to_test_method_call = DatasetAny()
|
||||
38 | any_to_test_method_call.iter_datasets()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
39 | any_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
||||
= help: Use `iter_assets` instead
|
||||
|
@ -215,12 +215,12 @@ AIR302_class_attribute.py:38:25: AIR302 [*] `iter_datasets` is removed in Airflo
|
|||
40 40 |
|
||||
41 41 | # airflow.datasets.manager
|
||||
|
||||
AIR302_class_attribute.py:39:25: AIR302 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:39:25: AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
|
|
||||
37 | any_to_test_method_call = DatasetAny()
|
||||
38 | any_to_test_method_call.iter_datasets()
|
||||
39 | any_to_test_method_call.iter_dataset_aliases()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
40 |
|
||||
41 | # airflow.datasets.manager
|
||||
|
|
||||
|
@ -236,22 +236,22 @@ AIR302_class_attribute.py:39:25: AIR302 [*] `iter_dataset_aliases` is removed in
|
|||
41 41 | # airflow.datasets.manager
|
||||
42 42 | dm = DatasetManager()
|
||||
|
||||
AIR302_class_attribute.py:42:6: AIR302 `airflow.datasets.manager.DatasetManager` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:42:6: AIR301 `airflow.datasets.manager.DatasetManager` is removed in Airflow 3.0
|
||||
|
|
||||
41 | # airflow.datasets.manager
|
||||
42 | dm = DatasetManager()
|
||||
| ^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
43 | dm.register_dataset_change()
|
||||
44 | dm.create_datasets()
|
||||
|
|
||||
= help: Use `airflow.assets.AssetManager` instead
|
||||
|
||||
AIR302_class_attribute.py:43:4: AIR302 [*] `register_dataset_change` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:43:4: AIR301 [*] `register_dataset_change` is removed in Airflow 3.0
|
||||
|
|
||||
41 | # airflow.datasets.manager
|
||||
42 | dm = DatasetManager()
|
||||
43 | dm.register_dataset_change()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
44 | dm.create_datasets()
|
||||
45 | dm.notify_dataset_created()
|
||||
|
|
||||
|
@ -267,12 +267,12 @@ AIR302_class_attribute.py:43:4: AIR302 [*] `register_dataset_change` is removed
|
|||
45 45 | dm.notify_dataset_created()
|
||||
46 46 | dm.notify_dataset_changed()
|
||||
|
||||
AIR302_class_attribute.py:44:4: AIR302 [*] `create_datasets` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:44:4: AIR301 [*] `create_datasets` is removed in Airflow 3.0
|
||||
|
|
||||
42 | dm = DatasetManager()
|
||||
43 | dm.register_dataset_change()
|
||||
44 | dm.create_datasets()
|
||||
| ^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
45 | dm.notify_dataset_created()
|
||||
46 | dm.notify_dataset_changed()
|
||||
|
|
||||
|
@ -288,12 +288,12 @@ AIR302_class_attribute.py:44:4: AIR302 [*] `create_datasets` is removed in Airfl
|
|||
46 46 | dm.notify_dataset_changed()
|
||||
47 47 | dm.notify_dataset_alias_created()
|
||||
|
||||
AIR302_class_attribute.py:45:4: AIR302 [*] `notify_dataset_created` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:45:4: AIR301 [*] `notify_dataset_created` is removed in Airflow 3.0
|
||||
|
|
||||
43 | dm.register_dataset_change()
|
||||
44 | dm.create_datasets()
|
||||
45 | dm.notify_dataset_created()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
46 | dm.notify_dataset_changed()
|
||||
47 | dm.notify_dataset_alias_created()
|
||||
|
|
||||
|
@ -309,12 +309,12 @@ AIR302_class_attribute.py:45:4: AIR302 [*] `notify_dataset_created` is removed i
|
|||
47 47 | dm.notify_dataset_alias_created()
|
||||
48 48 |
|
||||
|
||||
AIR302_class_attribute.py:46:4: AIR302 [*] `notify_dataset_changed` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:46:4: AIR301 [*] `notify_dataset_changed` is removed in Airflow 3.0
|
||||
|
|
||||
44 | dm.create_datasets()
|
||||
45 | dm.notify_dataset_created()
|
||||
46 | dm.notify_dataset_changed()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
47 | dm.notify_dataset_alias_created()
|
||||
|
|
||||
= help: Use `notify_asset_changed` instead
|
||||
|
@ -329,12 +329,12 @@ AIR302_class_attribute.py:46:4: AIR302 [*] `notify_dataset_changed` is removed i
|
|||
48 48 |
|
||||
49 49 | # airflow.lineage.hook
|
||||
|
||||
AIR302_class_attribute.py:47:4: AIR302 [*] `notify_dataset_alias_created` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:47:4: AIR301 [*] `notify_dataset_alias_created` is removed in Airflow 3.0
|
||||
|
|
||||
45 | dm.notify_dataset_created()
|
||||
46 | dm.notify_dataset_changed()
|
||||
47 | dm.notify_dataset_alias_created()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
48 |
|
||||
49 | # airflow.lineage.hook
|
||||
|
|
||||
|
@ -350,21 +350,21 @@ AIR302_class_attribute.py:47:4: AIR302 [*] `notify_dataset_alias_created` is rem
|
|||
49 49 | # airflow.lineage.hook
|
||||
50 50 | dl_info = DatasetLineageInfo()
|
||||
|
||||
AIR302_class_attribute.py:50:11: AIR302 `airflow.lineage.hook.DatasetLineageInfo` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:50:11: AIR301 `airflow.lineage.hook.DatasetLineageInfo` is removed in Airflow 3.0
|
||||
|
|
||||
49 | # airflow.lineage.hook
|
||||
50 | dl_info = DatasetLineageInfo()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
51 | dl_info.dataset
|
||||
|
|
||||
= help: Use `airflow.lineage.hook.AssetLineageInfo` instead
|
||||
|
||||
AIR302_class_attribute.py:51:9: AIR302 [*] `dataset` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:51:9: AIR301 [*] `dataset` is removed in Airflow 3.0
|
||||
|
|
||||
49 | # airflow.lineage.hook
|
||||
50 | dl_info = DatasetLineageInfo()
|
||||
51 | dl_info.dataset
|
||||
| ^^^^^^^ AIR302
|
||||
| ^^^^^^^ AIR301
|
||||
52 |
|
||||
53 | hlc = HookLineageCollector()
|
||||
|
|
||||
|
@ -380,11 +380,11 @@ AIR302_class_attribute.py:51:9: AIR302 [*] `dataset` is removed in Airflow 3.0
|
|||
53 53 | hlc = HookLineageCollector()
|
||||
54 54 | hlc.create_dataset()
|
||||
|
||||
AIR302_class_attribute.py:54:5: AIR302 [*] `create_dataset` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:54:5: AIR301 [*] `create_dataset` is removed in Airflow 3.0
|
||||
|
|
||||
53 | hlc = HookLineageCollector()
|
||||
54 | hlc.create_dataset()
|
||||
| ^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
55 | hlc.add_input_dataset()
|
||||
56 | hlc.add_output_dataset()
|
||||
|
|
||||
|
@ -400,12 +400,12 @@ AIR302_class_attribute.py:54:5: AIR302 [*] `create_dataset` is removed in Airflo
|
|||
56 56 | hlc.add_output_dataset()
|
||||
57 57 | hlc.collected_datasets()
|
||||
|
||||
AIR302_class_attribute.py:55:5: AIR302 [*] `add_input_dataset` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:55:5: AIR301 [*] `add_input_dataset` is removed in Airflow 3.0
|
||||
|
|
||||
53 | hlc = HookLineageCollector()
|
||||
54 | hlc.create_dataset()
|
||||
55 | hlc.add_input_dataset()
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
56 | hlc.add_output_dataset()
|
||||
57 | hlc.collected_datasets()
|
||||
|
|
||||
|
@ -421,12 +421,12 @@ AIR302_class_attribute.py:55:5: AIR302 [*] `add_input_dataset` is removed in Air
|
|||
57 57 | hlc.collected_datasets()
|
||||
58 58 |
|
||||
|
||||
AIR302_class_attribute.py:56:5: AIR302 [*] `add_output_dataset` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:56:5: AIR301 [*] `add_output_dataset` is removed in Airflow 3.0
|
||||
|
|
||||
54 | hlc.create_dataset()
|
||||
55 | hlc.add_input_dataset()
|
||||
56 | hlc.add_output_dataset()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
57 | hlc.collected_datasets()
|
||||
|
|
||||
= help: Use `add_output_asset` instead
|
||||
|
@ -441,12 +441,12 @@ AIR302_class_attribute.py:56:5: AIR302 [*] `add_output_dataset` is removed in Ai
|
|||
58 58 |
|
||||
59 59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
|
||||
AIR302_class_attribute.py:57:5: AIR302 [*] `collected_datasets` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:57:5: AIR301 [*] `collected_datasets` is removed in Airflow 3.0
|
||||
|
|
||||
55 | hlc.add_input_dataset()
|
||||
56 | hlc.add_output_dataset()
|
||||
57 | hlc.collected_datasets()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
58 |
|
||||
59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
|
|
||||
|
@ -462,12 +462,12 @@ AIR302_class_attribute.py:57:5: AIR302 [*] `collected_datasets` is removed in Ai
|
|||
59 59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
60 60 | aam = AwsAuthManager()
|
||||
|
||||
AIR302_class_attribute.py:61:5: AIR302 [*] `is_authorized_dataset` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:61:5: AIR301 [*] `is_authorized_dataset` is removed in Airflow 3.0
|
||||
|
|
||||
59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
60 | aam = AwsAuthManager()
|
||||
61 | aam.is_authorized_dataset()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
62 |
|
||||
63 | # airflow.providers.apache.beam.hooks
|
||||
|
|
||||
|
@ -483,12 +483,12 @@ AIR302_class_attribute.py:61:5: AIR302 [*] `is_authorized_dataset` is removed in
|
|||
63 63 | # airflow.providers.apache.beam.hooks
|
||||
64 64 | # check get_conn_uri is caught if the class inherits from an airflow hook
|
||||
|
||||
AIR302_class_attribute.py:73:13: AIR302 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:73:13: AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
|
|
||||
71 | # airflow.providers.google.cloud.secrets.secret_manager
|
||||
72 | csm_backend = CloudSecretManagerBackend()
|
||||
73 | csm_backend.get_conn_uri()
|
||||
| ^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
74 | csm_backend.get_connections()
|
||||
|
|
||||
= help: Use `get_conn_value` instead
|
||||
|
@ -503,12 +503,12 @@ AIR302_class_attribute.py:73:13: AIR302 [*] `get_conn_uri` is removed in Airflow
|
|||
75 75 |
|
||||
76 76 | # airflow.providers.hashicorp.secrets.vault
|
||||
|
||||
AIR302_class_attribute.py:74:13: AIR302 [*] `get_connections` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:74:13: AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
|
|
||||
72 | csm_backend = CloudSecretManagerBackend()
|
||||
73 | csm_backend.get_conn_uri()
|
||||
74 | csm_backend.get_connections()
|
||||
| ^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
75 |
|
||||
76 | # airflow.providers.hashicorp.secrets.vault
|
||||
|
|
||||
|
@ -524,12 +524,12 @@ AIR302_class_attribute.py:74:13: AIR302 [*] `get_connections` is removed in Airf
|
|||
76 76 | # airflow.providers.hashicorp.secrets.vault
|
||||
77 77 | vault_backend = VaultBackend()
|
||||
|
||||
AIR302_class_attribute.py:78:15: AIR302 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:78:15: AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
|
|
||||
76 | # airflow.providers.hashicorp.secrets.vault
|
||||
77 | vault_backend = VaultBackend()
|
||||
78 | vault_backend.get_conn_uri()
|
||||
| ^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
79 | vault_backend.get_connections()
|
||||
|
|
||||
= help: Use `get_conn_value` instead
|
||||
|
@ -544,12 +544,12 @@ AIR302_class_attribute.py:78:15: AIR302 [*] `get_conn_uri` is removed in Airflow
|
|||
80 80 |
|
||||
81 81 | not_an_error = NotAir302SecretError()
|
||||
|
||||
AIR302_class_attribute.py:79:15: AIR302 [*] `get_connections` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:79:15: AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
|
|
||||
77 | vault_backend = VaultBackend()
|
||||
78 | vault_backend.get_conn_uri()
|
||||
79 | vault_backend.get_connections()
|
||||
| ^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
80 |
|
||||
81 | not_an_error = NotAir302SecretError()
|
||||
|
|
||||
|
@ -565,12 +565,12 @@ AIR302_class_attribute.py:79:15: AIR302 [*] `get_connections` is removed in Airf
|
|||
81 81 | not_an_error = NotAir302SecretError()
|
||||
82 82 | not_an_error.get_conn_uri()
|
||||
|
||||
AIR302_class_attribute.py:87:4: AIR302 [*] `dataset_factories` is removed in Airflow 3.0
|
||||
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()
|
||||
87 | pm.dataset_factories
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
88 | pm.dataset_factories
|
||||
89 | pm.dataset_uri_handlers
|
||||
|
|
||||
|
@ -586,12 +586,12 @@ AIR302_class_attribute.py:87:4: AIR302 [*] `dataset_factories` is removed in Air
|
|||
89 89 | pm.dataset_uri_handlers
|
||||
90 90 | pm.dataset_to_openlineage_converters
|
||||
|
||||
AIR302_class_attribute.py:88:4: AIR302 [*] `dataset_factories` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:88:4: AIR301 [*] `dataset_factories` is removed in Airflow 3.0
|
||||
|
|
||||
86 | pm.initialize_providers_asset_uri_resources()
|
||||
87 | pm.dataset_factories
|
||||
88 | pm.dataset_factories
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
89 | pm.dataset_uri_handlers
|
||||
90 | pm.dataset_to_openlineage_converters
|
||||
|
|
||||
|
@ -607,12 +607,12 @@ AIR302_class_attribute.py:88:4: AIR302 [*] `dataset_factories` is removed in Air
|
|||
90 90 | pm.dataset_to_openlineage_converters
|
||||
91 91 |
|
||||
|
||||
AIR302_class_attribute.py:89:4: AIR302 [*] `dataset_uri_handlers` is removed in Airflow 3.0
|
||||
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
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
90 | pm.dataset_to_openlineage_converters
|
||||
|
|
||||
= help: Use `asset_uri_handlers` instead
|
||||
|
@ -627,12 +627,12 @@ AIR302_class_attribute.py:89:4: AIR302 [*] `dataset_uri_handlers` is removed in
|
|||
91 91 |
|
||||
92 92 | # airflow.secrets.base_secrets
|
||||
|
||||
AIR302_class_attribute.py:90:4: AIR302 [*] `dataset_to_openlineage_converters` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:90: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
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
91 |
|
||||
92 | # airflow.secrets.base_secrets
|
||||
|
|
||||
|
@ -648,12 +648,12 @@ AIR302_class_attribute.py:90:4: AIR302 [*] `dataset_to_openlineage_converters` i
|
|||
92 92 | # airflow.secrets.base_secrets
|
||||
93 93 | base_secret_backend = BaseSecretsBackend()
|
||||
|
||||
AIR302_class_attribute.py:94:21: AIR302 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:94: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()
|
||||
| ^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
95 | base_secret_backend.get_connections()
|
||||
|
|
||||
= help: Use `get_conn_value` instead
|
||||
|
@ -668,12 +668,12 @@ AIR302_class_attribute.py:94:21: AIR302 [*] `get_conn_uri` is removed in Airflow
|
|||
96 96 |
|
||||
97 97 | # airflow.secrets.local_filesystem
|
||||
|
||||
AIR302_class_attribute.py:95:21: AIR302 [*] `get_connections` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:95: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()
|
||||
| ^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
96 |
|
||||
97 | # airflow.secrets.local_filesystem
|
||||
|
|
||||
|
@ -689,12 +689,12 @@ AIR302_class_attribute.py:95:21: AIR302 [*] `get_connections` is removed in Airf
|
|||
97 97 | # airflow.secrets.local_filesystem
|
||||
98 98 | lfb = LocalFilesystemBackend()
|
||||
|
||||
AIR302_class_attribute.py:99:5: AIR302 [*] `get_connections` is removed in Airflow 3.0
|
||||
AIR301_class_attribute.py:99:5: AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
|
|
||||
97 | # airflow.secrets.local_filesystem
|
||||
98 | lfb = LocalFilesystemBackend()
|
||||
99 | lfb.get_connections()
|
||||
| ^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
|
|
||||
= help: Use `get_connection` instead
|
||||
|
|
@ -1,307 +1,306 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
AIR302_context.py:22:41: AIR302 `conf` is removed in Airflow 3.0
|
||||
AIR301_context.py:22:41: AIR301 `conf` is removed in Airflow 3.0
|
||||
|
|
||||
20 | @task
|
||||
21 | def access_invalid_key_task_out_of_dag(**context):
|
||||
22 | print("access invalid key", context["conf"])
|
||||
| ^^^^^^ AIR302
|
||||
| ^^^^^^ AIR301
|
||||
23 | print("access invalid key", context.get("conf"))
|
||||
|
|
||||
|
||||
AIR302_context.py:23:45: AIR302 `conf` is removed in Airflow 3.0
|
||||
AIR301_context.py:23:45: AIR301 `conf` is removed in Airflow 3.0
|
||||
|
|
||||
21 | def access_invalid_key_task_out_of_dag(**context):
|
||||
22 | print("access invalid key", context["conf"])
|
||||
23 | print("access invalid key", context.get("conf"))
|
||||
| ^^^^^^ AIR302
|
||||
| ^^^^^^ AIR301
|
||||
|
|
||||
|
||||
AIR302_context.py:28:5: AIR302 `execution_date` is removed in Airflow 3.0
|
||||
AIR301_context.py:28:5: AIR301 `execution_date` is removed in Airflow 3.0
|
||||
|
|
||||
26 | @task
|
||||
27 | def access_invalid_argument_task_out_of_dag(
|
||||
28 | execution_date, tomorrow_ds, logical_date, **context
|
||||
| ^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
29 | ):
|
||||
30 | print("execution date", execution_date)
|
||||
|
|
||||
|
||||
AIR302_context.py:28:21: AIR302 `tomorrow_ds` is removed in Airflow 3.0
|
||||
AIR301_context.py:28:21: AIR301 `tomorrow_ds` is removed in Airflow 3.0
|
||||
|
|
||||
26 | @task
|
||||
27 | def access_invalid_argument_task_out_of_dag(
|
||||
28 | execution_date, tomorrow_ds, logical_date, **context
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^ AIR301
|
||||
29 | ):
|
||||
30 | print("execution date", execution_date)
|
||||
|
|
||||
|
||||
AIR302_context.py:31:45: AIR302 `conf` is removed in Airflow 3.0
|
||||
AIR301_context.py:31:45: AIR301 `conf` is removed in Airflow 3.0
|
||||
|
|
||||
29 | ):
|
||||
30 | print("execution date", execution_date)
|
||||
31 | print("access invalid key", context.get("conf"))
|
||||
| ^^^^^^ AIR302
|
||||
| ^^^^^^ AIR301
|
||||
|
|
||||
|
||||
AIR302_context.py:40:30: AIR302 `execution_date` is removed in Airflow 3.0
|
||||
AIR301_context.py:40:30: AIR301 `execution_date` is removed in Airflow 3.0
|
||||
|
|
||||
39 | # Removed usage - should trigger violations
|
||||
40 | execution_date = context["execution_date"]
|
||||
| ^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
41 | next_ds = context["next_ds"]
|
||||
42 | next_ds_nodash = context["next_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR302_context.py:41:23: AIR302 `next_ds` is removed in Airflow 3.0
|
||||
AIR301_context.py:41:23: AIR301 `next_ds` is removed in Airflow 3.0
|
||||
|
|
||||
39 | # Removed usage - should trigger violations
|
||||
40 | execution_date = context["execution_date"]
|
||||
41 | next_ds = context["next_ds"]
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^ AIR301
|
||||
42 | next_ds_nodash = context["next_ds_nodash"]
|
||||
43 | next_execution_date = context["next_execution_date"]
|
||||
|
|
||||
|
||||
AIR302_context.py:42:30: AIR302 `next_ds_nodash` is removed in Airflow 3.0
|
||||
AIR301_context.py:42:30: AIR301 `next_ds_nodash` is removed in Airflow 3.0
|
||||
|
|
||||
40 | execution_date = context["execution_date"]
|
||||
41 | next_ds = context["next_ds"]
|
||||
42 | next_ds_nodash = context["next_ds_nodash"]
|
||||
| ^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
43 | next_execution_date = context["next_execution_date"]
|
||||
44 | prev_ds = context["prev_ds"]
|
||||
|
|
||||
|
||||
AIR302_context.py:43:35: AIR302 `next_execution_date` is removed in Airflow 3.0
|
||||
AIR301_context.py:43:35: AIR301 `next_execution_date` is removed in Airflow 3.0
|
||||
|
|
||||
41 | next_ds = context["next_ds"]
|
||||
42 | next_ds_nodash = context["next_ds_nodash"]
|
||||
43 | next_execution_date = context["next_execution_date"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
44 | prev_ds = context["prev_ds"]
|
||||
45 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR302_context.py:44:23: AIR302 `prev_ds` is removed in Airflow 3.0
|
||||
AIR301_context.py:44:23: AIR301 `prev_ds` is removed in Airflow 3.0
|
||||
|
|
||||
42 | next_ds_nodash = context["next_ds_nodash"]
|
||||
43 | next_execution_date = context["next_execution_date"]
|
||||
44 | prev_ds = context["prev_ds"]
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^ AIR301
|
||||
45 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
46 | prev_execution_date = context["prev_execution_date"]
|
||||
|
|
||||
|
||||
AIR302_context.py:45:30: AIR302 `prev_ds_nodash` is removed in Airflow 3.0
|
||||
AIR301_context.py:45:30: AIR301 `prev_ds_nodash` is removed in Airflow 3.0
|
||||
|
|
||||
43 | next_execution_date = context["next_execution_date"]
|
||||
44 | prev_ds = context["prev_ds"]
|
||||
45 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
| ^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
46 | prev_execution_date = context["prev_execution_date"]
|
||||
47 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
|
|
||||
|
||||
AIR302_context.py:46:35: AIR302 `prev_execution_date` is removed in Airflow 3.0
|
||||
AIR301_context.py:46:35: AIR301 `prev_execution_date` is removed in Airflow 3.0
|
||||
|
|
||||
44 | prev_ds = context["prev_ds"]
|
||||
45 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
46 | prev_execution_date = context["prev_execution_date"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
47 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
48 | tomorrow_ds = context["tomorrow_ds"]
|
||||
|
|
||||
|
||||
AIR302_context.py:47:43: AIR302 `prev_execution_date_success` is removed in Airflow 3.0
|
||||
AIR301_context.py:47:43: AIR301 `prev_execution_date_success` is removed in Airflow 3.0
|
||||
|
|
||||
45 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
46 | prev_execution_date = context["prev_execution_date"]
|
||||
47 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
48 | tomorrow_ds = context["tomorrow_ds"]
|
||||
49 | yesterday_ds = context["yesterday_ds"]
|
||||
|
|
||||
|
||||
AIR302_context.py:48:27: AIR302 `tomorrow_ds` is removed in Airflow 3.0
|
||||
AIR301_context.py:48:27: AIR301 `tomorrow_ds` is removed in Airflow 3.0
|
||||
|
|
||||
46 | prev_execution_date = context["prev_execution_date"]
|
||||
47 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
48 | tomorrow_ds = context["tomorrow_ds"]
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
49 | yesterday_ds = context["yesterday_ds"]
|
||||
50 | yesterday_ds_nodash = context["yesterday_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR302_context.py:49:28: AIR302 `yesterday_ds` is removed in Airflow 3.0
|
||||
AIR301_context.py:49:28: AIR301 `yesterday_ds` is removed in Airflow 3.0
|
||||
|
|
||||
47 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
48 | tomorrow_ds = context["tomorrow_ds"]
|
||||
49 | yesterday_ds = context["yesterday_ds"]
|
||||
| ^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
50 | yesterday_ds_nodash = context["yesterday_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR302_context.py:50:35: AIR302 `yesterday_ds_nodash` is removed in Airflow 3.0
|
||||
AIR301_context.py:50:35: AIR301 `yesterday_ds_nodash` is removed in Airflow 3.0
|
||||
|
|
||||
48 | tomorrow_ds = context["tomorrow_ds"]
|
||||
49 | yesterday_ds = context["yesterday_ds"]
|
||||
50 | yesterday_ds_nodash = context["yesterday_ds_nodash"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
|
|
||||
|
||||
AIR302_context.py:56:30: AIR302 `execution_date` is removed in Airflow 3.0
|
||||
AIR301_context.py:56:30: AIR301 `execution_date` is removed in Airflow 3.0
|
||||
|
|
||||
54 | def print_config_with_get_current_context():
|
||||
55 | context = get_current_context()
|
||||
56 | execution_date = context["execution_date"]
|
||||
| ^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
57 | next_ds = context["next_ds"]
|
||||
58 | next_ds_nodash = context["next_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR302_context.py:57:23: AIR302 `next_ds` is removed in Airflow 3.0
|
||||
AIR301_context.py:57:23: AIR301 `next_ds` is removed in Airflow 3.0
|
||||
|
|
||||
55 | context = get_current_context()
|
||||
56 | execution_date = context["execution_date"]
|
||||
57 | next_ds = context["next_ds"]
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^ AIR301
|
||||
58 | next_ds_nodash = context["next_ds_nodash"]
|
||||
59 | next_execution_date = context["next_execution_date"]
|
||||
|
|
||||
|
||||
AIR302_context.py:58:30: AIR302 `next_ds_nodash` is removed in Airflow 3.0
|
||||
AIR301_context.py:58:30: AIR301 `next_ds_nodash` is removed in Airflow 3.0
|
||||
|
|
||||
56 | execution_date = context["execution_date"]
|
||||
57 | next_ds = context["next_ds"]
|
||||
58 | next_ds_nodash = context["next_ds_nodash"]
|
||||
| ^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
59 | next_execution_date = context["next_execution_date"]
|
||||
60 | prev_ds = context["prev_ds"]
|
||||
|
|
||||
|
||||
AIR302_context.py:59:35: AIR302 `next_execution_date` is removed in Airflow 3.0
|
||||
AIR301_context.py:59:35: AIR301 `next_execution_date` is removed in Airflow 3.0
|
||||
|
|
||||
57 | next_ds = context["next_ds"]
|
||||
58 | next_ds_nodash = context["next_ds_nodash"]
|
||||
59 | next_execution_date = context["next_execution_date"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
60 | prev_ds = context["prev_ds"]
|
||||
61 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR302_context.py:60:23: AIR302 `prev_ds` is removed in Airflow 3.0
|
||||
AIR301_context.py:60:23: AIR301 `prev_ds` is removed in Airflow 3.0
|
||||
|
|
||||
58 | next_ds_nodash = context["next_ds_nodash"]
|
||||
59 | next_execution_date = context["next_execution_date"]
|
||||
60 | prev_ds = context["prev_ds"]
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^ AIR301
|
||||
61 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
62 | prev_execution_date = context["prev_execution_date"]
|
||||
|
|
||||
|
||||
AIR302_context.py:61:30: AIR302 `prev_ds_nodash` is removed in Airflow 3.0
|
||||
AIR301_context.py:61:30: AIR301 `prev_ds_nodash` is removed in Airflow 3.0
|
||||
|
|
||||
59 | next_execution_date = context["next_execution_date"]
|
||||
60 | prev_ds = context["prev_ds"]
|
||||
61 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
| ^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
62 | prev_execution_date = context["prev_execution_date"]
|
||||
63 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
|
|
||||
|
||||
AIR302_context.py:62:35: AIR302 `prev_execution_date` is removed in Airflow 3.0
|
||||
AIR301_context.py:62:35: AIR301 `prev_execution_date` is removed in Airflow 3.0
|
||||
|
|
||||
60 | prev_ds = context["prev_ds"]
|
||||
61 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
62 | prev_execution_date = context["prev_execution_date"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
63 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
64 | tomorrow_ds = context["tomorrow_ds"]
|
||||
|
|
||||
|
||||
AIR302_context.py:63:43: AIR302 `prev_execution_date_success` is removed in Airflow 3.0
|
||||
AIR301_context.py:63:43: AIR301 `prev_execution_date_success` is removed in Airflow 3.0
|
||||
|
|
||||
61 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
62 | prev_execution_date = context["prev_execution_date"]
|
||||
63 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
64 | tomorrow_ds = context["tomorrow_ds"]
|
||||
65 | yesterday_ds = context["yesterday_ds"]
|
||||
|
|
||||
|
||||
AIR302_context.py:64:27: AIR302 `tomorrow_ds` is removed in Airflow 3.0
|
||||
AIR301_context.py:64:27: AIR301 `tomorrow_ds` is removed in Airflow 3.0
|
||||
|
|
||||
62 | prev_execution_date = context["prev_execution_date"]
|
||||
63 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
64 | tomorrow_ds = context["tomorrow_ds"]
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
65 | yesterday_ds = context["yesterday_ds"]
|
||||
66 | yesterday_ds_nodash = context["yesterday_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR302_context.py:65:28: AIR302 `yesterday_ds` is removed in Airflow 3.0
|
||||
AIR301_context.py:65:28: AIR301 `yesterday_ds` is removed in Airflow 3.0
|
||||
|
|
||||
63 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
64 | tomorrow_ds = context["tomorrow_ds"]
|
||||
65 | yesterday_ds = context["yesterday_ds"]
|
||||
| ^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
66 | yesterday_ds_nodash = context["yesterday_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR302_context.py:66:35: AIR302 `yesterday_ds_nodash` is removed in Airflow 3.0
|
||||
AIR301_context.py:66:35: AIR301 `yesterday_ds_nodash` is removed in Airflow 3.0
|
||||
|
|
||||
64 | tomorrow_ds = context["tomorrow_ds"]
|
||||
65 | yesterday_ds = context["yesterday_ds"]
|
||||
66 | yesterday_ds_nodash = context["yesterday_ds_nodash"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
|
|
||||
|
||||
AIR302_context.py:73:22: AIR302 `tomorrow_ds` is removed in Airflow 3.0
|
||||
AIR301_context.py:73:22: AIR301 `tomorrow_ds` is removed in Airflow 3.0
|
||||
|
|
||||
71 | """Print the Airflow context and ds variable from the context."""
|
||||
72 | print(ds)
|
||||
73 | print(kwargs.get("tomorrow_ds"))
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
74 | c = get_current_context()
|
||||
75 | c.get("execution_date")
|
||||
|
|
||||
|
||||
AIR302_context.py:75:11: AIR302 `execution_date` is removed in Airflow 3.0
|
||||
AIR301_context.py:75:11: AIR301 `execution_date` is removed in Airflow 3.0
|
||||
|
|
||||
73 | print(kwargs.get("tomorrow_ds"))
|
||||
74 | c = get_current_context()
|
||||
75 | c.get("execution_date")
|
||||
| ^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
|
|
||||
|
||||
AIR302_context.py:87:49: AIR302 `conf` is removed in Airflow 3.0
|
||||
AIR301_context.py:87:49: AIR301 `conf` is removed in Airflow 3.0
|
||||
|
|
||||
85 | @task()
|
||||
86 | def access_invalid_key_task(**context):
|
||||
87 | print("access invalid key", context.get("conf"))
|
||||
| ^^^^^^ AIR302
|
||||
| ^^^^^^ AIR301
|
||||
88 |
|
||||
89 | @task()
|
||||
|
|
||||
|
||||
AIR302_context.py:90:42: AIR302 `execution_date` is removed in Airflow 3.0
|
||||
AIR301_context.py:90:42: AIR301 `execution_date` is removed in Airflow 3.0
|
||||
|
|
||||
89 | @task()
|
||||
90 | def access_invalid_key_explicit_task(execution_date):
|
||||
| ^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
91 | print(execution_date)
|
||||
|
|
||||
|
||||
AIR302_context.py:111:5: AIR302 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
AIR301_context.py:111:5: AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
|
|
||||
109 | with DAG(
|
||||
110 | dag_id="example_dag",
|
||||
111 | schedule_interval="@daily",
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
112 | start_date=datetime(2023, 1, 1),
|
||||
113 | template_searchpath=["/templates"],
|
||||
|
|
||||
|
@ -317,22 +316,22 @@ AIR302_context.py:111:5: AIR302 [*] `schedule_interval` is removed in Airflow 3.
|
|||
113 113 | template_searchpath=["/templates"],
|
||||
114 114 | ) as dag:
|
||||
|
||||
AIR302_context.py:115:13: AIR302 `airflow.operators.dummy.DummyOperator` is removed in Airflow 3.0
|
||||
AIR301_context.py:115:13: AIR301 `airflow.operators.dummy.DummyOperator` is removed in Airflow 3.0
|
||||
|
|
||||
113 | template_searchpath=["/templates"],
|
||||
114 | ) as dag:
|
||||
115 | task1 = DummyOperator(
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
116 | task_id="task1",
|
||||
117 | params={
|
||||
|
|
||||
= help: Use `airflow.operators.empty.EmptyOperator` instead
|
||||
|
||||
AIR302_context.py:135:23: AIR302 `next_ds` is removed in Airflow 3.0
|
||||
AIR301_context.py:135:23: AIR301 `next_ds` is removed in Airflow 3.0
|
||||
|
|
||||
134 | class CustomOperator(BaseOperator):
|
||||
135 | def execute(self, next_ds, context):
|
||||
| ^^^^^^^ AIR302
|
||||
| ^^^^^^^ AIR301
|
||||
136 | execution_date = context["execution_date"]
|
||||
137 | next_ds = context["next_ds"]
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
|
File diff suppressed because it is too large
Load diff
2
ruff.schema.json
generated
2
ruff.schema.json
generated
|
@ -2946,8 +2946,8 @@
|
|||
"AIR002",
|
||||
"AIR3",
|
||||
"AIR30",
|
||||
"AIR301",
|
||||
"AIR302",
|
||||
"AIR303",
|
||||
"ALL",
|
||||
"ANN",
|
||||
"ANN0",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue