mirror of https://github.com/astral-sh/ruff
[`airflow`] replace wrong path `airflow.io.stroage` as `airflow.io.store` (`AIR311`) (#20081)
## Summary `airflow.io.storage` is not the correct path. it should be `airflow.io.store` instead
This commit is contained in:
parent
a04823cfad
commit
db423ee978
|
|
@ -34,7 +34,7 @@ task_group()
|
||||||
setup()
|
setup()
|
||||||
from airflow.decorators import teardown
|
from airflow.decorators import teardown
|
||||||
from airflow.io.path import ObjectStoragePath
|
from airflow.io.path import ObjectStoragePath
|
||||||
from airflow.io.storage import attach
|
from airflow.io.store import attach
|
||||||
from airflow.models import DAG as DAGFromModel
|
from airflow.models import DAG as DAGFromModel
|
||||||
from airflow.models import (
|
from airflow.models import (
|
||||||
Connection,
|
Connection,
|
||||||
|
|
|
||||||
|
|
@ -233,7 +233,7 @@ fn check_name(checker: &Checker, expr: &Expr, range: TextRange) {
|
||||||
module: "airflow.sdk",
|
module: "airflow.sdk",
|
||||||
name: "ObjectStoragePath".to_string(),
|
name: "ObjectStoragePath".to_string(),
|
||||||
},
|
},
|
||||||
["airflow", "io", "storage", "attach"] => Replacement::SourceModuleMoved {
|
["airflow", "io", "store", "attach"] => Replacement::SourceModuleMoved {
|
||||||
module: "airflow.sdk.io",
|
module: "airflow.sdk.io",
|
||||||
name: "attach".to_string(),
|
name: "attach".to_string(),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -312,7 +312,7 @@ help: Use `teardown` from `airflow.sdk` instead.
|
||||||
34 34 | setup()
|
34 34 | setup()
|
||||||
35 |-from airflow.decorators import teardown
|
35 |-from airflow.decorators import teardown
|
||||||
36 35 | from airflow.io.path import ObjectStoragePath
|
36 35 | from airflow.io.path import ObjectStoragePath
|
||||||
37 36 | from airflow.io.storage import attach
|
37 36 | from airflow.io.store import attach
|
||||||
38 37 | from airflow.models import DAG as DAGFromModel
|
38 37 | from airflow.models import DAG as DAGFromModel
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
43 42 | from airflow.models.baseoperator import chain, chain_linear, cross_downstream
|
43 42 | from airflow.models.baseoperator import chain, chain_linear, cross_downstream
|
||||||
|
|
@ -338,7 +338,7 @@ help: Use `ObjectStoragePath` from `airflow.sdk` instead.
|
||||||
34 34 | setup()
|
34 34 | setup()
|
||||||
35 35 | from airflow.decorators import teardown
|
35 35 | from airflow.decorators import teardown
|
||||||
36 |-from airflow.io.path import ObjectStoragePath
|
36 |-from airflow.io.path import ObjectStoragePath
|
||||||
37 36 | from airflow.io.storage import attach
|
37 36 | from airflow.io.store import attach
|
||||||
38 37 | from airflow.models import DAG as DAGFromModel
|
38 37 | from airflow.models import DAG as DAGFromModel
|
||||||
39 38 | from airflow.models import (
|
39 38 | from airflow.models import (
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
@ -350,7 +350,7 @@ help: Use `ObjectStoragePath` from `airflow.sdk` instead.
|
||||||
47 47 | # airflow.decorators
|
47 47 | # airflow.decorators
|
||||||
48 48 | teardown()
|
48 48 | teardown()
|
||||||
|
|
||||||
AIR311 [*] `airflow.io.storage.attach` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
AIR311 [*] `airflow.io.store.attach` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||||
--> AIR311_names.py:52:1
|
--> AIR311_names.py:52:1
|
||||||
|
|
|
|
||||||
50 | # # airflow.io
|
50 | # # airflow.io
|
||||||
|
|
@ -366,7 +366,7 @@ help: Use `attach` from `airflow.sdk.io` instead.
|
||||||
34 34 | setup()
|
34 34 | setup()
|
||||||
35 35 | from airflow.decorators import teardown
|
35 35 | from airflow.decorators import teardown
|
||||||
36 36 | from airflow.io.path import ObjectStoragePath
|
36 36 | from airflow.io.path import ObjectStoragePath
|
||||||
37 |-from airflow.io.storage import attach
|
37 |-from airflow.io.store import attach
|
||||||
38 37 | from airflow.models import DAG as DAGFromModel
|
38 37 | from airflow.models import DAG as DAGFromModel
|
||||||
39 38 | from airflow.models import (
|
39 38 | from airflow.models import (
|
||||||
40 39 | Connection,
|
40 39 | Connection,
|
||||||
|
|
@ -391,7 +391,7 @@ AIR311 [*] `airflow.models.Connection` is removed in Airflow 3.0; It still works
|
||||||
help: Use `Connection` from `airflow.sdk` instead.
|
help: Use `Connection` from `airflow.sdk` instead.
|
||||||
|
|
||||||
ℹ Unsafe fix
|
ℹ Unsafe fix
|
||||||
37 37 | from airflow.io.storage import attach
|
37 37 | from airflow.io.store import attach
|
||||||
38 38 | from airflow.models import DAG as DAGFromModel
|
38 38 | from airflow.models import DAG as DAGFromModel
|
||||||
39 39 | from airflow.models import (
|
39 39 | from airflow.models import (
|
||||||
40 |- Connection,
|
40 |- Connection,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue