Compare commits
200 Commits
alex/thinn
...
david/fix-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e52fa2fab | ||
|
|
bbfcf6e111 | ||
|
|
5518c84ab3 | ||
|
|
c71ce006c4 | ||
|
|
2f3bf03d82 | ||
|
|
24a6d247f1 | ||
|
|
88f7644551 | ||
|
|
6be46033b9 | ||
|
|
9e292f1522 | ||
|
|
74b60212dc | ||
|
|
bfe501b802 | ||
|
|
6f2b874d6c | ||
|
|
17dc2e4d80 | ||
|
|
694e7ed52e | ||
|
|
fe953e5c5c | ||
|
|
0bf5d2a204 | ||
|
|
8eb8d25565 | ||
|
|
9b1b58a451 | ||
|
|
fa7798ddd9 | ||
|
|
8223fea062 | ||
|
|
5a608f7366 | ||
|
|
c2d7c673ca | ||
|
|
8a6db4f257 | ||
|
|
ffcdd4ea42 | ||
|
|
0ff0c70302 | ||
|
|
f77315776c | ||
|
|
04dc223710 | ||
|
|
0d7ed32494 | ||
|
|
4ca38b2974 | ||
|
|
a8039f80f0 | ||
|
|
5c2d4d8d8f | ||
|
|
26082e8ec1 | ||
|
|
b6522cb534 | ||
|
|
637a2b1170 | ||
|
|
3927b0c931 | ||
|
|
ca1f66a657 | ||
|
|
166b63ad4d | ||
|
|
9363eeca26 | ||
|
|
f4362b95d7 | ||
|
|
f703536977 | ||
|
|
1842cfe333 | ||
|
|
b3c4005289 | ||
|
|
c2bc15bc15 | ||
|
|
e586f6dcc4 | ||
|
|
76a6b7e3e2 | ||
|
|
1ce65714c0 | ||
|
|
d9aaacd01f | ||
|
|
18eaa659c1 | ||
|
|
af259faed5 | ||
|
|
d75ef3823c | ||
|
|
89ca493fd9 | ||
|
|
4b80f5fa4f | ||
|
|
5663426d73 | ||
|
|
0b3548755c | ||
|
|
ce1dc21e7e | ||
|
|
7d0c8e045c | ||
|
|
d71518b369 | ||
|
|
9ab276b345 | ||
|
|
a60fb3f2c8 | ||
|
|
f558bf721c | ||
|
|
ea1c080881 | ||
|
|
73720c73be | ||
|
|
136abace92 | ||
|
|
bc7274d148 | ||
|
|
911d5cc973 | ||
|
|
8d6dc7d3a3 | ||
|
|
ef4897f9f3 | ||
|
|
ecf3c4ca11 | ||
|
|
33c5f6f4f8 | ||
|
|
ba47010150 | ||
|
|
db423ee978 | ||
|
|
a04823cfad | ||
|
|
d0bcf56bd9 | ||
|
|
f9bbee33f6 | ||
|
|
376e3ff395 | ||
|
|
b57cc5be33 | ||
|
|
3c1fe12259 | ||
|
|
e4289deb5a | ||
|
|
dbbcb7f452 | ||
|
|
c6dfdb1d39 | ||
|
|
c65029f9a5 | ||
|
|
a0bba718f6 | ||
|
|
1eab4dbd95 | ||
|
|
3eb3c3572b | ||
|
|
41bb24a87e | ||
|
|
87f0da139a | ||
|
|
f9bfc9ab5b | ||
|
|
59f7102606 | ||
|
|
862d2d0687 | ||
|
|
48edf46f3b | ||
|
|
ec86a4e960 | ||
|
|
e7237652a9 | ||
|
|
205eae14d2 | ||
|
|
f407f12f4c | ||
|
|
fb2d0af18c | ||
|
|
8ead02e0b1 | ||
|
|
330bb4efbf | ||
|
|
ad8c98117a | ||
|
|
06dbec8479 | ||
|
|
85931ab594 | ||
|
|
b3cc733f06 | ||
|
|
7abc41727b | ||
|
|
886c4e4773 | ||
|
|
bc6ea68733 | ||
|
|
796819e7a0 | ||
|
|
5508e8e528 | ||
|
|
0be3e1fbbf | ||
|
|
5d217b7f46 | ||
|
|
0b6ce1c788 | ||
|
|
0e9d77e43a | ||
|
|
8b827c3c6c | ||
|
|
c22395dbc6 | ||
|
|
11f521c768 | ||
|
|
c5e05df966 | ||
|
|
7a44ea680e | ||
|
|
f82025d919 | ||
|
|
365f521c37 | ||
|
|
fc5321e000 | ||
|
|
c68ff8d90b | ||
|
|
5931a5207d | ||
|
|
692be72f5a | ||
|
|
14fe1228e7 | ||
|
|
045cba382a | ||
|
|
a5cbca156c | ||
|
|
d43a3d34dd | ||
|
|
99111961c0 | ||
|
|
859475f017 | ||
|
|
7b75aee21d | ||
|
|
d04dcd991b | ||
|
|
39ee71c2a5 | ||
|
|
1a38831d53 | ||
|
|
ddd4bab67c | ||
|
|
468eb37d75 | ||
|
|
2e9c241d7e | ||
|
|
05478d5cc7 | ||
|
|
4db20f459c | ||
|
|
ec7c2efef9 | ||
|
|
79b2754215 | ||
|
|
a0ddf1f7c4 | ||
|
|
5b00ec981b | ||
|
|
306ef3bb02 | ||
|
|
a4cd13c6e2 | ||
|
|
e0c98874e2 | ||
|
|
f4be05a83b | ||
|
|
1d2128f918 | ||
|
|
276405b44e | ||
|
|
f019cfd15f | ||
|
|
33030b34cd | ||
|
|
656fc335f2 | ||
|
|
e0f4cec7a1 | ||
|
|
662d18bd05 | ||
|
|
c82e255ca8 | ||
|
|
58efd19f11 | ||
|
|
c6dcfe36d0 | ||
|
|
59b078b1bf | ||
|
|
5e943d3539 | ||
|
|
0967e7e088 | ||
|
|
600245478c | ||
|
|
e5c091b850 | ||
|
|
10301f6190 | ||
|
|
4242905b36 | ||
|
|
c20d906503 | ||
|
|
a04375173c | ||
|
|
e6dcdd29f2 | ||
|
|
24f6d2dc13 | ||
|
|
3314cf90ed | ||
|
|
0cb1abc1fc | ||
|
|
f6491cacd1 | ||
|
|
e4f1b587cc | ||
|
|
fbf24be8ae | ||
|
|
5e4fa9e442 | ||
|
|
67529edad6 | ||
|
|
4ac2b2c222 | ||
|
|
083bb85d9d | ||
|
|
c7af595fc1 | ||
|
|
7d8f7c20da | ||
|
|
76c933d10e | ||
|
|
d423191d94 | ||
|
|
c8d155b2b9 | ||
|
|
a5339a52c3 | ||
|
|
48772c04d7 | ||
|
|
510a07dee2 | ||
|
|
47d44e5f7b | ||
|
|
ec3163781c | ||
|
|
b892e4548e | ||
|
|
9ac39cee98 | ||
|
|
f4d8826428 | ||
|
|
527a690a73 | ||
|
|
f0e9c1d8f9 | ||
|
|
2e1d6623cd | ||
|
|
2dc2f68b0f | ||
|
|
26d6c3831f | ||
|
|
9ced219ffc | ||
|
|
f344dda82c | ||
|
|
6de84ed56e | ||
|
|
bd4506aac5 | ||
|
|
0e5577ab56 | ||
|
|
957320c0f1 | ||
|
|
f6093452ed | ||
|
|
82350a398e |
16
.github/workflows/build-binaries.yml
vendored
16
.github/workflows/build-binaries.yml
vendored
@@ -49,7 +49,7 @@ jobs:
|
||||
- name: "Prep README.md"
|
||||
run: python scripts/transform_readme.py --target pypi
|
||||
- name: "Build sdist"
|
||||
uses: PyO3/maturin-action@e10f6c464b90acceb5f640d31beda6d586ba7b4a # v1.49.3
|
||||
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
|
||||
with:
|
||||
command: sdist
|
||||
args: --out dist
|
||||
@@ -79,7 +79,7 @@ jobs:
|
||||
- name: "Prep README.md"
|
||||
run: python scripts/transform_readme.py --target pypi
|
||||
- name: "Build wheels - x86_64"
|
||||
uses: PyO3/maturin-action@e10f6c464b90acceb5f640d31beda6d586ba7b4a # v1.49.3
|
||||
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
|
||||
with:
|
||||
target: x86_64
|
||||
args: --release --locked --out dist
|
||||
@@ -121,7 +121,7 @@ jobs:
|
||||
- name: "Prep README.md"
|
||||
run: python scripts/transform_readme.py --target pypi
|
||||
- name: "Build wheels - aarch64"
|
||||
uses: PyO3/maturin-action@e10f6c464b90acceb5f640d31beda6d586ba7b4a # v1.49.3
|
||||
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
|
||||
with:
|
||||
target: aarch64
|
||||
args: --release --locked --out dist
|
||||
@@ -177,7 +177,7 @@ jobs:
|
||||
- name: "Prep README.md"
|
||||
run: python scripts/transform_readme.py --target pypi
|
||||
- name: "Build wheels"
|
||||
uses: PyO3/maturin-action@e10f6c464b90acceb5f640d31beda6d586ba7b4a # v1.49.3
|
||||
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
|
||||
with:
|
||||
target: ${{ matrix.platform.target }}
|
||||
args: --release --locked --out dist
|
||||
@@ -230,7 +230,7 @@ jobs:
|
||||
- name: "Prep README.md"
|
||||
run: python scripts/transform_readme.py --target pypi
|
||||
- name: "Build wheels"
|
||||
uses: PyO3/maturin-action@e10f6c464b90acceb5f640d31beda6d586ba7b4a # v1.49.3
|
||||
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
manylinux: auto
|
||||
@@ -306,7 +306,7 @@ jobs:
|
||||
- name: "Prep README.md"
|
||||
run: python scripts/transform_readme.py --target pypi
|
||||
- name: "Build wheels"
|
||||
uses: PyO3/maturin-action@e10f6c464b90acceb5f640d31beda6d586ba7b4a # v1.49.3
|
||||
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
|
||||
with:
|
||||
target: ${{ matrix.platform.target }}
|
||||
manylinux: auto
|
||||
@@ -372,7 +372,7 @@ jobs:
|
||||
- name: "Prep README.md"
|
||||
run: python scripts/transform_readme.py --target pypi
|
||||
- name: "Build wheels"
|
||||
uses: PyO3/maturin-action@e10f6c464b90acceb5f640d31beda6d586ba7b4a # v1.49.3
|
||||
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
manylinux: musllinux_1_2
|
||||
@@ -437,7 +437,7 @@ jobs:
|
||||
- name: "Prep README.md"
|
||||
run: python scripts/transform_readme.py --target pypi
|
||||
- name: "Build wheels"
|
||||
uses: PyO3/maturin-action@e10f6c464b90acceb5f640d31beda6d586ba7b4a # v1.49.3
|
||||
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
|
||||
with:
|
||||
target: ${{ matrix.platform.target }}
|
||||
manylinux: musllinux_1_2
|
||||
|
||||
30
.github/workflows/ci.yaml
vendored
30
.github/workflows/ci.yaml
vendored
@@ -250,7 +250,7 @@ jobs:
|
||||
- name: "Install Rust toolchain"
|
||||
run: rustup show
|
||||
- name: "Install mold"
|
||||
uses: rui314/setup-mold@7344740a9418dcdcb481c7df83d9fbd1d5072d7d # v1
|
||||
uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
|
||||
- name: "Install cargo nextest"
|
||||
uses: taiki-e/install-action@6064345e6658255e90e9500fdf9a06ab77e6909c # v2.57.6
|
||||
with:
|
||||
@@ -308,7 +308,7 @@ jobs:
|
||||
- name: "Install Rust toolchain"
|
||||
run: rustup show
|
||||
- name: "Install mold"
|
||||
uses: rui314/setup-mold@7344740a9418dcdcb481c7df83d9fbd1d5072d7d # v1
|
||||
uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
|
||||
- name: "Install cargo nextest"
|
||||
uses: taiki-e/install-action@6064345e6658255e90e9500fdf9a06ab77e6909c # v2.57.6
|
||||
with:
|
||||
@@ -393,7 +393,7 @@ jobs:
|
||||
- name: "Install Rust toolchain"
|
||||
run: rustup show
|
||||
- name: "Install mold"
|
||||
uses: rui314/setup-mold@7344740a9418dcdcb481c7df83d9fbd1d5072d7d # v1
|
||||
uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
|
||||
- name: "Build"
|
||||
run: cargo build --release --locked
|
||||
|
||||
@@ -418,7 +418,7 @@ jobs:
|
||||
MSRV: ${{ steps.msrv.outputs.value }}
|
||||
run: rustup default "${MSRV}"
|
||||
- name: "Install mold"
|
||||
uses: rui314/setup-mold@7344740a9418dcdcb481c7df83d9fbd1d5072d7d # v1
|
||||
uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
|
||||
- name: "Build tests"
|
||||
shell: bash
|
||||
env:
|
||||
@@ -441,7 +441,7 @@ jobs:
|
||||
- name: "Install Rust toolchain"
|
||||
run: rustup show
|
||||
- name: "Install cargo-binstall"
|
||||
uses: cargo-bins/cargo-binstall@79e4beb1e02f733a26129a6bf26c37dab4ab3307 # v1.14.4
|
||||
uses: cargo-bins/cargo-binstall@2bb61346d075e720d4c3da92f23b6d612d5a7543 # v1.15.3
|
||||
with:
|
||||
tool: cargo-fuzz@0.11.2
|
||||
- name: "Install cargo-fuzz"
|
||||
@@ -463,7 +463,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||
name: Download Ruff binary to test
|
||||
id: download-cached-binary
|
||||
@@ -664,7 +664,7 @@ jobs:
|
||||
branch: ${{ github.event.pull_request.base.ref }}
|
||||
workflow: "ci.yaml"
|
||||
check_artifacts: true
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- name: Fuzz
|
||||
env:
|
||||
FORCE_COLOR: 1
|
||||
@@ -694,7 +694,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: cargo-bins/cargo-binstall@79e4beb1e02f733a26129a6bf26c37dab4ab3307 # v1.14.4
|
||||
- uses: cargo-bins/cargo-binstall@2bb61346d075e720d4c3da92f23b6d612d5a7543 # v1.15.3
|
||||
- run: cargo binstall --no-confirm cargo-shear
|
||||
- run: cargo shear
|
||||
|
||||
@@ -715,7 +715,7 @@ jobs:
|
||||
- name: "Prep README.md"
|
||||
run: python scripts/transform_readme.py --target pypi
|
||||
- name: "Build wheels"
|
||||
uses: PyO3/maturin-action@e10f6c464b90acceb5f640d31beda6d586ba7b4a # v1.49.3
|
||||
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
|
||||
with:
|
||||
args: --out dist
|
||||
- name: "Test wheel"
|
||||
@@ -734,7 +734,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
@@ -777,7 +777,7 @@ jobs:
|
||||
- name: "Install Rust toolchain"
|
||||
run: rustup show
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- name: "Install Insiders dependencies"
|
||||
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }}
|
||||
run: uv pip install -r docs/requirements-insiders.txt --system
|
||||
@@ -909,7 +909,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
|
||||
- name: "Install Rust toolchain"
|
||||
run: rustup show
|
||||
@@ -923,7 +923,7 @@ jobs:
|
||||
run: cargo codspeed build --features "codspeed,instrumented" --no-default-features -p ruff_benchmark
|
||||
|
||||
- name: "Run benchmarks"
|
||||
uses: CodSpeedHQ/action@0b6e7a3d96c9d2a6057e7bcea6b45aaf2f7ce60b # v3.8.0
|
||||
uses: CodSpeedHQ/action@76578c2a7ddd928664caa737f0e962e3085d4e7c # v3.8.1
|
||||
with:
|
||||
run: cargo codspeed run
|
||||
token: ${{ secrets.CODSPEED_TOKEN }}
|
||||
@@ -942,7 +942,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
|
||||
- name: "Install Rust toolchain"
|
||||
run: rustup show
|
||||
@@ -956,7 +956,7 @@ jobs:
|
||||
run: cargo codspeed build --features "codspeed,walltime" --no-default-features -p ruff_benchmark
|
||||
|
||||
- name: "Run benchmarks"
|
||||
uses: CodSpeedHQ/action@0b6e7a3d96c9d2a6057e7bcea6b45aaf2f7ce60b # v3.8.0
|
||||
uses: CodSpeedHQ/action@76578c2a7ddd928664caa737f0e962e3085d4e7c # v3.8.1
|
||||
with:
|
||||
run: cargo codspeed run
|
||||
token: ${{ secrets.CODSPEED_TOKEN }}
|
||||
|
||||
4
.github/workflows/daily_fuzz.yaml
vendored
4
.github/workflows/daily_fuzz.yaml
vendored
@@ -34,11 +34,11 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- name: "Install Rust toolchain"
|
||||
run: rustup show
|
||||
- name: "Install mold"
|
||||
uses: rui314/setup-mold@7344740a9418dcdcb481c7df83d9fbd1d5072d7d # v1
|
||||
uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
|
||||
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
|
||||
- name: Build ruff
|
||||
# A debug build means the script runs slower once it gets started,
|
||||
|
||||
5
.github/workflows/mypy_primer.yaml
vendored
5
.github/workflows/mypy_primer.yaml
vendored
@@ -11,6 +11,7 @@ on:
|
||||
- "crates/ruff_python_parser"
|
||||
- ".github/workflows/mypy_primer.yaml"
|
||||
- ".github/workflows/mypy_primer_comment.yaml"
|
||||
- "scripts/mypy_primer.sh"
|
||||
- "Cargo.lock"
|
||||
- "!**.md"
|
||||
|
||||
@@ -38,7 +39,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
|
||||
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
|
||||
with:
|
||||
@@ -81,7 +82,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
|
||||
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
|
||||
with:
|
||||
|
||||
2
.github/workflows/publish-pypi.yml
vendored
2
.github/workflows/publish-pypi.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
id-token: write
|
||||
steps:
|
||||
- name: "Install uv"
|
||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||
with:
|
||||
pattern: wheels-*
|
||||
|
||||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -61,7 +61,7 @@ jobs:
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f
|
||||
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
|
||||
with:
|
||||
persist-credentials: false
|
||||
submodules: recursive
|
||||
@@ -124,7 +124,7 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json
|
||||
steps:
|
||||
- uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f
|
||||
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
|
||||
with:
|
||||
persist-credentials: false
|
||||
submodules: recursive
|
||||
@@ -175,7 +175,7 @@ jobs:
|
||||
outputs:
|
||||
val: ${{ steps.host.outputs.manifest }}
|
||||
steps:
|
||||
- uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f
|
||||
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
|
||||
with:
|
||||
persist-credentials: false
|
||||
submodules: recursive
|
||||
@@ -251,7 +251,7 @@ jobs:
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f
|
||||
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
|
||||
with:
|
||||
persist-credentials: false
|
||||
submodules: recursive
|
||||
|
||||
6
.github/workflows/sync_typeshed.yaml
vendored
6
.github/workflows/sync_typeshed.yaml
vendored
@@ -65,7 +65,7 @@ jobs:
|
||||
run: |
|
||||
git config --global user.name typeshedbot
|
||||
git config --global user.email '<>'
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- name: Sync typeshed stubs
|
||||
run: |
|
||||
rm -rf "ruff/${VENDORED_TYPESHED}"
|
||||
@@ -117,7 +117,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: true
|
||||
ref: ${{ env.UPSTREAM_BRANCH}}
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- name: Setup git
|
||||
run: |
|
||||
git config --global user.name typeshedbot
|
||||
@@ -155,7 +155,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: true
|
||||
ref: ${{ env.UPSTREAM_BRANCH}}
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- name: Setup git
|
||||
run: |
|
||||
git config --global user.name typeshedbot
|
||||
|
||||
2
.github/workflows/ty-ecosystem-analyzer.yaml
vendored
2
.github/workflows/ty-ecosystem-analyzer.yaml
vendored
@@ -33,7 +33,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
|
||||
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
|
||||
with:
|
||||
|
||||
2
.github/workflows/ty-ecosystem-report.yaml
vendored
2
.github/workflows/ty-ecosystem-report.yaml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
|
||||
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
|
||||
with:
|
||||
|
||||
11
.github/workflows/typing_conformance.yaml
vendored
11
.github/workflows/typing_conformance.yaml
vendored
@@ -54,6 +54,9 @@ jobs:
|
||||
|
||||
- name: Compute diagnostic diff
|
||||
shell: bash
|
||||
env:
|
||||
# TODO: Remove this once we fixed the remaining panics in the conformance suite.
|
||||
TY_MAX_PARALLELISM: 1
|
||||
run: |
|
||||
RUFF_DIR="$GITHUB_WORKSPACE/ruff"
|
||||
|
||||
@@ -63,15 +66,15 @@ jobs:
|
||||
|
||||
echo "new commit"
|
||||
git rev-list --format=%s --max-count=1 "$GITHUB_SHA"
|
||||
cargo build --release --bin ty
|
||||
mv target/release/ty ty-new
|
||||
cargo build --bin ty
|
||||
mv target/debug/ty ty-new
|
||||
|
||||
MERGE_BASE="$(git merge-base "$GITHUB_SHA" "origin/$GITHUB_BASE_REF")"
|
||||
git checkout -b old_commit "$MERGE_BASE"
|
||||
echo "old commit (merge base)"
|
||||
git rev-list --format=%s --max-count=1 old_commit
|
||||
cargo build --release --bin ty
|
||||
mv target/release/ty ty-old
|
||||
cargo build --bin ty
|
||||
mv target/debug/ty ty-old
|
||||
)
|
||||
|
||||
(
|
||||
|
||||
74
CHANGELOG.md
74
CHANGELOG.md
@@ -1,5 +1,56 @@
|
||||
# Changelog
|
||||
|
||||
## 0.12.11
|
||||
|
||||
### Preview features
|
||||
|
||||
- \[`airflow`\] Extend `AIR311` and `AIR312` rules ([#20082](https://github.com/astral-sh/ruff/pull/20082))
|
||||
- \[`airflow`\] Replace wrong path `airflow.io.storage` with `airflow.io.store` (`AIR311`) ([#20081](https://github.com/astral-sh/ruff/pull/20081))
|
||||
- \[`flake8-async`\] Implement `blocking-http-call-httpx-in-async-function` (`ASYNC212`) ([#20091](https://github.com/astral-sh/ruff/pull/20091))
|
||||
- \[`flake8-logging-format`\] Add auto-fix for f-string logging calls (`G004`) ([#19303](https://github.com/astral-sh/ruff/pull/19303))
|
||||
- \[`flake8-use-pathlib`\] Add autofix for `PTH211` ([#20009](https://github.com/astral-sh/ruff/pull/20009))
|
||||
- \[`flake8-use-pathlib`\] Make `PTH100` fix unsafe because it can change behavior ([#20100](https://github.com/astral-sh/ruff/pull/20100))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- \[`pyflakes`, `pylint`\] Fix false positives caused by `__class__` cell handling (`F841`, `PLE0117`) ([#20048](https://github.com/astral-sh/ruff/pull/20048))
|
||||
- \[`pyflakes`\] Fix `allowed-unused-imports` matching for top-level modules (`F401`) ([#20115](https://github.com/astral-sh/ruff/pull/20115))
|
||||
- \[`ruff`\] Fix false positive for t-strings in `default-factory-kwarg` (`RUF026`) ([#20032](https://github.com/astral-sh/ruff/pull/20032))
|
||||
- \[`ruff`\] Preserve relative whitespace in multi-line expressions (`RUF033`) ([#19647](https://github.com/astral-sh/ruff/pull/19647))
|
||||
|
||||
### Rule changes
|
||||
|
||||
- \[`ruff`\] Handle empty t-strings in `unnecessary-empty-iterable-within-deque-call` (`RUF037`) ([#20045](https://github.com/astral-sh/ruff/pull/20045))
|
||||
|
||||
### Documentation
|
||||
|
||||
- Fix incorrect `D413` links in docstrings convention FAQ ([#20089](https://github.com/astral-sh/ruff/pull/20089))
|
||||
- \[`flake8-use-pathlib`\] Update links to the table showing the correspondence between `os` and `pathlib` ([#20103](https://github.com/astral-sh/ruff/pull/20103))
|
||||
|
||||
## 0.12.10
|
||||
|
||||
### Preview features
|
||||
|
||||
- \[`flake8-simplify`\] Implement fix for `maxsplit` without separator (`SIM905`) ([#19851](https://github.com/astral-sh/ruff/pull/19851))
|
||||
- \[`flake8-use-pathlib`\] Add fixes for `PTH102` and `PTH103` ([#19514](https://github.com/astral-sh/ruff/pull/19514))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- \[`isort`\] Handle multiple continuation lines after module docstring (`I002`) ([#19818](https://github.com/astral-sh/ruff/pull/19818))
|
||||
- \[`pyupgrade`\] Avoid reporting `__future__` features as unnecessary when they are used (`UP010`) ([#19769](https://github.com/astral-sh/ruff/pull/19769))
|
||||
- \[`pyupgrade`\] Handle nested `Optional`s (`UP045`) ([#19770](https://github.com/astral-sh/ruff/pull/19770))
|
||||
|
||||
### Rule changes
|
||||
|
||||
- \[`pycodestyle`\] Make `E731` fix unsafe instead of display-only for class assignments ([#19700](https://github.com/astral-sh/ruff/pull/19700))
|
||||
- \[`pyflakes`\] Add secondary annotation showing previous definition (`F811`) ([#19900](https://github.com/astral-sh/ruff/pull/19900))
|
||||
|
||||
### Documentation
|
||||
|
||||
- Fix description of global config file discovery strategy ([#19188](https://github.com/astral-sh/ruff/pull/19188))
|
||||
- Update outdated links to <https://typing.python.org/en/latest/source/stubs.html> ([#19992](https://github.com/astral-sh/ruff/pull/19992))
|
||||
- \[`flake8-annotations`\] Remove unused import in example (`ANN401`) ([#20000](https://github.com/astral-sh/ruff/pull/20000))
|
||||
|
||||
## 0.12.9
|
||||
|
||||
### Preview features
|
||||
@@ -24,8 +75,31 @@
|
||||
### Other changes
|
||||
|
||||
- Build `riscv64` binaries for release ([#19819](https://github.com/astral-sh/ruff/pull/19819))
|
||||
|
||||
- Add rule code to error description in GitLab output ([#19896](https://github.com/astral-sh/ruff/pull/19896))
|
||||
|
||||
- Improve rendering of the `full` output format ([#19415](https://github.com/astral-sh/ruff/pull/19415))
|
||||
|
||||
Below is an example diff for [`F401`](https://docs.astral.sh/ruff/rules/unused-import/):
|
||||
|
||||
```diff
|
||||
-unused.py:8:19: F401 [*] `pathlib` imported but unused
|
||||
+F401 [*] `pathlib` imported but unused
|
||||
+ --> unused.py:8:19
|
||||
|
|
||||
7 | # Unused, _not_ marked as required (due to the alias).
|
||||
8 | import pathlib as non_alias
|
||||
- | ^^^^^^^^^ F401
|
||||
+ | ^^^^^^^^^
|
||||
9 |
|
||||
10 | # Unused, marked as required.
|
||||
|
|
||||
- = help: Remove unused import: `pathlib`
|
||||
+help: Remove unused import: `pathlib`
|
||||
```
|
||||
|
||||
For now, the primary difference is the movement of the filename, line number, and column information to a second line in the header. This new representation will allow us to make further additions to Ruff's diagnostics, such as adding sub-diagnostics and multiple annotations to the same snippet.
|
||||
|
||||
## 0.12.8
|
||||
|
||||
### Preview features
|
||||
|
||||
209
Cargo.lock
generated
209
Cargo.lock
generated
@@ -128,9 +128,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.98"
|
||||
version = "1.0.99"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
|
||||
checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100"
|
||||
|
||||
[[package]]
|
||||
name = "approx"
|
||||
@@ -257,9 +257,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "2.9.1"
|
||||
version = "2.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
|
||||
checksum = "34efbcccd345379ca2868b2b2c9d3782e9cc58ba87bc7d79d5b53d9c9ae6f25d"
|
||||
|
||||
[[package]]
|
||||
name = "bitvec"
|
||||
@@ -295,7 +295,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"regex-automata 0.4.9",
|
||||
"regex-automata 0.4.10",
|
||||
"serde",
|
||||
]
|
||||
|
||||
@@ -322,9 +322,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "camino"
|
||||
version = "1.1.11"
|
||||
version = "1.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d07aa9a93b00c76f71bc35d598bed923f6d4f3a9ca5c24b7737ae1a292841c0"
|
||||
checksum = "dd0b03af37dad7a14518b7691d81acb0f8222604ad3d1b02f6b4bed5188c0cd5"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
@@ -408,9 +408,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.43"
|
||||
version = "4.5.46"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "50fd97c9dc2399518aa331917ac6f274280ec5eb34e555dd291899745c48ec6f"
|
||||
checksum = "2c5e4fcf9c21d2e544ca1ee9d8552de13019a42aa7dbf32747fa7aaf1df76e57"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
"clap_derive",
|
||||
@@ -418,9 +418,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.5.43"
|
||||
version = "4.5.46"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c35b5830294e1fa0462034af85cc95225a4cb07092c088c55bda3147cfcd8f65"
|
||||
checksum = "fecb53a0e6fcfb055f686001bc2e2592fa527efaf38dbe81a6a9563562e57d41"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
@@ -461,9 +461,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap_derive"
|
||||
version = "4.5.41"
|
||||
version = "4.5.45"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491"
|
||||
checksum = "14cb31bb0a7d536caef2639baa7fad459e15c3144efefa6dbd1c84562c4739f6"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
@@ -485,7 +485,7 @@ checksum = "85a8ab73a1c02b0c15597b22e09c7dc36e63b2f601f9d1e83ac0c3decd38b1ae"
|
||||
dependencies = [
|
||||
"nix 0.29.0",
|
||||
"terminfo",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
"which",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
@@ -1084,14 +1084,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "filetime"
|
||||
version = "0.2.25"
|
||||
version = "0.2.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586"
|
||||
checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"libredox",
|
||||
"windows-sys 0.59.0",
|
||||
"windows-sys 0.60.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1118,9 +1118,9 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
|
||||
|
||||
[[package]]
|
||||
name = "form_urlencoded"
|
||||
version = "1.2.1"
|
||||
version = "1.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
|
||||
checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
|
||||
dependencies = [
|
||||
"percent-encoding",
|
||||
]
|
||||
@@ -1218,9 +1218,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "glob"
|
||||
version = "0.3.2"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
|
||||
checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
|
||||
|
||||
[[package]]
|
||||
name = "globset"
|
||||
@@ -1231,7 +1231,7 @@ dependencies = [
|
||||
"aho-corasick",
|
||||
"bstr",
|
||||
"log",
|
||||
"regex-automata 0.4.9",
|
||||
"regex-automata 0.4.10",
|
||||
"regex-syntax 0.8.5",
|
||||
]
|
||||
|
||||
@@ -1241,7 +1241,7 @@ version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"ignore",
|
||||
"walkdir",
|
||||
]
|
||||
@@ -1430,9 +1430,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
||||
|
||||
[[package]]
|
||||
name = "idna"
|
||||
version = "1.0.3"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e"
|
||||
checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
|
||||
dependencies = [
|
||||
"idna_adapter",
|
||||
"smallvec",
|
||||
@@ -1459,7 +1459,7 @@ dependencies = [
|
||||
"globset",
|
||||
"log",
|
||||
"memchr",
|
||||
"regex-automata 0.4.9",
|
||||
"regex-automata 0.4.10",
|
||||
"same-file",
|
||||
"walkdir",
|
||||
"winapi-util",
|
||||
@@ -1486,9 +1486,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.10.0"
|
||||
version = "2.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661"
|
||||
checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown 0.15.5",
|
||||
@@ -1521,7 +1521,7 @@ version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"inotify-sys",
|
||||
"libc",
|
||||
]
|
||||
@@ -1764,9 +1764,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.174"
|
||||
version = "0.2.175"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
|
||||
checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"
|
||||
|
||||
[[package]]
|
||||
name = "libcst"
|
||||
@@ -1780,7 +1780,7 @@ dependencies = [
|
||||
"paste",
|
||||
"peg",
|
||||
"regex",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1795,9 +1795,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libmimalloc-sys"
|
||||
version = "0.1.43"
|
||||
version = "0.1.44"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bf88cd67e9de251c1781dbe2f641a1a3ad66eaae831b8a2c38fbdc5ddae16d4d"
|
||||
checksum = "667f4fec20f29dfc6bc7357c582d91796c169ad7e2fce709468aefeb2c099870"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
@@ -1809,7 +1809,7 @@ version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"libc",
|
||||
"redox_syscall",
|
||||
]
|
||||
@@ -1949,9 +1949,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "mimalloc"
|
||||
version = "0.1.47"
|
||||
version = "0.1.48"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1791cbe101e95af5764f06f20f6760521f7158f69dbf9d6baf941ee1bf6bc40"
|
||||
checksum = "e1ee66a4b64c74f4ef288bcbb9192ad9c3feaad75193129ac8509af543894fd8"
|
||||
dependencies = [
|
||||
"libmimalloc-sys",
|
||||
]
|
||||
@@ -2014,7 +2014,7 @@ version = "0.29.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"cfg-if",
|
||||
"cfg_aliases",
|
||||
"libc",
|
||||
@@ -2026,7 +2026,7 @@ version = "0.30.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"cfg-if",
|
||||
"cfg_aliases",
|
||||
"libc",
|
||||
@@ -2054,7 +2054,7 @@ version = "8.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"fsevent-sys",
|
||||
"inotify",
|
||||
"kqueue",
|
||||
@@ -2127,9 +2127,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
|
||||
|
||||
[[package]]
|
||||
name = "ordermap"
|
||||
version = "0.5.8"
|
||||
version = "0.5.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d6bff06e4a5dc6416bead102d3e63c480dd852ffbb278bf8cfeb4966b329609"
|
||||
checksum = "2fd6fedcd996c8c97932075cc3811d83f53280f48d5620e4e3cab7f6a12678c4"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"serde",
|
||||
@@ -2283,9 +2283,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "percent-encoding"
|
||||
version = "2.3.1"
|
||||
version = "2.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
|
||||
checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
|
||||
|
||||
[[package]]
|
||||
name = "pest"
|
||||
@@ -2294,7 +2294,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
"ucd-trie",
|
||||
]
|
||||
|
||||
@@ -2473,9 +2473,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.96"
|
||||
version = "1.0.101"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "beef09f85ae72cea1ef96ba6870c51e6382ebfa4f0e85b643459331f3daa5be0"
|
||||
checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
@@ -2490,7 +2490,7 @@ dependencies = [
|
||||
"pep440_rs",
|
||||
"pep508_rs",
|
||||
"serde",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
"toml 0.8.23",
|
||||
]
|
||||
|
||||
@@ -2505,7 +2505,7 @@ dependencies = [
|
||||
"newtype-uuid",
|
||||
"quick-xml",
|
||||
"strip-ansi-escapes",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
@@ -2666,7 +2666,7 @@ version = "0.5.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2677,18 +2677,18 @@ checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
|
||||
dependencies = [
|
||||
"getrandom 0.2.16",
|
||||
"libredox",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.11.1"
|
||||
version = "1.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
|
||||
checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-automata 0.4.9",
|
||||
"regex-automata 0.4.10",
|
||||
"regex-syntax 0.8.5",
|
||||
]
|
||||
|
||||
@@ -2703,9 +2703,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.4.9"
|
||||
version = "0.4.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
|
||||
checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
@@ -2743,13 +2743,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ruff"
|
||||
version = "0.12.9"
|
||||
version = "0.12.11"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"argfile",
|
||||
"assert_fs",
|
||||
"bincode 2.0.1",
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"cachedir",
|
||||
"clap",
|
||||
"clap_complete_command",
|
||||
@@ -2793,7 +2793,7 @@ dependencies = [
|
||||
"strum",
|
||||
"tempfile",
|
||||
"test-case",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
"tikv-jemallocator",
|
||||
"toml 0.9.5",
|
||||
"tracing",
|
||||
@@ -2870,6 +2870,7 @@ dependencies = [
|
||||
"insta",
|
||||
"matchit",
|
||||
"path-slash",
|
||||
"pathdiff",
|
||||
"quick-junit",
|
||||
"ruff_annotate_snippets",
|
||||
"ruff_cache",
|
||||
@@ -2886,8 +2887,9 @@ dependencies = [
|
||||
"schemars",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"similar",
|
||||
"tempfile",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"ty_static",
|
||||
@@ -2934,6 +2936,7 @@ dependencies = [
|
||||
"tracing-subscriber",
|
||||
"ty",
|
||||
"ty_project",
|
||||
"ty_python_semantic",
|
||||
"ty_static",
|
||||
"url",
|
||||
]
|
||||
@@ -2996,11 +2999,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ruff_linter"
|
||||
version = "0.12.9"
|
||||
version = "0.12.11"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"anyhow",
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"clap",
|
||||
"colored 3.0.0",
|
||||
"fern",
|
||||
@@ -3018,7 +3021,6 @@ dependencies = [
|
||||
"memchr",
|
||||
"natord",
|
||||
"path-absolutize",
|
||||
"pathdiff",
|
||||
"pep440_rs",
|
||||
"pyproject-toml",
|
||||
"regex",
|
||||
@@ -3047,7 +3049,7 @@ dependencies = [
|
||||
"strum_macros",
|
||||
"tempfile",
|
||||
"test-case",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
"toml 0.9.5",
|
||||
"typed-arena",
|
||||
"unicode-normalization",
|
||||
@@ -3090,7 +3092,7 @@ dependencies = [
|
||||
"serde_json",
|
||||
"serde_with",
|
||||
"test-case",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
@@ -3106,7 +3108,7 @@ name = "ruff_python_ast"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"compact_str",
|
||||
"get-size2",
|
||||
"is-macro",
|
||||
@@ -3121,7 +3123,7 @@ dependencies = [
|
||||
"salsa",
|
||||
"schemars",
|
||||
"serde",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3175,7 +3177,7 @@ dependencies = [
|
||||
"similar",
|
||||
"smallvec",
|
||||
"static_assertions",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
@@ -3194,7 +3196,7 @@ dependencies = [
|
||||
name = "ruff_python_literal"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"itertools 0.14.0",
|
||||
"ruff_python_ast",
|
||||
"unic-ucd-category",
|
||||
@@ -3205,7 +3207,7 @@ name = "ruff_python_parser"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"bstr",
|
||||
"compact_str",
|
||||
"get-size2",
|
||||
@@ -3230,7 +3232,7 @@ dependencies = [
|
||||
name = "ruff_python_semantic"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"insta",
|
||||
"is-macro",
|
||||
"ruff_cache",
|
||||
@@ -3251,7 +3253,7 @@ dependencies = [
|
||||
name = "ruff_python_stdlib"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
@@ -3305,7 +3307,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"shellexpand",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
"toml 0.9.5",
|
||||
"tracing",
|
||||
"tracing-log",
|
||||
@@ -3335,7 +3337,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ruff_wasm"
|
||||
version = "0.12.9"
|
||||
version = "0.12.11"
|
||||
dependencies = [
|
||||
"console_error_panic_hook",
|
||||
"console_log",
|
||||
@@ -3428,7 +3430,7 @@ version = "1.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
@@ -3450,7 +3452,7 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
|
||||
[[package]]
|
||||
name = "salsa"
|
||||
version = "0.23.0"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=918d35d873b2b73a0237536144ef4d22e8d57f27#918d35d873b2b73a0237536144ef4d22e8d57f27"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=a3ffa22cb26756473d56f867aedec3fd907c4dd9#a3ffa22cb26756473d56f867aedec3fd907c4dd9"
|
||||
dependencies = [
|
||||
"boxcar",
|
||||
"compact_str",
|
||||
@@ -3474,12 +3476,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "salsa-macro-rules"
|
||||
version = "0.23.0"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=918d35d873b2b73a0237536144ef4d22e8d57f27#918d35d873b2b73a0237536144ef4d22e8d57f27"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=a3ffa22cb26756473d56f867aedec3fd907c4dd9#a3ffa22cb26756473d56f867aedec3fd907c4dd9"
|
||||
|
||||
[[package]]
|
||||
name = "salsa-macros"
|
||||
version = "0.23.0"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=918d35d873b2b73a0237536144ef4d22e8d57f27#918d35d873b2b73a0237536144ef4d22e8d57f27"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=a3ffa22cb26756473d56f867aedec3fd907c4dd9#a3ffa22cb26756473d56f867aedec3fd907c4dd9"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -3576,9 +3578,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.142"
|
||||
version = "1.0.143"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7"
|
||||
checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"memchr",
|
||||
@@ -3789,9 +3791,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.104"
|
||||
version = "2.0.106"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40"
|
||||
checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -3915,11 +3917,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "2.0.12"
|
||||
version = "2.0.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
|
||||
checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0"
|
||||
dependencies = [
|
||||
"thiserror-impl 2.0.12",
|
||||
"thiserror-impl 2.0.16",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3935,9 +3937,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "2.0.12"
|
||||
version = "2.0.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
|
||||
checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -4136,9 +4138,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tracing-indicatif"
|
||||
version = "0.3.12"
|
||||
version = "0.3.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e1983afead46ff13a3c93581e0cec31d20b29efdd22cbdaa8b9f850eccf2c352"
|
||||
checksum = "04d4e11e0e27acef25a47f27e9435355fecdc488867fa2bc90e75b0700d2823d"
|
||||
dependencies = [
|
||||
"indicatif",
|
||||
"tracing",
|
||||
@@ -4238,17 +4240,22 @@ dependencies = [
|
||||
name = "ty_ide"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"get-size2",
|
||||
"insta",
|
||||
"itertools 0.14.0",
|
||||
"rayon",
|
||||
"regex",
|
||||
"ruff_db",
|
||||
"ruff_index",
|
||||
"ruff_memory_usage",
|
||||
"ruff_python_ast",
|
||||
"ruff_python_parser",
|
||||
"ruff_python_trivia",
|
||||
"ruff_source_file",
|
||||
"ruff_text_size",
|
||||
"rustc-hash",
|
||||
"salsa",
|
||||
"smallvec",
|
||||
"tracing",
|
||||
"ty_project",
|
||||
@@ -4271,7 +4278,7 @@ dependencies = [
|
||||
"pep440_rs",
|
||||
"rayon",
|
||||
"regex",
|
||||
"regex-automata 0.4.9",
|
||||
"regex-automata 0.4.10",
|
||||
"ruff_cache",
|
||||
"ruff_db",
|
||||
"ruff_macros",
|
||||
@@ -4284,7 +4291,7 @@ dependencies = [
|
||||
"salsa",
|
||||
"schemars",
|
||||
"serde",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
"toml 0.9.5",
|
||||
"tracing",
|
||||
"ty_combine",
|
||||
@@ -4297,7 +4304,7 @@ name = "ty_python_semantic"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"bitvec",
|
||||
"camino",
|
||||
"colored 3.0.0",
|
||||
@@ -4337,7 +4344,7 @@ dependencies = [
|
||||
"strum_macros",
|
||||
"tempfile",
|
||||
"test-case",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
"tracing",
|
||||
"ty_python_semantic",
|
||||
"ty_static",
|
||||
@@ -4350,7 +4357,7 @@ name = "ty_server"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"crossbeam",
|
||||
"dunce",
|
||||
"insta",
|
||||
@@ -4371,7 +4378,7 @@ dependencies = [
|
||||
"serde_json",
|
||||
"shellexpand",
|
||||
"tempfile",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"ty_combine",
|
||||
@@ -4393,7 +4400,7 @@ name = "ty_test"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
"camino",
|
||||
"colored 3.0.0",
|
||||
"insta",
|
||||
@@ -4412,7 +4419,7 @@ dependencies = [
|
||||
"serde",
|
||||
"smallvec",
|
||||
"tempfile",
|
||||
"thiserror 2.0.12",
|
||||
"thiserror 2.0.16",
|
||||
"toml 0.9.5",
|
||||
"tracing",
|
||||
"ty_python_semantic",
|
||||
@@ -4589,9 +4596,9 @@ checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae"
|
||||
|
||||
[[package]]
|
||||
name = "url"
|
||||
version = "2.5.4"
|
||||
version = "2.5.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60"
|
||||
checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b"
|
||||
dependencies = [
|
||||
"form_urlencoded",
|
||||
"idna",
|
||||
@@ -5143,7 +5150,7 @@ version = "0.39.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 2.9.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -5,7 +5,7 @@ resolver = "2"
|
||||
[workspace.package]
|
||||
# Please update rustfmt.toml when bumping the Rust edition
|
||||
edition = "2024"
|
||||
rust-version = "1.86"
|
||||
rust-version = "1.87"
|
||||
homepage = "https://docs.astral.sh/ruff"
|
||||
documentation = "https://docs.astral.sh/ruff"
|
||||
repository = "https://github.com/astral-sh/ruff"
|
||||
@@ -143,7 +143,7 @@ regex-automata = { version = "0.4.9" }
|
||||
rustc-hash = { version = "2.0.0" }
|
||||
rustc-stable-hash = { version = "0.1.2" }
|
||||
# When updating salsa, make sure to also update the revision in `fuzz/Cargo.toml`
|
||||
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "918d35d873b2b73a0237536144ef4d22e8d57f27", default-features = false, features = [
|
||||
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "a3ffa22cb26756473d56f867aedec3fd907c4dd9", default-features = false, features = [
|
||||
"compact_str",
|
||||
"macros",
|
||||
"salsa_unstable",
|
||||
@@ -215,6 +215,8 @@ unexpected_cfgs = { level = "warn", check-cfg = [
|
||||
|
||||
[workspace.lints.clippy]
|
||||
pedantic = { level = "warn", priority = -2 }
|
||||
# Enabled at the crate level
|
||||
disallowed_methods = "allow"
|
||||
# Allowed pedantic lints
|
||||
char_lit_as_u8 = "allow"
|
||||
collapsible_else_if = "allow"
|
||||
@@ -253,6 +255,7 @@ unused_peekable = "warn"
|
||||
# Diagnostics are not actionable: Enable once https://github.com/rust-lang/rust-clippy/issues/13774 is resolved.
|
||||
large_stack_arrays = "allow"
|
||||
|
||||
|
||||
[profile.release]
|
||||
# Note that we set these explicitly, and these values
|
||||
# were chosen based on a trade-off between compile times
|
||||
|
||||
@@ -148,8 +148,8 @@ curl -LsSf https://astral.sh/ruff/install.sh | sh
|
||||
powershell -c "irm https://astral.sh/ruff/install.ps1 | iex"
|
||||
|
||||
# For a specific version.
|
||||
curl -LsSf https://astral.sh/ruff/0.12.9/install.sh | sh
|
||||
powershell -c "irm https://astral.sh/ruff/0.12.9/install.ps1 | iex"
|
||||
curl -LsSf https://astral.sh/ruff/0.12.11/install.sh | sh
|
||||
powershell -c "irm https://astral.sh/ruff/0.12.11/install.ps1 | iex"
|
||||
```
|
||||
|
||||
You can also install Ruff via [Homebrew](https://formulae.brew.sh/formula/ruff), [Conda](https://anaconda.org/conda-forge/ruff),
|
||||
@@ -182,7 +182,7 @@ Ruff can also be used as a [pre-commit](https://pre-commit.com/) hook via [`ruff
|
||||
```yaml
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
# Ruff version.
|
||||
rev: v0.12.9
|
||||
rev: v0.12.11
|
||||
hooks:
|
||||
# Run the linter.
|
||||
- id: ruff-check
|
||||
|
||||
17
clippy.toml
17
clippy.toml
@@ -24,3 +24,20 @@ ignore-interior-mutability = [
|
||||
# The expression is read-only.
|
||||
"ruff_python_ast::hashable::HashableExpr",
|
||||
]
|
||||
|
||||
disallowed-methods = [
|
||||
{ path = "std::env::var", reason = "Use System::env_var instead in ty crates" },
|
||||
{ path = "std::env::current_dir", reason = "Use System::current_directory instead in ty crates" },
|
||||
{ path = "std::fs::read_to_string", reason = "Use System::read_to_string instead in ty crates" },
|
||||
{ path = "std::fs::metadata", reason = "Use System::path_metadata instead in ty crates" },
|
||||
{ path = "std::fs::canonicalize", reason = "Use System::canonicalize_path instead in ty crates" },
|
||||
{ path = "dunce::canonicalize", reason = "Use System::canonicalize_path instead in ty crates" },
|
||||
{ path = "std::fs::read_dir", reason = "Use System::read_directory instead in ty crates" },
|
||||
{ path = "std::fs::write", reason = "Use WritableSystem::write_file instead in ty crates" },
|
||||
{ path = "std::fs::create_dir_all", reason = "Use WritableSystem::create_directory_all instead in ty crates" },
|
||||
{ path = "std::fs::File::create_new", reason = "Use WritableSystem::create_new_file instead in ty crates" },
|
||||
# Path methods that have System trait equivalents
|
||||
{ path = "std::path::Path::exists", reason = "Use System::path_exists instead in ty crates" },
|
||||
{ path = "std::path::Path::is_dir", reason = "Use System::is_directory instead in ty crates" },
|
||||
{ path = "std::path::Path::is_file", reason = "Use System::is_file instead in ty crates" },
|
||||
]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ruff"
|
||||
version = "0.12.9"
|
||||
version = "0.12.11"
|
||||
publish = true
|
||||
authors = { workspace = true }
|
||||
edition = { workspace = true }
|
||||
|
||||
@@ -15,8 +15,7 @@ use ruff_db::diagnostic::{
|
||||
use ruff_linter::fs::relativize_path;
|
||||
use ruff_linter::logging::LogLevel;
|
||||
use ruff_linter::message::{
|
||||
Emitter, EmitterContext, GithubEmitter, GitlabEmitter, GroupedEmitter, SarifEmitter,
|
||||
TextEmitter,
|
||||
Emitter, EmitterContext, GithubEmitter, GroupedEmitter, SarifEmitter, TextEmitter,
|
||||
};
|
||||
use ruff_linter::notify_user;
|
||||
use ruff_linter::settings::flags::{self};
|
||||
@@ -31,8 +30,6 @@ bitflags! {
|
||||
const SHOW_VIOLATIONS = 1 << 0;
|
||||
/// Whether to show a summary of the fixed violations when emitting diagnostics.
|
||||
const SHOW_FIX_SUMMARY = 1 << 1;
|
||||
/// Whether to show a diff of each fixed violation when emitting diagnostics.
|
||||
const SHOW_FIX_DIFF = 1 << 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,9 +258,9 @@ impl Printer {
|
||||
OutputFormat::Concise | OutputFormat::Full => {
|
||||
TextEmitter::default()
|
||||
.with_show_fix_status(show_fix_status(self.fix_mode, fixables.as_ref()))
|
||||
.with_show_fix_diff(self.flags.intersects(Flags::SHOW_FIX_DIFF))
|
||||
.with_show_fix_diff(self.format == OutputFormat::Full && preview)
|
||||
.with_show_source(self.format == OutputFormat::Full)
|
||||
.with_unsafe_fixes(self.unsafe_fixes)
|
||||
.with_fix_applicability(self.unsafe_fixes.required_applicability())
|
||||
.with_preview(preview)
|
||||
.emit(writer, &diagnostics.inner, &context)?;
|
||||
|
||||
@@ -296,7 +293,11 @@ impl Printer {
|
||||
GithubEmitter.emit(writer, &diagnostics.inner, &context)?;
|
||||
}
|
||||
OutputFormat::Gitlab => {
|
||||
GitlabEmitter::default().emit(writer, &diagnostics.inner, &context)?;
|
||||
let config = DisplayDiagnosticConfig::default()
|
||||
.format(DiagnosticFormat::Gitlab)
|
||||
.preview(preview);
|
||||
let value = DisplayDiagnostics::new(&context, &config, &diagnostics.inner);
|
||||
write!(writer, "{value}")?;
|
||||
}
|
||||
OutputFormat::Pylint => {
|
||||
let config = DisplayDiagnosticConfig::default()
|
||||
@@ -461,7 +462,7 @@ impl Printer {
|
||||
TextEmitter::default()
|
||||
.with_show_fix_status(show_fix_status(self.fix_mode, fixables.as_ref()))
|
||||
.with_show_source(preview)
|
||||
.with_unsafe_fixes(self.unsafe_fixes)
|
||||
.with_fix_applicability(self.unsafe_fixes.required_applicability())
|
||||
.emit(writer, &diagnostics.inner, &context)?;
|
||||
}
|
||||
writer.flush()?;
|
||||
|
||||
@@ -5801,3 +5801,62 @@ fn future_annotations_preview_warning() {
|
||||
",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn up045_nested_optional_flatten_all() {
|
||||
let contents = "\
|
||||
from typing import Optional
|
||||
nested_optional: Optional[Optional[Optional[str]]] = None
|
||||
";
|
||||
|
||||
assert_cmd_snapshot!(
|
||||
Command::new(get_cargo_bin(BIN_NAME))
|
||||
.args(STDIN_BASE_OPTIONS)
|
||||
.args(["--select", "UP045", "--diff", "--target-version", "py312"])
|
||||
.arg("-")
|
||||
.pass_stdin(contents),
|
||||
@r"
|
||||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
@@ -1,2 +1,2 @@
|
||||
from typing import Optional
|
||||
-nested_optional: Optional[Optional[Optional[str]]] = None
|
||||
+nested_optional: str | None = None
|
||||
|
||||
|
||||
----- stderr -----
|
||||
Would fix 1 error.
|
||||
",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn show_fixes_in_full_output_with_preview_enabled() {
|
||||
assert_cmd_snapshot!(
|
||||
Command::new(get_cargo_bin(BIN_NAME))
|
||||
.args(["check", "--no-cache", "--output-format", "full"])
|
||||
.args(["--select", "F401"])
|
||||
.arg("--preview")
|
||||
.arg("-")
|
||||
.pass_stdin("import math"),
|
||||
@r"
|
||||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
F401 [*] `math` imported but unused
|
||||
--> -:1:8
|
||||
|
|
||||
1 | import math
|
||||
| ^^^^
|
||||
|
|
||||
help: Remove unused import: `math`
|
||||
- import math
|
||||
|
||||
Found 1 error.
|
||||
[*] 1 fixable with the `--fix` option.
|
||||
|
||||
----- stderr -----
|
||||
",
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,59 +20,59 @@ exit_code: 1
|
||||
{
|
||||
"check_name": "F401",
|
||||
"description": "F401: `os` imported but unused",
|
||||
"severity": "major",
|
||||
"fingerprint": "4dbad37161e65c72",
|
||||
"location": {
|
||||
"path": "input.py",
|
||||
"positions": {
|
||||
"begin": {
|
||||
"column": 8,
|
||||
"line": 1
|
||||
"line": 1,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"column": 10,
|
||||
"line": 1
|
||||
"line": 1,
|
||||
"column": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"severity": "major"
|
||||
}
|
||||
},
|
||||
{
|
||||
"check_name": "F821",
|
||||
"description": "F821: Undefined name `y`",
|
||||
"severity": "major",
|
||||
"fingerprint": "7af59862a085230",
|
||||
"location": {
|
||||
"path": "input.py",
|
||||
"positions": {
|
||||
"begin": {
|
||||
"column": 5,
|
||||
"line": 2
|
||||
"line": 2,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"column": 6,
|
||||
"line": 2
|
||||
"line": 2,
|
||||
"column": 6
|
||||
}
|
||||
}
|
||||
},
|
||||
"severity": "major"
|
||||
}
|
||||
},
|
||||
{
|
||||
"check_name": "invalid-syntax",
|
||||
"description": "invalid-syntax: Cannot use `match` statement on Python 3.9 (syntax was added in Python 3.10)",
|
||||
"severity": "major",
|
||||
"fingerprint": "e558cec859bb66e8",
|
||||
"location": {
|
||||
"path": "input.py",
|
||||
"positions": {
|
||||
"begin": {
|
||||
"column": 1,
|
||||
"line": 3
|
||||
"line": 3,
|
||||
"column": 1
|
||||
},
|
||||
"end": {
|
||||
"column": 6,
|
||||
"line": 3
|
||||
"line": 3,
|
||||
"column": 6
|
||||
}
|
||||
}
|
||||
},
|
||||
"severity": "major"
|
||||
}
|
||||
}
|
||||
]
|
||||
----- stderr -----
|
||||
|
||||
@@ -450,9 +450,6 @@ fn benchmark_complex_constrained_attributes_2(criterion: &mut Criterion) {
|
||||
r#"
|
||||
class C:
|
||||
def f(self: "C"):
|
||||
self.a = ""
|
||||
self.b = ""
|
||||
|
||||
if isinstance(self.a, str):
|
||||
return
|
||||
|
||||
@@ -466,6 +463,56 @@ fn benchmark_complex_constrained_attributes_2(criterion: &mut Criterion) {
|
||||
return
|
||||
if isinstance(self.b, str):
|
||||
return
|
||||
if isinstance(self.b, str):
|
||||
return
|
||||
if isinstance(self.b, str):
|
||||
return
|
||||
|
||||
self.a = ""
|
||||
self.b = ""
|
||||
"#,
|
||||
)
|
||||
},
|
||||
|case| {
|
||||
let Case { db, .. } = case;
|
||||
let result = db.check();
|
||||
assert_eq!(result.len(), 0);
|
||||
},
|
||||
BatchSize::SmallInput,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
fn benchmark_complex_constrained_attributes_3(criterion: &mut Criterion) {
|
||||
setup_rayon();
|
||||
|
||||
criterion.bench_function("ty_micro[complex_constrained_attributes_3]", |b| {
|
||||
b.iter_batched_ref(
|
||||
|| {
|
||||
// This is a regression test for https://github.com/astral-sh/ty/issues/758
|
||||
setup_micro_case(
|
||||
r#"
|
||||
class GridOut:
|
||||
def __init__(self: "GridOut") -> None:
|
||||
self._buffer = b""
|
||||
|
||||
def _read_size_or_line(self: "GridOut", size: int = -1):
|
||||
if size > self._position:
|
||||
size = self._position
|
||||
pass
|
||||
if size == 0:
|
||||
return bytes()
|
||||
|
||||
while size > 0:
|
||||
if self._buffer:
|
||||
buf = self._buffer
|
||||
self._buffer = b""
|
||||
else:
|
||||
buf = b""
|
||||
|
||||
if len(buf) > size:
|
||||
self._buffer = buf
|
||||
self._position -= len(self._buffer)
|
||||
"#,
|
||||
)
|
||||
},
|
||||
@@ -668,6 +715,7 @@ criterion_group!(
|
||||
benchmark_tuple_implicit_instance_attributes,
|
||||
benchmark_complex_constrained_attributes_1,
|
||||
benchmark_complex_constrained_attributes_2,
|
||||
benchmark_complex_constrained_attributes_3,
|
||||
benchmark_many_enum_members,
|
||||
);
|
||||
criterion_group!(project, anyio, attrs, hydra, datetype);
|
||||
|
||||
@@ -34,12 +34,14 @@ glob = { workspace = true }
|
||||
ignore = { workspace = true, optional = true }
|
||||
matchit = { workspace = true }
|
||||
path-slash = { workspace = true }
|
||||
pathdiff = { workspace = true }
|
||||
quick-junit = { workspace = true, optional = true }
|
||||
rustc-hash = { workspace = true }
|
||||
salsa = { workspace = true }
|
||||
schemars = { workspace = true, optional = true }
|
||||
serde = { workspace = true, optional = true }
|
||||
serde_json = { workspace = true, optional = true }
|
||||
similar = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
tracing-subscriber = { workspace = true, optional = true }
|
||||
@@ -52,7 +54,7 @@ web-time = { version = "1.1.0" }
|
||||
etcetera = { workspace = true, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
insta = { workspace = true }
|
||||
insta = { workspace = true, features = ["filters"] }
|
||||
tempfile = { workspace = true }
|
||||
|
||||
[features]
|
||||
|
||||
@@ -325,6 +325,11 @@ impl Diagnostic {
|
||||
self.inner.fix.as_ref()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) fn fix_mut(&mut self) -> Option<&mut Fix> {
|
||||
Arc::make_mut(&mut self.inner).fix.as_mut()
|
||||
}
|
||||
|
||||
/// Set the fix for this diagnostic.
|
||||
pub fn set_fix(&mut self, fix: Fix) {
|
||||
debug_assert!(
|
||||
@@ -344,6 +349,13 @@ impl Diagnostic {
|
||||
self.fix().is_some()
|
||||
}
|
||||
|
||||
/// Returns `true` if the diagnostic is [`fixable`](Diagnostic::fixable) and applies at the
|
||||
/// configured applicability level.
|
||||
pub fn has_applicable_fix(&self, config: &DisplayDiagnosticConfig) -> bool {
|
||||
self.fix()
|
||||
.is_some_and(|fix| fix.applies(config.fix_applicability))
|
||||
}
|
||||
|
||||
/// Returns the offset of the parent statement for this diagnostic if it exists.
|
||||
///
|
||||
/// This is primarily used for checking noqa/secondary code suppressions.
|
||||
@@ -1294,6 +1306,10 @@ pub struct DisplayDiagnosticConfig {
|
||||
hide_severity: bool,
|
||||
/// Whether to show the availability of a fix in a diagnostic.
|
||||
show_fix_status: bool,
|
||||
/// Whether to show the diff for an available fix after the main diagnostic.
|
||||
///
|
||||
/// This currently only applies to `DiagnosticFormat::Full`.
|
||||
show_fix_diff: bool,
|
||||
/// The lowest applicability that should be shown when reporting diagnostics.
|
||||
fix_applicability: Applicability,
|
||||
}
|
||||
@@ -1341,6 +1357,14 @@ impl DisplayDiagnosticConfig {
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether to show a diff for an available fix after the main diagnostic.
|
||||
pub fn show_fix_diff(self, yes: bool) -> DisplayDiagnosticConfig {
|
||||
DisplayDiagnosticConfig {
|
||||
show_fix_diff: yes,
|
||||
..self
|
||||
}
|
||||
}
|
||||
|
||||
/// Set the lowest fix applicability that should be shown.
|
||||
///
|
||||
/// In other words, an applicability of `Safe` (the default) would suppress showing fixes or fix
|
||||
@@ -1364,6 +1388,7 @@ impl Default for DisplayDiagnosticConfig {
|
||||
preview: false,
|
||||
hide_severity: false,
|
||||
show_fix_status: false,
|
||||
show_fix_diff: false,
|
||||
fix_applicability: Applicability::Safe,
|
||||
}
|
||||
}
|
||||
@@ -1417,6 +1442,11 @@ pub enum DiagnosticFormat {
|
||||
/// Print diagnostics in the format expected by JUnit.
|
||||
#[cfg(feature = "junit")]
|
||||
Junit,
|
||||
/// Print diagnostics in the JSON format used by GitLab [Code Quality] reports.
|
||||
///
|
||||
/// [Code Quality]: https://docs.gitlab.com/ee/ci/testing/code_quality.html#implement-a-custom-tool
|
||||
#[cfg(feature = "serde")]
|
||||
Gitlab,
|
||||
}
|
||||
|
||||
/// A representation of the kinds of messages inside a diagnostic.
|
||||
|
||||
@@ -31,6 +31,8 @@ mod azure;
|
||||
mod concise;
|
||||
mod full;
|
||||
#[cfg(feature = "serde")]
|
||||
mod gitlab;
|
||||
#[cfg(feature = "serde")]
|
||||
mod json;
|
||||
#[cfg(feature = "serde")]
|
||||
mod json_lines;
|
||||
@@ -136,6 +138,10 @@ impl std::fmt::Display for DisplayDiagnostics<'_> {
|
||||
DiagnosticFormat::Junit => {
|
||||
junit::JunitRenderer::new(self.resolver).render(f, self.diagnostics)?;
|
||||
}
|
||||
#[cfg(feature = "serde")]
|
||||
DiagnosticFormat::Gitlab => {
|
||||
gitlab::GitlabRenderer::new(self.resolver).render(f, self.diagnostics)?;
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
@@ -248,9 +254,7 @@ impl<'a> ResolvedDiagnostic<'a> {
|
||||
id,
|
||||
message: diag.inner.message.as_str().to_string(),
|
||||
annotations,
|
||||
is_fixable: diag
|
||||
.fix()
|
||||
.is_some_and(|fix| fix.applies(config.fix_applicability)),
|
||||
is_fixable: diag.has_applicable_fix(config),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2622,6 +2626,13 @@ watermelon
|
||||
self.config = config;
|
||||
}
|
||||
|
||||
/// Show a diff for the fix when rendering.
|
||||
pub(super) fn show_fix_diff(&mut self, yes: bool) {
|
||||
let mut config = std::mem::take(&mut self.config);
|
||||
config = config.show_fix_diff(yes);
|
||||
self.config = config;
|
||||
}
|
||||
|
||||
/// The lowest fix applicability to show when rendering.
|
||||
pub(super) fn fix_applicability(&mut self, applicability: Applicability) {
|
||||
let mut config = std::mem::take(&mut self.config);
|
||||
|
||||
@@ -77,11 +77,9 @@ impl<'a> ConciseRenderer<'a> {
|
||||
)?;
|
||||
}
|
||||
if self.config.show_fix_status {
|
||||
if let Some(fix) = diag.fix() {
|
||||
// Do not display an indicator for inapplicable fixes
|
||||
if fix.applies(self.config.fix_applicability) {
|
||||
write!(f, "[{fix}] ", fix = fmt_styled("*", stylesheet.separator))?;
|
||||
}
|
||||
// Do not display an indicator for inapplicable fixes
|
||||
if diag.has_applicable_fix(self.config) {
|
||||
write!(f, "[{fix}] ", fix = fmt_styled("*", stylesheet.separator))?;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
use std::borrow::Cow;
|
||||
use std::num::NonZeroUsize;
|
||||
|
||||
use similar::{ChangeTag, TextDiff};
|
||||
|
||||
use ruff_annotate_snippets::Renderer as AnnotateRenderer;
|
||||
use ruff_diagnostics::{Applicability, Fix};
|
||||
use ruff_notebook::NotebookIndex;
|
||||
use ruff_source_file::OneIndexed;
|
||||
use ruff_text_size::{Ranged, TextLen, TextRange, TextSize};
|
||||
|
||||
use crate::diagnostic::render::{FileResolver, Resolved};
|
||||
use crate::diagnostic::{Diagnostic, DisplayDiagnosticConfig, stylesheet::DiagnosticStylesheet};
|
||||
use crate::diagnostic::stylesheet::{DiagnosticStylesheet, fmt_styled};
|
||||
use crate::diagnostic::{Diagnostic, DiagnosticSource, DisplayDiagnosticConfig};
|
||||
|
||||
pub(super) struct FullRenderer<'a> {
|
||||
resolver: &'a dyn FileResolver,
|
||||
@@ -47,6 +57,13 @@ impl<'a> FullRenderer<'a> {
|
||||
for diag in renderable.diagnostics.iter() {
|
||||
writeln!(f, "{}", renderer.render(diag.to_annotate()))?;
|
||||
}
|
||||
|
||||
if self.config.show_fix_diff && diag.has_applicable_fix(self.config) {
|
||||
if let Some(diff) = Diff::from_diagnostic(diag, &stylesheet, self.resolver) {
|
||||
write!(f, "{diff}")?;
|
||||
}
|
||||
}
|
||||
|
||||
writeln!(f)?;
|
||||
}
|
||||
|
||||
@@ -54,9 +71,227 @@ impl<'a> FullRenderer<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Renders a diff that shows the code fixes.
|
||||
///
|
||||
/// The implementation isn't fully fledged out and only used by tests. Before using in production, try
|
||||
/// * Improve layout
|
||||
/// * Replace tabs with spaces for a consistent experience across terminals
|
||||
/// * Replace zero-width whitespaces
|
||||
/// * Print a simpler diff if only a single line has changed
|
||||
/// * Compute the diff from the `Edit` because diff calculation is expensive.
|
||||
struct Diff<'a> {
|
||||
fix: &'a Fix,
|
||||
diagnostic_source: DiagnosticSource,
|
||||
notebook_index: Option<NotebookIndex>,
|
||||
stylesheet: &'a DiagnosticStylesheet,
|
||||
}
|
||||
|
||||
impl<'a> Diff<'a> {
|
||||
fn from_diagnostic(
|
||||
diagnostic: &'a Diagnostic,
|
||||
stylesheet: &'a DiagnosticStylesheet,
|
||||
resolver: &'a dyn FileResolver,
|
||||
) -> Option<Diff<'a>> {
|
||||
let file = &diagnostic.primary_span_ref()?.file;
|
||||
Some(Diff {
|
||||
fix: diagnostic.fix()?,
|
||||
diagnostic_source: file.diagnostic_source(resolver),
|
||||
notebook_index: resolver.notebook_index(file),
|
||||
stylesheet,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for Diff<'_> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let source_code = self.diagnostic_source.as_source_code();
|
||||
let source_text = source_code.text();
|
||||
|
||||
// Partition the source code into end offsets for each cell. If `self.notebook_index` is
|
||||
// `None`, indicating a regular script file, all the lines will be in one "cell" under the
|
||||
// `None` key.
|
||||
let cells = if let Some(notebook_index) = &self.notebook_index {
|
||||
let mut last_cell = OneIndexed::MIN;
|
||||
let mut cells: Vec<(Option<OneIndexed>, TextSize)> = Vec::new();
|
||||
for (row, cell) in notebook_index.iter() {
|
||||
if cell != last_cell {
|
||||
let offset = source_code.line_start(row);
|
||||
cells.push((Some(last_cell), offset));
|
||||
last_cell = cell;
|
||||
}
|
||||
}
|
||||
cells.push((Some(last_cell), source_text.text_len()));
|
||||
cells
|
||||
} else {
|
||||
vec![(None, source_text.text_len())]
|
||||
};
|
||||
|
||||
let mut last_end = TextSize::ZERO;
|
||||
for (cell, offset) in cells {
|
||||
let range = TextRange::new(last_end, offset);
|
||||
last_end = offset;
|
||||
let input = source_code.slice(range);
|
||||
|
||||
let mut output = String::with_capacity(input.len());
|
||||
let mut last_end = range.start();
|
||||
|
||||
let mut applied = 0;
|
||||
for edit in self.fix.edits() {
|
||||
if range.contains_range(edit.range()) {
|
||||
output.push_str(source_code.slice(TextRange::new(last_end, edit.start())));
|
||||
output.push_str(edit.content().unwrap_or_default());
|
||||
last_end = edit.end();
|
||||
applied += 1;
|
||||
}
|
||||
}
|
||||
|
||||
// No edits were applied, so there's no need to diff.
|
||||
if applied == 0 {
|
||||
continue;
|
||||
}
|
||||
|
||||
output.push_str(&source_text[usize::from(last_end)..usize::from(range.end())]);
|
||||
|
||||
let diff = TextDiff::from_lines(input, &output);
|
||||
|
||||
let grouped_ops = diff.grouped_ops(3);
|
||||
|
||||
// Find the new line number with the largest number of digits to align all of the line
|
||||
// number separators.
|
||||
let last_op = grouped_ops.last().and_then(|group| group.last());
|
||||
let largest_new = last_op.map(|op| op.new_range().end).unwrap_or_default();
|
||||
|
||||
let digit_with = OneIndexed::new(largest_new).unwrap_or_default().digits();
|
||||
|
||||
if let Some(cell) = cell {
|
||||
// Room for 1 digit, 1 space, 1 `|`, and 1 more following space. This centers the
|
||||
// three colons on the pipe.
|
||||
writeln!(f, "{:>1$} cell {cell}", ":::", digit_with.get() + 3)?;
|
||||
}
|
||||
|
||||
for (idx, group) in grouped_ops.iter().enumerate() {
|
||||
if idx > 0 {
|
||||
writeln!(f, "{:-^1$}", "-", 80)?;
|
||||
}
|
||||
for op in group {
|
||||
for change in diff.iter_inline_changes(op) {
|
||||
let (sign, style, line_no_style, index) = match change.tag() {
|
||||
ChangeTag::Delete => (
|
||||
"-",
|
||||
self.stylesheet.deletion,
|
||||
self.stylesheet.deletion_line_no,
|
||||
None,
|
||||
),
|
||||
ChangeTag::Insert => (
|
||||
"+",
|
||||
self.stylesheet.insertion,
|
||||
self.stylesheet.insertion_line_no,
|
||||
change.new_index(),
|
||||
),
|
||||
ChangeTag::Equal => (
|
||||
"|",
|
||||
self.stylesheet.none,
|
||||
self.stylesheet.line_no,
|
||||
change.new_index(),
|
||||
),
|
||||
};
|
||||
|
||||
let line = Line {
|
||||
index: index.map(OneIndexed::from_zero_indexed),
|
||||
width: digit_with,
|
||||
};
|
||||
|
||||
write!(
|
||||
f,
|
||||
"{line} {sign} ",
|
||||
line = fmt_styled(line, self.stylesheet.line_no),
|
||||
sign = fmt_styled(sign, line_no_style),
|
||||
)?;
|
||||
|
||||
for (emphasized, value) in change.iter_strings_lossy() {
|
||||
let value = show_nonprinting(&value);
|
||||
let styled = fmt_styled(value, style);
|
||||
if emphasized {
|
||||
write!(f, "{}", fmt_styled(styled, self.stylesheet.emphasis))?;
|
||||
} else {
|
||||
write!(f, "{styled}")?;
|
||||
}
|
||||
}
|
||||
if change.missing_newline() {
|
||||
writeln!(f)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
match self.fix.applicability() {
|
||||
Applicability::Safe => {}
|
||||
Applicability::Unsafe => {
|
||||
writeln!(
|
||||
f,
|
||||
"{note}: {msg}",
|
||||
note = fmt_styled("note", self.stylesheet.warning),
|
||||
msg = fmt_styled(
|
||||
"This is an unsafe fix and may change runtime behavior",
|
||||
self.stylesheet.emphasis
|
||||
)
|
||||
)?;
|
||||
}
|
||||
Applicability::DisplayOnly => {
|
||||
// Note that this is still only used in tests. There's no `--display-only-fixes`
|
||||
// analog to `--unsafe-fixes` for users to activate this or see the styling.
|
||||
writeln!(
|
||||
f,
|
||||
"{note}: {msg}",
|
||||
note = fmt_styled("note", self.stylesheet.error),
|
||||
msg = fmt_styled(
|
||||
"This is a display-only fix and is likely to be incorrect",
|
||||
self.stylesheet.emphasis
|
||||
)
|
||||
)?;
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
struct Line {
|
||||
index: Option<OneIndexed>,
|
||||
width: NonZeroUsize,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for Line {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
match self.index {
|
||||
None => {
|
||||
for _ in 0..self.width.get() {
|
||||
f.write_str(" ")?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
Some(idx) => write!(f, "{:<width$}", idx, width = self.width.get()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn show_nonprinting(s: &str) -> Cow<'_, str> {
|
||||
if s.find(['\x07', '\x08', '\x1b', '\x7f']).is_some() {
|
||||
Cow::Owned(
|
||||
s.replace('\x07', "␇")
|
||||
.replace('\x08', "␈")
|
||||
.replace('\x1b', "␛")
|
||||
.replace('\x7f', "␡"),
|
||||
)
|
||||
} else {
|
||||
Cow::Borrowed(s)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ruff_diagnostics::Applicability;
|
||||
use ruff_diagnostics::{Applicability, Edit, Fix};
|
||||
use ruff_text_size::{TextLen, TextRange, TextSize};
|
||||
|
||||
use crate::diagnostic::{
|
||||
@@ -457,6 +692,104 @@ print()
|
||||
");
|
||||
}
|
||||
|
||||
/// Test that we remap notebook cell line numbers in the diff as well as the main diagnostic.
|
||||
#[test]
|
||||
fn notebook_output_with_diff() {
|
||||
let (mut env, diagnostics) = create_notebook_diagnostics(DiagnosticFormat::Full);
|
||||
env.show_fix_diff(true);
|
||||
env.fix_applicability(Applicability::DisplayOnly);
|
||||
|
||||
insta::assert_snapshot!(env.render_diagnostics(&diagnostics), @r"
|
||||
error[unused-import][*]: `os` imported but unused
|
||||
--> notebook.ipynb:cell 1:2:8
|
||||
|
|
||||
1 | # cell 1
|
||||
2 | import os
|
||||
| ^^
|
||||
|
|
||||
help: Remove unused import: `os`
|
||||
::: cell 1
|
||||
1 | # cell 1
|
||||
- import os
|
||||
|
||||
error[unused-import][*]: `math` imported but unused
|
||||
--> notebook.ipynb:cell 2:2:8
|
||||
|
|
||||
1 | # cell 2
|
||||
2 | import math
|
||||
| ^^^^
|
||||
3 |
|
||||
4 | print('hello world')
|
||||
|
|
||||
help: Remove unused import: `math`
|
||||
::: cell 2
|
||||
1 | # cell 2
|
||||
- import math
|
||||
2 |
|
||||
3 | print('hello world')
|
||||
|
||||
error[unused-variable][*]: Local variable `x` is assigned to but never used
|
||||
--> notebook.ipynb:cell 3:4:5
|
||||
|
|
||||
2 | def foo():
|
||||
3 | print()
|
||||
4 | x = 1
|
||||
| ^
|
||||
|
|
||||
help: Remove assignment to unused variable `x`
|
||||
::: cell 3
|
||||
1 | # cell 3
|
||||
2 | def foo():
|
||||
3 | print()
|
||||
- x = 1
|
||||
4 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn notebook_output_with_diff_spanning_cells() {
|
||||
let (mut env, mut diagnostics) = create_notebook_diagnostics(DiagnosticFormat::Full);
|
||||
env.show_fix_diff(true);
|
||||
env.fix_applicability(Applicability::DisplayOnly);
|
||||
|
||||
// Move all of the edits from the later diagnostics to the first diagnostic to simulate a
|
||||
// single diagnostic with edits in different cells.
|
||||
let mut diagnostic = diagnostics.swap_remove(0);
|
||||
let fix = diagnostic.fix_mut().unwrap();
|
||||
let mut edits = fix.edits().to_vec();
|
||||
for diag in diagnostics {
|
||||
edits.extend_from_slice(diag.fix().unwrap().edits());
|
||||
}
|
||||
*fix = Fix::unsafe_edits(edits.remove(0), edits);
|
||||
|
||||
insta::assert_snapshot!(env.render(&diagnostic), @r"
|
||||
error[unused-import][*]: `os` imported but unused
|
||||
--> notebook.ipynb:cell 1:2:8
|
||||
|
|
||||
1 | # cell 1
|
||||
2 | import os
|
||||
| ^^
|
||||
|
|
||||
help: Remove unused import: `os`
|
||||
::: cell 1
|
||||
1 | # cell 1
|
||||
- import os
|
||||
::: cell 2
|
||||
1 | # cell 2
|
||||
- import math
|
||||
2 |
|
||||
3 | print('hello world')
|
||||
::: cell 3
|
||||
1 | # cell 3
|
||||
2 | def foo():
|
||||
3 | print()
|
||||
- x = 1
|
||||
4 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
");
|
||||
}
|
||||
|
||||
/// Carriage return (`\r`) is a valid line-ending in Python, so we should normalize this to a
|
||||
/// line feed (`\n`) for rendering. Otherwise we report a single long line for this case.
|
||||
#[test]
|
||||
@@ -559,4 +892,74 @@ print()
|
||||
|
|
||||
");
|
||||
}
|
||||
|
||||
/// Test that we handle the width calculation for the line number correctly even for context
|
||||
/// lines at the end of a diff. For example, we want it to render like this:
|
||||
///
|
||||
/// ```
|
||||
/// 8 |
|
||||
/// 9 |
|
||||
/// 10 |
|
||||
/// ```
|
||||
///
|
||||
/// and not like this:
|
||||
///
|
||||
/// ```
|
||||
/// 8 |
|
||||
/// 9 |
|
||||
/// 10 |
|
||||
/// ```
|
||||
#[test]
|
||||
fn longer_line_number_end_of_context() {
|
||||
let mut env = TestEnvironment::new();
|
||||
let contents = "\
|
||||
line 1
|
||||
line 2
|
||||
line 3
|
||||
line 4
|
||||
line 5
|
||||
line 6
|
||||
line 7
|
||||
line 8
|
||||
line 9
|
||||
line 10
|
||||
";
|
||||
env.add("example.py", contents);
|
||||
env.format(DiagnosticFormat::Full);
|
||||
env.show_fix_diff(true);
|
||||
env.fix_applicability(Applicability::DisplayOnly);
|
||||
|
||||
let mut diagnostic = env.err().primary("example.py", "3", "3", "label").build();
|
||||
diagnostic.help("Start of diff:");
|
||||
let target = "line 7";
|
||||
let line9 = contents.find(target).unwrap();
|
||||
let range = TextRange::at(TextSize::try_from(line9).unwrap(), target.text_len());
|
||||
diagnostic.set_fix(Fix::unsafe_edit(Edit::range_replacement(
|
||||
format!("fixed {target}"),
|
||||
range,
|
||||
)));
|
||||
|
||||
insta::assert_snapshot!(env.render(&diagnostic), @r"
|
||||
error[test-diagnostic][*]: main diagnostic message
|
||||
--> example.py:3:1
|
||||
|
|
||||
1 | line 1
|
||||
2 | line 2
|
||||
3 | line 3
|
||||
| ^^^^^^ label
|
||||
4 | line 4
|
||||
5 | line 5
|
||||
|
|
||||
help: Start of diff:
|
||||
4 | line 4
|
||||
5 | line 5
|
||||
6 | line 6
|
||||
- line 7
|
||||
7 + fixed line 7
|
||||
8 | line 8
|
||||
9 | line 9
|
||||
10 | line 10
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
");
|
||||
}
|
||||
}
|
||||
|
||||
205
crates/ruff_db/src/diagnostic/render/gitlab.rs
Normal file
205
crates/ruff_db/src/diagnostic/render/gitlab.rs
Normal file
@@ -0,0 +1,205 @@
|
||||
use std::{
|
||||
collections::HashSet,
|
||||
hash::{DefaultHasher, Hash, Hasher},
|
||||
path::Path,
|
||||
};
|
||||
|
||||
use ruff_source_file::LineColumn;
|
||||
use serde::{Serialize, Serializer, ser::SerializeSeq};
|
||||
|
||||
use crate::diagnostic::{Diagnostic, Severity};
|
||||
|
||||
use super::FileResolver;
|
||||
|
||||
pub(super) struct GitlabRenderer<'a> {
|
||||
resolver: &'a dyn FileResolver,
|
||||
}
|
||||
|
||||
impl<'a> GitlabRenderer<'a> {
|
||||
pub(super) fn new(resolver: &'a dyn FileResolver) -> Self {
|
||||
Self { resolver }
|
||||
}
|
||||
}
|
||||
|
||||
impl GitlabRenderer<'_> {
|
||||
pub(super) fn render(
|
||||
&self,
|
||||
f: &mut std::fmt::Formatter,
|
||||
diagnostics: &[Diagnostic],
|
||||
) -> std::fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"{}",
|
||||
serde_json::to_string_pretty(&SerializedMessages {
|
||||
diagnostics,
|
||||
resolver: self.resolver,
|
||||
#[expect(
|
||||
clippy::disallowed_methods,
|
||||
reason = "We don't have access to a `System` here, \
|
||||
and this is only intended for use by GitLab CI, \
|
||||
which runs on a real `System`."
|
||||
)]
|
||||
project_dir: std::env::var("CI_PROJECT_DIR").ok().as_deref(),
|
||||
})
|
||||
.unwrap()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
struct SerializedMessages<'a> {
|
||||
diagnostics: &'a [Diagnostic],
|
||||
resolver: &'a dyn FileResolver,
|
||||
project_dir: Option<&'a str>,
|
||||
}
|
||||
|
||||
impl Serialize for SerializedMessages<'_> {
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
S: Serializer,
|
||||
{
|
||||
let mut s = serializer.serialize_seq(Some(self.diagnostics.len()))?;
|
||||
let mut fingerprints = HashSet::<u64>::with_capacity(self.diagnostics.len());
|
||||
|
||||
for diagnostic in self.diagnostics {
|
||||
let location = diagnostic
|
||||
.primary_span()
|
||||
.map(|span| {
|
||||
let file = span.file();
|
||||
let positions = if self.resolver.is_notebook(file) {
|
||||
// We can't give a reasonable location for the structured formats,
|
||||
// so we show one that's clearly a fallback
|
||||
Default::default()
|
||||
} else {
|
||||
let diagnostic_source = file.diagnostic_source(self.resolver);
|
||||
let source_code = diagnostic_source.as_source_code();
|
||||
span.range()
|
||||
.map(|range| Positions {
|
||||
begin: source_code.line_column(range.start()),
|
||||
end: source_code.line_column(range.end()),
|
||||
})
|
||||
.unwrap_or_default()
|
||||
};
|
||||
|
||||
let path = self.project_dir.as_ref().map_or_else(
|
||||
|| file.relative_path(self.resolver).display().to_string(),
|
||||
|project_dir| relativize_path_to(file.path(self.resolver), project_dir),
|
||||
);
|
||||
|
||||
Location { path, positions }
|
||||
})
|
||||
.unwrap_or_default();
|
||||
|
||||
let mut message_fingerprint = fingerprint(diagnostic, &location.path, 0);
|
||||
|
||||
// Make sure that we do not get a fingerprint that is already in use
|
||||
// by adding in the previously generated one.
|
||||
while fingerprints.contains(&message_fingerprint) {
|
||||
message_fingerprint = fingerprint(diagnostic, &location.path, message_fingerprint);
|
||||
}
|
||||
fingerprints.insert(message_fingerprint);
|
||||
|
||||
let description = diagnostic.body();
|
||||
let check_name = diagnostic.secondary_code_or_id();
|
||||
let severity = match diagnostic.severity() {
|
||||
Severity::Info => "info",
|
||||
Severity::Warning => "minor",
|
||||
Severity::Error => "major",
|
||||
// Another option here is `blocker`
|
||||
Severity::Fatal => "critical",
|
||||
};
|
||||
|
||||
let value = Message {
|
||||
check_name,
|
||||
// GitLab doesn't display the separate `check_name` field in a Code Quality report,
|
||||
// so prepend it to the description too.
|
||||
description: format!("{check_name}: {description}"),
|
||||
severity,
|
||||
fingerprint: format!("{:x}", message_fingerprint),
|
||||
location,
|
||||
};
|
||||
|
||||
s.serialize_element(&value)?;
|
||||
}
|
||||
|
||||
s.end()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct Message<'a> {
|
||||
check_name: &'a str,
|
||||
description: String,
|
||||
severity: &'static str,
|
||||
fingerprint: String,
|
||||
location: Location,
|
||||
}
|
||||
|
||||
/// The place in the source code where the issue was discovered.
|
||||
///
|
||||
/// According to the CodeClimate report format [specification] linked from the GitLab [docs], this
|
||||
/// field is required, so we fall back on a default `path` and position if the diagnostic doesn't
|
||||
/// have a primary span.
|
||||
///
|
||||
/// [specification]: https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types
|
||||
/// [docs]: https://docs.gitlab.com/ci/testing/code_quality/#code-quality-report-format
|
||||
#[derive(Default, Serialize)]
|
||||
struct Location {
|
||||
path: String,
|
||||
positions: Positions,
|
||||
}
|
||||
|
||||
#[derive(Default, Serialize)]
|
||||
struct Positions {
|
||||
begin: LineColumn,
|
||||
end: LineColumn,
|
||||
}
|
||||
|
||||
/// Generate a unique fingerprint to identify a violation.
|
||||
fn fingerprint(diagnostic: &Diagnostic, project_path: &str, salt: u64) -> u64 {
|
||||
let mut hasher = DefaultHasher::new();
|
||||
|
||||
salt.hash(&mut hasher);
|
||||
diagnostic.name().hash(&mut hasher);
|
||||
project_path.hash(&mut hasher);
|
||||
|
||||
hasher.finish()
|
||||
}
|
||||
|
||||
/// Convert an absolute path to be relative to the specified project root.
|
||||
fn relativize_path_to<P: AsRef<Path>, R: AsRef<Path>>(path: P, project_root: R) -> String {
|
||||
format!(
|
||||
"{}",
|
||||
pathdiff::diff_paths(&path, project_root)
|
||||
.expect("Could not diff paths")
|
||||
.display()
|
||||
)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::diagnostic::{
|
||||
DiagnosticFormat,
|
||||
render::tests::{create_diagnostics, create_syntax_error_diagnostics},
|
||||
};
|
||||
|
||||
const FINGERPRINT_FILTERS: [(&str, &str); 1] = [(
|
||||
r#""fingerprint": "[a-z0-9]+","#,
|
||||
r#""fingerprint": "<redacted>","#,
|
||||
)];
|
||||
|
||||
#[test]
|
||||
fn output() {
|
||||
let (env, diagnostics) = create_diagnostics(DiagnosticFormat::Gitlab);
|
||||
insta::with_settings!({filters => FINGERPRINT_FILTERS}, {
|
||||
insta::assert_snapshot!(env.render_diagnostics(&diagnostics));
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn syntax_errors() {
|
||||
let (env, diagnostics) = create_syntax_error_diagnostics(DiagnosticFormat::Gitlab);
|
||||
insta::with_settings!({filters => FINGERPRINT_FILTERS}, {
|
||||
insta::assert_snapshot!(env.render_diagnostics(&diagnostics));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,63 +1,63 @@
|
||||
---
|
||||
source: crates/ruff_linter/src/message/gitlab.rs
|
||||
expression: redact_fingerprint(&content)
|
||||
source: crates/ruff_db/src/diagnostic/render/gitlab.rs
|
||||
expression: env.render_diagnostics(&diagnostics)
|
||||
---
|
||||
[
|
||||
{
|
||||
"check_name": "F401",
|
||||
"description": "F401: `os` imported but unused",
|
||||
"severity": "major",
|
||||
"fingerprint": "<redacted>",
|
||||
"location": {
|
||||
"path": "fib.py",
|
||||
"positions": {
|
||||
"begin": {
|
||||
"column": 8,
|
||||
"line": 1
|
||||
"line": 1,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"column": 10,
|
||||
"line": 1
|
||||
"line": 1,
|
||||
"column": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"severity": "major"
|
||||
}
|
||||
},
|
||||
{
|
||||
"check_name": "F841",
|
||||
"description": "F841: Local variable `x` is assigned to but never used",
|
||||
"severity": "major",
|
||||
"fingerprint": "<redacted>",
|
||||
"location": {
|
||||
"path": "fib.py",
|
||||
"positions": {
|
||||
"begin": {
|
||||
"column": 5,
|
||||
"line": 6
|
||||
"line": 6,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"column": 6,
|
||||
"line": 6
|
||||
"line": 6,
|
||||
"column": 6
|
||||
}
|
||||
}
|
||||
},
|
||||
"severity": "major"
|
||||
}
|
||||
},
|
||||
{
|
||||
"check_name": "F821",
|
||||
"description": "F821: Undefined name `a`",
|
||||
"severity": "major",
|
||||
"fingerprint": "<redacted>",
|
||||
"location": {
|
||||
"path": "undef.py",
|
||||
"positions": {
|
||||
"begin": {
|
||||
"column": 4,
|
||||
"line": 1
|
||||
"line": 1,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"column": 5,
|
||||
"line": 1
|
||||
"line": 1,
|
||||
"column": 5
|
||||
}
|
||||
}
|
||||
},
|
||||
"severity": "major"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,44 +1,44 @@
|
||||
---
|
||||
source: crates/ruff_linter/src/message/gitlab.rs
|
||||
expression: redact_fingerprint(&content)
|
||||
source: crates/ruff_db/src/diagnostic/render/gitlab.rs
|
||||
expression: env.render_diagnostics(&diagnostics)
|
||||
---
|
||||
[
|
||||
{
|
||||
"check_name": "invalid-syntax",
|
||||
"description": "invalid-syntax: Expected one or more symbol names after import",
|
||||
"severity": "major",
|
||||
"fingerprint": "<redacted>",
|
||||
"location": {
|
||||
"path": "syntax_errors.py",
|
||||
"positions": {
|
||||
"begin": {
|
||||
"column": 15,
|
||||
"line": 1
|
||||
"line": 1,
|
||||
"column": 15
|
||||
},
|
||||
"end": {
|
||||
"column": 1,
|
||||
"line": 2
|
||||
"line": 2,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"severity": "major"
|
||||
}
|
||||
},
|
||||
{
|
||||
"check_name": "invalid-syntax",
|
||||
"description": "invalid-syntax: Expected ')', found newline",
|
||||
"severity": "major",
|
||||
"fingerprint": "<redacted>",
|
||||
"location": {
|
||||
"path": "syntax_errors.py",
|
||||
"positions": {
|
||||
"begin": {
|
||||
"column": 12,
|
||||
"line": 3
|
||||
"line": 3,
|
||||
"column": 12
|
||||
},
|
||||
"end": {
|
||||
"column": 1,
|
||||
"line": 4
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"severity": "major"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -43,6 +43,10 @@ pub struct DiagnosticStylesheet {
|
||||
pub(crate) none: Style,
|
||||
pub(crate) separator: Style,
|
||||
pub(crate) secondary_code: Style,
|
||||
pub(crate) insertion: Style,
|
||||
pub(crate) deletion: Style,
|
||||
pub(crate) insertion_line_no: Style,
|
||||
pub(crate) deletion_line_no: Style,
|
||||
}
|
||||
|
||||
impl Default for DiagnosticStylesheet {
|
||||
@@ -66,6 +70,10 @@ impl DiagnosticStylesheet {
|
||||
none: Style::new(),
|
||||
separator: AnsiColor::Cyan.on_default(),
|
||||
secondary_code: AnsiColor::Red.on_default().effects(Effects::BOLD),
|
||||
insertion: AnsiColor::Green.on_default(),
|
||||
deletion: AnsiColor::Red.on_default(),
|
||||
insertion_line_no: AnsiColor::Green.on_default().effects(Effects::BOLD),
|
||||
deletion_line_no: AnsiColor::Red.on_default().effects(Effects::BOLD),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +89,10 @@ impl DiagnosticStylesheet {
|
||||
none: Style::new(),
|
||||
separator: Style::new(),
|
||||
secondary_code: Style::new(),
|
||||
insertion: Style::new(),
|
||||
deletion: Style::new(),
|
||||
insertion_line_no: Style::new(),
|
||||
deletion_line_no: Style::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#![warn(
|
||||
clippy::disallowed_methods,
|
||||
reason = "Prefer System trait methods over std methods"
|
||||
)]
|
||||
|
||||
use crate::files::Files;
|
||||
use crate::system::System;
|
||||
use crate::vendored::VendoredFileSystem;
|
||||
@@ -65,6 +70,10 @@ pub trait Db: salsa::Database {
|
||||
/// to process work in parallel. For example, to index a directory or checking the files of a project.
|
||||
/// ty can still spawn more threads for other tasks, e.g. to wait for a Ctrl+C signal or
|
||||
/// watching the files for changes.
|
||||
#[expect(
|
||||
clippy::disallowed_methods,
|
||||
reason = "We don't have access to System here, but this is also only used by the CLI and the server which always run on a real system."
|
||||
)]
|
||||
pub fn max_parallelism() -> NonZeroUsize {
|
||||
std::env::var(EnvVars::TY_MAX_PARALLELISM)
|
||||
.or_else(|_| std::env::var(EnvVars::RAYON_NUM_THREADS))
|
||||
|
||||
@@ -92,14 +92,14 @@ impl ParsedModule {
|
||||
self.inner.store(None);
|
||||
}
|
||||
|
||||
/// Returns a pointer for this [`ParsedModule`].
|
||||
/// Returns the pointer address of this [`ParsedModule`].
|
||||
///
|
||||
/// The pointer uniquely identifies the module within the current Salsa revision,
|
||||
/// regardless of whether particular [`ParsedModuleRef`] instances are garbage collected.
|
||||
pub fn as_ptr(&self) -> *const () {
|
||||
pub fn addr(&self) -> usize {
|
||||
// Note that the outer `Arc` in `inner` is stable across garbage collection, while the inner
|
||||
// `Arc` within the `ArcSwap` may change.
|
||||
Arc::as_ptr(&self.inner).cast()
|
||||
Arc::as_ptr(&self.inner).addr()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,9 +202,13 @@ mod indexed {
|
||||
|
||||
/// Returns the node at the given index.
|
||||
pub fn get_by_index<'ast>(&'ast self, index: NodeIndex) -> AnyRootNodeRef<'ast> {
|
||||
let index = index
|
||||
.as_u32()
|
||||
.expect("attempted to access uninitialized `NodeIndex`");
|
||||
|
||||
// Note that this method restores the correct lifetime: the nodes are valid for as
|
||||
// long as the reference to `IndexedModule` is alive.
|
||||
self.index[index.as_usize()]
|
||||
self.index[index as usize]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +224,7 @@ mod indexed {
|
||||
T: HasNodeIndex + std::fmt::Debug,
|
||||
AnyRootNodeRef<'a>: From<&'a T>,
|
||||
{
|
||||
node.node_index().set(self.index);
|
||||
node.node_index().set(NodeIndex::from(self.index));
|
||||
self.nodes.push(AnyRootNodeRef::from(node));
|
||||
self.index += 1;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ pub type Result<T> = std::io::Result<T>;
|
||||
/// * File watching isn't supported.
|
||||
///
|
||||
/// Abstracting the system also enables tests to use a more efficient in-memory file system.
|
||||
pub trait System: Debug {
|
||||
pub trait System: Debug + Sync + Send {
|
||||
/// Reads the metadata of the file or directory at `path`.
|
||||
///
|
||||
/// This function will traverse symbolic links to query information about the destination file.
|
||||
@@ -197,6 +197,8 @@ pub trait System: Debug {
|
||||
fn as_any(&self) -> &dyn std::any::Any;
|
||||
|
||||
fn as_any_mut(&mut self) -> &mut dyn std::any::Any;
|
||||
|
||||
fn dyn_clone(&self) -> Box<dyn System>;
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Copy, Clone, Eq, PartialEq)]
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![allow(clippy::disallowed_methods)]
|
||||
|
||||
use super::walk_directory::{
|
||||
self, DirectoryWalker, WalkDirectoryBuilder, WalkDirectoryConfiguration,
|
||||
WalkDirectoryVisitorBuilder, WalkState,
|
||||
@@ -255,6 +257,10 @@ impl System for OsSystem {
|
||||
fn env_var(&self, name: &str) -> std::result::Result<String, std::env::VarError> {
|
||||
std::env::var(name)
|
||||
}
|
||||
|
||||
fn dyn_clone(&self) -> Box<dyn System> {
|
||||
Box::new(self.clone())
|
||||
}
|
||||
}
|
||||
|
||||
impl OsSystem {
|
||||
|
||||
@@ -146,6 +146,10 @@ impl System for TestSystem {
|
||||
fn case_sensitivity(&self) -> CaseSensitivity {
|
||||
self.system().case_sensitivity()
|
||||
}
|
||||
|
||||
fn dyn_clone(&self) -> Box<dyn System> {
|
||||
Box::new(self.clone())
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for TestSystem {
|
||||
@@ -394,6 +398,13 @@ impl System for InMemorySystem {
|
||||
fn case_sensitivity(&self) -> CaseSensitivity {
|
||||
CaseSensitivity::CaseSensitive
|
||||
}
|
||||
|
||||
fn dyn_clone(&self) -> Box<dyn System> {
|
||||
Box::new(Self {
|
||||
user_config_directory: Mutex::new(self.user_config_directory.lock().unwrap().clone()),
|
||||
memory_fs: self.memory_fs.clone(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl WritableSystem for InMemorySystem {
|
||||
|
||||
@@ -13,6 +13,7 @@ license = { workspace = true }
|
||||
[dependencies]
|
||||
ty = { workspace = true }
|
||||
ty_project = { workspace = true, features = ["schemars"] }
|
||||
ty_python_semantic = { workspace = true }
|
||||
ty_static = { workspace = true }
|
||||
ruff = { workspace = true }
|
||||
ruff_formatter = { workspace = true }
|
||||
|
||||
@@ -52,7 +52,7 @@ pub(crate) fn main(args: &Args) -> Result<()> {
|
||||
}
|
||||
|
||||
fn generate_markdown() -> String {
|
||||
let registry = &*ty_project::DEFAULT_LINT_REGISTRY;
|
||||
let registry = ty_python_semantic::default_lint_registry();
|
||||
|
||||
let mut output = String::new();
|
||||
|
||||
|
||||
@@ -14,8 +14,11 @@ license = { workspace = true }
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
ruff_text_size = { workspace = true }
|
||||
ruff_text_size = { workspace = true, features = ["get-size"] }
|
||||
|
||||
get-size2 = { workspace = true }
|
||||
is-macro = { workspace = true }
|
||||
serde = { workspace = true, optional = true, features = [] }
|
||||
|
||||
[features]
|
||||
serde = ["dep:serde", "ruff_text_size/serde"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ruff_linter"
|
||||
version = "0.12.9"
|
||||
version = "0.12.11"
|
||||
publish = false
|
||||
authors = { workspace = true }
|
||||
edition = { workspace = true }
|
||||
@@ -51,7 +51,6 @@ path-absolutize = { workspace = true, features = [
|
||||
"once_cell_cache",
|
||||
"use_unix_paths_on_wasm",
|
||||
] }
|
||||
pathdiff = { workspace = true }
|
||||
pep440_rs = { workspace = true }
|
||||
pyproject-toml = { workspace = true }
|
||||
regex = { workspace = true }
|
||||
|
||||
@@ -34,7 +34,7 @@ task_group()
|
||||
setup()
|
||||
from airflow.decorators import teardown
|
||||
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 (
|
||||
Connection,
|
||||
@@ -74,3 +74,36 @@ DatasetOrTimeSchedule()
|
||||
|
||||
# airflow.utils.dag_parsing_context
|
||||
get_parsing_context()
|
||||
|
||||
from airflow.decorators.base import (
|
||||
DecoratedMappedOperator,
|
||||
DecoratedOperator,
|
||||
TaskDecorator,
|
||||
get_unique_task_id,
|
||||
task_decorator_factory,
|
||||
)
|
||||
|
||||
# airflow.decorators.base
|
||||
DecoratedMappedOperator()
|
||||
DecoratedOperator()
|
||||
TaskDecorator()
|
||||
get_unique_task_id()
|
||||
task_decorator_factory()
|
||||
|
||||
|
||||
from airflow.models import Param
|
||||
|
||||
# airflow.models
|
||||
Param()
|
||||
|
||||
|
||||
from airflow.sensors.base import (
|
||||
BaseSensorOperator,
|
||||
PokeReturnValue,
|
||||
poke_mode_only,
|
||||
)
|
||||
|
||||
# airflow.sensors.base
|
||||
BaseSensorOperator()
|
||||
PokeReturnValue()
|
||||
poke_mode_only()
|
||||
|
||||
@@ -9,7 +9,6 @@ from airflow.operators.empty import EmptyOperator
|
||||
from airflow.operators.latest_only import LatestOnlyOperator
|
||||
from airflow.operators.trigger_dagrun import TriggerDagRunOperator
|
||||
from airflow.operators.weekday import BranchDayOfWeekOperator
|
||||
from airflow.sensors.date_time import DateTimeSensor
|
||||
|
||||
FSHook()
|
||||
PackageIndexHook()
|
||||
@@ -22,7 +21,6 @@ EmptyOperator()
|
||||
|
||||
LatestOnlyOperator()
|
||||
BranchDayOfWeekOperator()
|
||||
DateTimeSensor()
|
||||
|
||||
from airflow.operators.python import (
|
||||
BranchPythonOperator,
|
||||
@@ -30,16 +28,23 @@ from airflow.operators.python import (
|
||||
PythonVirtualenvOperator,
|
||||
ShortCircuitOperator,
|
||||
)
|
||||
from airflow.sensors.bash import BashSensor
|
||||
from airflow.sensors.date_time import DateTimeSensor
|
||||
|
||||
BranchPythonOperator()
|
||||
PythonOperator()
|
||||
PythonVirtualenvOperator()
|
||||
ShortCircuitOperator()
|
||||
|
||||
BashSensor()
|
||||
DateTimeSensor()
|
||||
from airflow.sensors.date_time import DateTimeSensorAsync
|
||||
from airflow.sensors.external_task import (
|
||||
ExternalTaskMarker,
|
||||
ExternalTaskSensor,
|
||||
)
|
||||
from airflow.sensors.time_sensor import (
|
||||
TimeSensor,
|
||||
TimeSensorAsync,
|
||||
)
|
||||
from airflow.sensors.filesystem import FileSensor
|
||||
from airflow.sensors.python import PythonSensor
|
||||
|
||||
BranchPythonOperator()
|
||||
PythonOperator()
|
||||
@@ -49,6 +54,13 @@ DateTimeSensorAsync()
|
||||
ExternalTaskMarker()
|
||||
ExternalTaskSensor()
|
||||
FileSensor()
|
||||
PythonSensor()
|
||||
|
||||
from airflow.sensors.time_sensor import (
|
||||
TimeSensor,
|
||||
TimeSensorAsync,
|
||||
)
|
||||
|
||||
TimeSensor()
|
||||
TimeSensorAsync()
|
||||
|
||||
|
||||
@@ -213,3 +213,17 @@ async def get_id_pydantic_full(
|
||||
async def get_id_pydantic_short(params: Annotated[PydanticParams, Depends()]): ...
|
||||
@app.get("/{my_id}")
|
||||
async def get_id_init_not_annotated(params = Depends(InitParams)): ...
|
||||
|
||||
@app.get("/things/{ thing_id }")
|
||||
async def read_thing(query: str):
|
||||
return {"query": query}
|
||||
|
||||
|
||||
@app.get("/things/{ thing_id : path }")
|
||||
async def read_thing(query: str):
|
||||
return {"query": query}
|
||||
|
||||
|
||||
@app.get("/things/{ thing_id : str }")
|
||||
async def read_thing(query: str):
|
||||
return {"query": query}
|
||||
|
||||
75
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC212.py
vendored
Normal file
75
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC212.py
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
from typing import Optional
|
||||
|
||||
import httpx
|
||||
|
||||
|
||||
def foo():
|
||||
client = httpx.Client()
|
||||
client.close() # Ok
|
||||
client.delete() # Ok
|
||||
client.get() # Ok
|
||||
client.head() # Ok
|
||||
client.options() # Ok
|
||||
client.patch() # Ok
|
||||
client.post() # Ok
|
||||
client.put() # Ok
|
||||
client.request() # Ok
|
||||
client.send() # Ok
|
||||
client.stream() # Ok
|
||||
|
||||
client.anything() # Ok
|
||||
client.build_request() # Ok
|
||||
client.is_closed # Ok
|
||||
|
||||
|
||||
async def foo():
|
||||
client = httpx.Client()
|
||||
client.close() # ASYNC212
|
||||
client.delete() # ASYNC212
|
||||
client.get() # ASYNC212
|
||||
client.head() # ASYNC212
|
||||
client.options() # ASYNC212
|
||||
client.patch() # ASYNC212
|
||||
client.post() # ASYNC212
|
||||
client.put() # ASYNC212
|
||||
client.request() # ASYNC212
|
||||
client.send() # ASYNC212
|
||||
client.stream() # ASYNC212
|
||||
|
||||
client.anything() # Ok
|
||||
client.build_request() # Ok
|
||||
client.is_closed # Ok
|
||||
|
||||
|
||||
async def foo(client: httpx.Client):
|
||||
client.request() # ASYNC212
|
||||
client.anything() # Ok
|
||||
|
||||
|
||||
async def foo(client: httpx.Client | None):
|
||||
client.request() # ASYNC212
|
||||
client.anything() # Ok
|
||||
|
||||
|
||||
async def foo(client: Optional[httpx.Client]):
|
||||
client.request() # ASYNC212
|
||||
client.anything() # Ok
|
||||
|
||||
|
||||
async def foo():
|
||||
client: httpx.Client = ...
|
||||
client.request() # ASYNC212
|
||||
client.anything() # Ok
|
||||
|
||||
|
||||
global_client = httpx.Client()
|
||||
|
||||
|
||||
async def foo():
|
||||
global_client.request() # ASYNC212
|
||||
global_client.anything() # Ok
|
||||
|
||||
|
||||
async def foo():
|
||||
async with httpx.AsyncClient() as client:
|
||||
await client.get() # Ok
|
||||
22
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC250.py
vendored
Normal file
22
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC250.py
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
def foo():
|
||||
k = input() # Ok
|
||||
input("hello world") # Ok
|
||||
|
||||
|
||||
async def foo():
|
||||
k = input() # ASYNC250
|
||||
input("hello world") # ASYNC250
|
||||
|
||||
|
||||
import builtins
|
||||
|
||||
import fake
|
||||
|
||||
|
||||
def foo():
|
||||
builtins.input("testing") # Ok
|
||||
|
||||
|
||||
async def foo():
|
||||
builtins.input("testing") # ASYNC250
|
||||
fake.input("whatever") # Ok
|
||||
@@ -17,3 +17,50 @@ info(f"{__name__}")
|
||||
# Don't trigger for t-strings
|
||||
info(t"{name}")
|
||||
info(t"{__name__}")
|
||||
|
||||
count = 5
|
||||
total = 9
|
||||
directory_path = "/home/hamir/ruff/crates/ruff_linter/resources/test/"
|
||||
logging.info(f"{count} out of {total} files in {directory_path} checked")
|
||||
|
||||
|
||||
|
||||
x = 99
|
||||
fmt = "08d"
|
||||
logger.info(f"{x:{'08d'}}")
|
||||
logger.info(f"{x:>10} {x:{fmt}}")
|
||||
|
||||
logging.info(f"")
|
||||
logging.info(f"This message doesn't have any variables.")
|
||||
|
||||
obj = {"key": "value"}
|
||||
logging.info(f"Object: {obj!r}")
|
||||
|
||||
items_count = 3
|
||||
logging.warning(f"Items: {items_count:d}")
|
||||
|
||||
data = {"status": "active"}
|
||||
logging.info(f"Processing {len(data)} items")
|
||||
logging.info(f"Status: {data.get('status', 'unknown').upper()}")
|
||||
|
||||
|
||||
result = 123
|
||||
logging.info(f"Calculated result: {result + 100}")
|
||||
|
||||
temperature = 123
|
||||
logging.info(f"Temperature: {temperature:.1f}°C")
|
||||
|
||||
class FilePath:
|
||||
def __init__(self, name: str):
|
||||
self.name = name
|
||||
|
||||
logging.info(f"No changes made to {file_path.name}.")
|
||||
|
||||
user = "tron"
|
||||
balance = 123.45
|
||||
logging.error(f"Error {404}: User {user} has insufficient balance ${balance:.2f}")
|
||||
|
||||
import logging
|
||||
|
||||
x = 1
|
||||
logging.error(f"{x} -> %s", x)
|
||||
|
||||
10
crates/ruff_linter/resources/test/fixtures/flake8_logging_format/G004_arg_order.py
vendored
Normal file
10
crates/ruff_linter/resources/test/fixtures/flake8_logging_format/G004_arg_order.py
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"""Test f-string argument order."""
|
||||
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
X = 1
|
||||
Y = 2
|
||||
logger.error(f"{X} -> %s", Y)
|
||||
logger.error(f"{Y} -> %s", X)
|
||||
@@ -23,3 +23,11 @@ def test_error():
|
||||
assert list([])
|
||||
assert set(set())
|
||||
assert tuple("")
|
||||
|
||||
# https://github.com/astral-sh/ruff/issues/19935
|
||||
def test_all_ok():
|
||||
assert f"{b""}"
|
||||
assert f"{""=}"
|
||||
assert f"{""!a}"
|
||||
assert f"{""!r}"
|
||||
assert f"{"":1}"
|
||||
|
||||
@@ -166,3 +166,7 @@ r"""first
|
||||
print("S\x1cP\x1dL\x1eI\x1fT".split())
|
||||
print("\x1c\x1d\x1e\x1f>".split(maxsplit=0))
|
||||
print("<\x1c\x1d\x1e\x1f".rsplit(maxsplit=0))
|
||||
|
||||
# leading/trailing whitespace should not count towards maxsplit
|
||||
" a b c d ".split(maxsplit=2) # ["a", "b", "c d "]
|
||||
" a b c d ".rsplit(maxsplit=2) # [" a b", "c", "d"]
|
||||
|
||||
@@ -13,3 +13,11 @@ Path("tmp/python").symlink_to("usr/bin/python", target_is_directory=True) # Ok
|
||||
fd = os.open(".", os.O_RDONLY)
|
||||
os.symlink("source.txt", "link.txt", dir_fd=fd) # Ok: dir_fd is not supported by pathlib
|
||||
os.close(fd)
|
||||
|
||||
os.symlink(src="usr/bin/python", dst="tmp/python", unknown=True)
|
||||
os.symlink("usr/bin/python", dst="tmp/python", target_is_directory=False)
|
||||
|
||||
os.symlink(src="usr/bin/python", dst="tmp/python", dir_fd=None)
|
||||
|
||||
os.symlink("usr/bin/python", dst="tmp/python", target_is_directory= True )
|
||||
os.symlink("usr/bin/python", dst="tmp/python", target_is_directory="nonboolean")
|
||||
|
||||
@@ -106,4 +106,22 @@ os.replace("src", "dst", src_dir_fd=1)
|
||||
os.replace("src", "dst", dst_dir_fd=2)
|
||||
|
||||
os.getcwd()
|
||||
os.getcwdb()
|
||||
os.getcwdb()
|
||||
|
||||
os.mkdir(path="directory")
|
||||
|
||||
os.mkdir(
|
||||
# comment 1
|
||||
"directory",
|
||||
mode=0o777
|
||||
)
|
||||
|
||||
os.mkdir("directory", mode=0o777, dir_fd=1)
|
||||
|
||||
os.makedirs("name", 0o777, exist_ok=False)
|
||||
|
||||
os.makedirs("name", 0o777, False)
|
||||
|
||||
os.makedirs(name="name", mode=0o777, exist_ok=False)
|
||||
|
||||
os.makedirs("name", unknown_kwarg=True)
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
"""Hello, world!"""\
|
||||
\
|
||||
|
||||
x = 1; y = 2
|
||||
@@ -192,3 +192,24 @@ def issue_19005_3():
|
||||
c = {}
|
||||
for a[0], a[1] in ():
|
||||
c[a[0]] = a[1]
|
||||
|
||||
|
||||
def issue_19153_1():
|
||||
v = {}
|
||||
for o, (x,) in ["ox"]:
|
||||
v[x,] = o
|
||||
return v
|
||||
|
||||
|
||||
def issue_19153_2():
|
||||
v = {}
|
||||
for (o, p), x in [("op", "x")]:
|
||||
v[x] = o, p
|
||||
return v
|
||||
|
||||
|
||||
def issue_19153_3():
|
||||
v = {}
|
||||
for o, (x,) in ["ox"]:
|
||||
v[(x,)] = o
|
||||
return v
|
||||
@@ -190,3 +190,12 @@ foo_tooltip = (
|
||||
more
|
||||
|
||||
)
|
||||
|
||||
# https://github.com/astral-sh/ruff/issues/20097
|
||||
def scope():
|
||||
from collections.abc import Callable
|
||||
from typing import ParamSpec
|
||||
|
||||
P = ParamSpec("P")
|
||||
f1: Callable[P, str] = lambda x: str(x)
|
||||
f2: Callable[..., str] = lambda x: str(x)
|
||||
|
||||
16
crates/ruff_linter/resources/test/fixtures/pyflakes/F401_35.py
vendored
Normal file
16
crates/ruff_linter/resources/test/fixtures/pyflakes/F401_35.py
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Test: allowed-unused-imports-top-level-module
|
||||
"""
|
||||
|
||||
# No errors
|
||||
|
||||
def f():
|
||||
import hvplot
|
||||
def f():
|
||||
import hvplot.pandas
|
||||
def f():
|
||||
import hvplot.pandas.plots
|
||||
def f():
|
||||
from hvplot.pandas import scatter_matrix
|
||||
def f():
|
||||
from hvplot.pandas.plots import scatter_matrix
|
||||
@@ -151,3 +151,39 @@ def f():
|
||||
pass
|
||||
except Exception as _:
|
||||
pass
|
||||
|
||||
|
||||
# OK, `__class__` in this case is not the special `__class__` cell, so we don't
|
||||
# emit a diagnostic. (It has its own special semantics -- see
|
||||
# https://github.com/astral-sh/ruff/pull/20048#discussion_r2298338048 -- but
|
||||
# those aren't relevant here.)
|
||||
class A:
|
||||
__class__ = 1
|
||||
|
||||
|
||||
# The following three cases are flagged because they declare local `__class__`
|
||||
# variables that don't refer to the special `__class__` cell.
|
||||
class A:
|
||||
def set_class(self, cls):
|
||||
__class__ = cls # F841
|
||||
|
||||
|
||||
class A:
|
||||
class B:
|
||||
def set_class(self, cls):
|
||||
__class__ = cls # F841
|
||||
|
||||
|
||||
class A:
|
||||
def foo():
|
||||
class B:
|
||||
print(__class__)
|
||||
def set_class(self, cls):
|
||||
__class__ = cls # F841
|
||||
|
||||
|
||||
# OK, the `__class__` cell is nonlocal and declared as such.
|
||||
class NonlocalDunderClass:
|
||||
def foo():
|
||||
nonlocal __class__
|
||||
__class__ = 1
|
||||
|
||||
@@ -4,6 +4,9 @@ print("שלום")
|
||||
# E2502
|
||||
example = "x" * 100 # "x" is assigned
|
||||
|
||||
# E2502
|
||||
another = "x" * 50 # "x" is assigned
|
||||
|
||||
# E2502
|
||||
if access_level != "none": # Check if admin ' and access_level != 'user
|
||||
print("You are an admin.")
|
||||
|
||||
@@ -44,3 +44,8 @@ def f():
|
||||
def g():
|
||||
nonlocal x
|
||||
x = 2
|
||||
|
||||
# OK
|
||||
class A:
|
||||
def method(self):
|
||||
nonlocal __class__
|
||||
|
||||
18
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP010_1.py
vendored
Normal file
18
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP010_1.py
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
from __future__ import nested_scopes, generators
|
||||
from __future__ import with_statement, unicode_literals
|
||||
|
||||
from __future__ import absolute_import, division
|
||||
from __future__ import generator_stop
|
||||
from __future__ import print_function, nested_scopes, generator_stop
|
||||
|
||||
print(with_statement)
|
||||
generators = 1
|
||||
|
||||
|
||||
class Foo():
|
||||
|
||||
def boo(self):
|
||||
print(division)
|
||||
|
||||
|
||||
__all__ = ["print_function", "generator_stop"]
|
||||
@@ -69,3 +69,10 @@ a7: OptionalTE[typing.NamedTuple] = None
|
||||
a8: typing_extensions.Optional[typing.NamedTuple] = None
|
||||
a9: "Optional[NamedTuple]" = None
|
||||
a10: Optional[NamedTupleTE] = None
|
||||
|
||||
|
||||
# Test for: https://github.com/astral-sh/ruff/issues/19746
|
||||
# Nested Optional types should be flattened
|
||||
nested_optional: Optional[Optional[str]] = None
|
||||
nested_optional_typing: typing.Optional[Optional[int]] = None
|
||||
triple_nested_optional: Optional[Optional[Optional[str]]] = None
|
||||
|
||||
@@ -118,3 +118,10 @@ def func():
|
||||
return lambda: value
|
||||
|
||||
defaultdict(constant_factory("<missing>"))
|
||||
|
||||
def func():
|
||||
defaultdict(default_factory=t"") # OK
|
||||
|
||||
|
||||
def func():
|
||||
defaultdict(default_factory=t"hello") # OK
|
||||
|
||||
@@ -124,3 +124,19 @@ def fun_with_python_syntax():
|
||||
...
|
||||
|
||||
return Foo
|
||||
|
||||
|
||||
@dataclass
|
||||
class C:
|
||||
def __post_init__(self, x: tuple[int, ...] = (
|
||||
1,
|
||||
2,
|
||||
)) -> None:
|
||||
self.x = x
|
||||
|
||||
|
||||
@dataclass
|
||||
class D:
|
||||
def __post_init__(self, x: int = """
|
||||
""") -> None:
|
||||
self.x = x
|
||||
|
||||
@@ -102,3 +102,17 @@ deque("abc") # OK
|
||||
deque(b"abc") # OK
|
||||
deque(f"" "a") # OK
|
||||
deque(f"{x}" "") # OK
|
||||
|
||||
# https://github.com/astral-sh/ruff/issues/19951
|
||||
deque(t"")
|
||||
deque(t"" t"")
|
||||
deque(t"{""}") # OK
|
||||
|
||||
# https://github.com/astral-sh/ruff/issues/20050
|
||||
deque(f"{""}") # RUF037
|
||||
|
||||
deque(f"{b""}")
|
||||
deque(f"{""=}")
|
||||
deque(f"{""!a}")
|
||||
deque(f"{""!r}")
|
||||
deque(f"{"":1}")
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
use ruff_python_ast::PythonVersion;
|
||||
use ruff_python_semantic::{Binding, ScopeKind};
|
||||
|
||||
use crate::checkers::ast::Checker;
|
||||
use crate::codes::Rule;
|
||||
use crate::rules::{
|
||||
flake8_builtins, flake8_pyi, flake8_type_checking, flake8_unused_arguments, pep8_naming,
|
||||
pyflakes, pylint, ruff,
|
||||
pyflakes, pylint, pyupgrade, ruff,
|
||||
};
|
||||
|
||||
/// Run lint rules over all deferred scopes in the [`SemanticModel`].
|
||||
@@ -45,6 +46,7 @@ pub(crate) fn deferred_scopes(checker: &Checker) {
|
||||
Rule::UnusedStaticMethodArgument,
|
||||
Rule::UnusedUnpackedVariable,
|
||||
Rule::UnusedVariable,
|
||||
Rule::UnnecessaryFutureImport,
|
||||
]) {
|
||||
return;
|
||||
}
|
||||
@@ -224,6 +226,11 @@ pub(crate) fn deferred_scopes(checker: &Checker) {
|
||||
if checker.is_rule_enabled(Rule::UnusedImport) {
|
||||
pyflakes::rules::unused_import(checker, scope);
|
||||
}
|
||||
if checker.is_rule_enabled(Rule::UnnecessaryFutureImport) {
|
||||
if checker.target_version() >= PythonVersion::PY37 {
|
||||
pyupgrade::rules::unnecessary_future_import(checker, scope);
|
||||
}
|
||||
}
|
||||
|
||||
if checker.is_rule_enabled(Rule::ImportPrivateName) {
|
||||
pylint::rules::import_private_name(checker, scope);
|
||||
|
||||
@@ -660,6 +660,9 @@ pub(crate) fn expression(expr: &Expr, checker: &Checker) {
|
||||
if checker.is_rule_enabled(Rule::BlockingHttpCallInAsyncFunction) {
|
||||
flake8_async::rules::blocking_http_call(checker, call);
|
||||
}
|
||||
if checker.is_rule_enabled(Rule::BlockingHttpCallHttpxInAsyncFunction) {
|
||||
flake8_async::rules::blocking_http_call_httpx(checker, call);
|
||||
}
|
||||
if checker.is_rule_enabled(Rule::BlockingOpenCallInAsyncFunction) {
|
||||
flake8_async::rules::blocking_open_call(checker, call);
|
||||
}
|
||||
@@ -670,6 +673,9 @@ pub(crate) fn expression(expr: &Expr, checker: &Checker) {
|
||||
]) {
|
||||
flake8_async::rules::blocking_process_invocation(checker, call);
|
||||
}
|
||||
if checker.is_rule_enabled(Rule::BlockingInputInAsyncFunction) {
|
||||
flake8_async::rules::blocking_input(checker, call);
|
||||
}
|
||||
if checker.is_rule_enabled(Rule::BlockingSleepInAsyncFunction) {
|
||||
flake8_async::rules::blocking_sleep(checker, call);
|
||||
}
|
||||
@@ -1039,8 +1045,6 @@ pub(crate) fn expression(expr: &Expr, checker: &Checker) {
|
||||
flake8_simplify::rules::zip_dict_keys_and_values(checker, call);
|
||||
}
|
||||
if checker.any_rule_enabled(&[
|
||||
Rule::OsMkdir,
|
||||
Rule::OsMakedirs,
|
||||
Rule::OsStat,
|
||||
Rule::OsPathJoin,
|
||||
Rule::OsPathSplitext,
|
||||
@@ -1048,7 +1052,6 @@ pub(crate) fn expression(expr: &Expr, checker: &Checker) {
|
||||
Rule::PyPath,
|
||||
Rule::Glob,
|
||||
Rule::OsListdir,
|
||||
Rule::OsSymlink,
|
||||
]) {
|
||||
flake8_use_pathlib::rules::replaceable_by_pathlib(checker, call);
|
||||
}
|
||||
@@ -1120,6 +1123,15 @@ pub(crate) fn expression(expr: &Expr, checker: &Checker) {
|
||||
if checker.is_rule_enabled(Rule::OsPathSamefile) {
|
||||
flake8_use_pathlib::rules::os_path_samefile(checker, call, segments);
|
||||
}
|
||||
if checker.is_rule_enabled(Rule::OsMkdir) {
|
||||
flake8_use_pathlib::rules::os_mkdir(checker, call, segments);
|
||||
}
|
||||
if checker.is_rule_enabled(Rule::OsMakedirs) {
|
||||
flake8_use_pathlib::rules::os_makedirs(checker, call, segments);
|
||||
}
|
||||
if checker.is_rule_enabled(Rule::OsSymlink) {
|
||||
flake8_use_pathlib::rules::os_symlink(checker, call, segments);
|
||||
}
|
||||
if checker.is_rule_enabled(Rule::PathConstructorCurrentDirectory) {
|
||||
flake8_use_pathlib::rules::path_constructor_current_directory(
|
||||
checker, call, segments,
|
||||
|
||||
@@ -728,13 +728,6 @@ pub(crate) fn statement(stmt: &Stmt, checker: &mut Checker) {
|
||||
pylint::rules::non_ascii_module_import(checker, alias);
|
||||
}
|
||||
}
|
||||
if checker.is_rule_enabled(Rule::UnnecessaryFutureImport) {
|
||||
if checker.target_version() >= PythonVersion::PY37 {
|
||||
if let Some("__future__") = module {
|
||||
pyupgrade::rules::unnecessary_future_import(checker, stmt, names);
|
||||
}
|
||||
}
|
||||
}
|
||||
if checker.is_rule_enabled(Rule::DeprecatedMockImport) {
|
||||
pyupgrade::rules::deprecated_mock_import(checker, stmt);
|
||||
}
|
||||
|
||||
@@ -703,7 +703,10 @@ impl SemanticSyntaxContext for Checker<'_> {
|
||||
match scope.kind {
|
||||
ScopeKind::Class(_) | ScopeKind::Lambda(_) => return false,
|
||||
ScopeKind::Function(ast::StmtFunctionDef { is_async, .. }) => return *is_async,
|
||||
ScopeKind::Generator { .. } | ScopeKind::Module | ScopeKind::Type => {}
|
||||
ScopeKind::Generator { .. }
|
||||
| ScopeKind::Module
|
||||
| ScopeKind::Type
|
||||
| ScopeKind::DunderClassCell => {}
|
||||
}
|
||||
}
|
||||
false
|
||||
@@ -714,7 +717,10 @@ impl SemanticSyntaxContext for Checker<'_> {
|
||||
match scope.kind {
|
||||
ScopeKind::Class(_) => return false,
|
||||
ScopeKind::Function(_) | ScopeKind::Lambda(_) => return true,
|
||||
ScopeKind::Generator { .. } | ScopeKind::Module | ScopeKind::Type => {}
|
||||
ScopeKind::Generator { .. }
|
||||
| ScopeKind::Module
|
||||
| ScopeKind::Type
|
||||
| ScopeKind::DunderClassCell => {}
|
||||
}
|
||||
}
|
||||
false
|
||||
@@ -725,7 +731,7 @@ impl SemanticSyntaxContext for Checker<'_> {
|
||||
match scope.kind {
|
||||
ScopeKind::Class(_) | ScopeKind::Generator { .. } => return false,
|
||||
ScopeKind::Function(_) | ScopeKind::Lambda(_) => return true,
|
||||
ScopeKind::Module | ScopeKind::Type => {}
|
||||
ScopeKind::Module | ScopeKind::Type | ScopeKind::DunderClassCell => {}
|
||||
}
|
||||
}
|
||||
false
|
||||
@@ -1092,6 +1098,24 @@ impl<'a> Visitor<'a> for Checker<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
// Here we add the implicit scope surrounding a method which allows code in the
|
||||
// method to access `__class__` at runtime. See the `ScopeKind::DunderClassCell`
|
||||
// docs for more information.
|
||||
let added_dunder_class_scope = if self.semantic.current_scope().kind.is_class() {
|
||||
self.semantic.push_scope(ScopeKind::DunderClassCell);
|
||||
let binding_id = self.semantic.push_binding(
|
||||
TextRange::default(),
|
||||
BindingKind::DunderClassCell,
|
||||
BindingFlags::empty(),
|
||||
);
|
||||
self.semantic
|
||||
.current_scope_mut()
|
||||
.add("__class__", binding_id);
|
||||
true
|
||||
} else {
|
||||
false
|
||||
};
|
||||
|
||||
self.semantic.push_scope(ScopeKind::Type);
|
||||
|
||||
if let Some(type_params) = type_params {
|
||||
@@ -1155,6 +1179,9 @@ impl<'a> Visitor<'a> for Checker<'a> {
|
||||
self.semantic.pop_scope(); // Function scope
|
||||
self.semantic.pop_definition();
|
||||
self.semantic.pop_scope(); // Type parameter scope
|
||||
if added_dunder_class_scope {
|
||||
self.semantic.pop_scope(); // `__class__` cell closure scope
|
||||
}
|
||||
self.add_binding(
|
||||
name,
|
||||
stmt.identifier(),
|
||||
|
||||
@@ -336,10 +336,12 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
|
||||
(Flake8Async, "115") => (RuleGroup::Stable, rules::flake8_async::rules::AsyncZeroSleep),
|
||||
(Flake8Async, "116") => (RuleGroup::Preview, rules::flake8_async::rules::LongSleepNotForever),
|
||||
(Flake8Async, "210") => (RuleGroup::Stable, rules::flake8_async::rules::BlockingHttpCallInAsyncFunction),
|
||||
(Flake8Async, "212") => (RuleGroup::Preview, rules::flake8_async::rules::BlockingHttpCallHttpxInAsyncFunction),
|
||||
(Flake8Async, "220") => (RuleGroup::Stable, rules::flake8_async::rules::CreateSubprocessInAsyncFunction),
|
||||
(Flake8Async, "221") => (RuleGroup::Stable, rules::flake8_async::rules::RunProcessInAsyncFunction),
|
||||
(Flake8Async, "222") => (RuleGroup::Stable, rules::flake8_async::rules::WaitForProcessInAsyncFunction),
|
||||
(Flake8Async, "230") => (RuleGroup::Stable, rules::flake8_async::rules::BlockingOpenCallInAsyncFunction),
|
||||
(Flake8Async, "250") => (RuleGroup::Preview, rules::flake8_async::rules::BlockingInputInAsyncFunction),
|
||||
(Flake8Async, "251") => (RuleGroup::Stable, rules::flake8_async::rules::BlockingSleepInAsyncFunction),
|
||||
|
||||
// flake8-builtins
|
||||
@@ -921,8 +923,8 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
|
||||
// flake8-use-pathlib
|
||||
(Flake8UsePathlib, "100") => (RuleGroup::Stable, rules::flake8_use_pathlib::rules::OsPathAbspath),
|
||||
(Flake8UsePathlib, "101") => (RuleGroup::Stable, rules::flake8_use_pathlib::rules::OsChmod),
|
||||
(Flake8UsePathlib, "102") => (RuleGroup::Stable, rules::flake8_use_pathlib::violations::OsMkdir),
|
||||
(Flake8UsePathlib, "103") => (RuleGroup::Stable, rules::flake8_use_pathlib::violations::OsMakedirs),
|
||||
(Flake8UsePathlib, "102") => (RuleGroup::Stable, rules::flake8_use_pathlib::rules::OsMkdir),
|
||||
(Flake8UsePathlib, "103") => (RuleGroup::Stable, rules::flake8_use_pathlib::rules::OsMakedirs),
|
||||
(Flake8UsePathlib, "104") => (RuleGroup::Stable, rules::flake8_use_pathlib::rules::OsRename),
|
||||
(Flake8UsePathlib, "105") => (RuleGroup::Stable, rules::flake8_use_pathlib::rules::OsReplace),
|
||||
(Flake8UsePathlib, "106") => (RuleGroup::Stable, rules::flake8_use_pathlib::rules::OsRmdir),
|
||||
@@ -954,7 +956,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
|
||||
(Flake8UsePathlib, "207") => (RuleGroup::Stable, rules::flake8_use_pathlib::rules::Glob),
|
||||
(Flake8UsePathlib, "208") => (RuleGroup::Stable, rules::flake8_use_pathlib::violations::OsListdir),
|
||||
(Flake8UsePathlib, "210") => (RuleGroup::Stable, rules::flake8_use_pathlib::rules::InvalidPathlibWithSuffix),
|
||||
(Flake8UsePathlib, "211") => (RuleGroup::Preview, rules::flake8_use_pathlib::violations::OsSymlink),
|
||||
(Flake8UsePathlib, "211") => (RuleGroup::Preview, rules::flake8_use_pathlib::rules::OsSymlink),
|
||||
|
||||
// flake8-logging-format
|
||||
(Flake8LoggingFormat, "001") => (RuleGroup::Stable, rules::flake8_logging_format::violations::LoggingStringFormat),
|
||||
|
||||
@@ -58,13 +58,3 @@ pub fn relativize_path<P: AsRef<Path>>(path: P) -> String {
|
||||
}
|
||||
format!("{}", path.display())
|
||||
}
|
||||
|
||||
/// Convert an absolute path to be relative to the specified project root.
|
||||
pub fn relativize_path_to<P: AsRef<Path>, R: AsRef<Path>>(path: P, project_root: R) -> String {
|
||||
format!(
|
||||
"{}",
|
||||
pathdiff::diff_paths(&path, project_root)
|
||||
.expect("Could not diff paths")
|
||||
.display()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -63,9 +63,9 @@ impl<'a> Insertion<'a> {
|
||||
return Insertion::inline(" ", location.add(offset).add(TextSize::of(';')), ";");
|
||||
}
|
||||
|
||||
// If the first token after the docstring is a continuation character (i.e. "\"), advance
|
||||
// an additional row to prevent inserting in the same logical line.
|
||||
if match_continuation(locator.after(location)).is_some() {
|
||||
// While the first token after the docstring is a continuation character (i.e. "\"), advance
|
||||
// additional rows to prevent inserting in the same logical line.
|
||||
while match_continuation(locator.after(location)).is_some() {
|
||||
location = locator.full_line_end(location);
|
||||
}
|
||||
|
||||
@@ -379,6 +379,17 @@ mod tests {
|
||||
Insertion::own_line("", TextSize::from(22), "\n")
|
||||
);
|
||||
|
||||
let contents = r#"
|
||||
"""Hello, world!"""\
|
||||
\
|
||||
|
||||
"#
|
||||
.trim_start();
|
||||
assert_eq!(
|
||||
insert(contents)?,
|
||||
Insertion::own_line("", TextSize::from(24), "\n")
|
||||
);
|
||||
|
||||
let contents = r"
|
||||
x = 1
|
||||
"
|
||||
|
||||
@@ -1,202 +0,0 @@
|
||||
use std::fmt::{Display, Formatter};
|
||||
use std::num::NonZeroUsize;
|
||||
|
||||
use colored::{Color, ColoredString, Colorize, Styles};
|
||||
use similar::{ChangeTag, TextDiff};
|
||||
|
||||
use ruff_db::diagnostic::Diagnostic;
|
||||
use ruff_source_file::{OneIndexed, SourceFile};
|
||||
use ruff_text_size::{Ranged, TextRange, TextSize};
|
||||
|
||||
use crate::text_helpers::ShowNonprinting;
|
||||
use crate::{Applicability, Fix};
|
||||
|
||||
/// Renders a diff that shows the code fixes.
|
||||
///
|
||||
/// The implementation isn't fully fledged out and only used by tests. Before using in production, try
|
||||
/// * Improve layout
|
||||
/// * Replace tabs with spaces for a consistent experience across terminals
|
||||
/// * Replace zero-width whitespaces
|
||||
/// * Print a simpler diff if only a single line has changed
|
||||
/// * Compute the diff from the [`Edit`] because diff calculation is expensive.
|
||||
pub(super) struct Diff<'a> {
|
||||
fix: &'a Fix,
|
||||
source_code: &'a SourceFile,
|
||||
}
|
||||
|
||||
impl<'a> Diff<'a> {
|
||||
pub(crate) fn from_message(message: &'a Diagnostic) -> Option<Diff<'a>> {
|
||||
message.fix().map(|fix| Diff {
|
||||
source_code: message.expect_ruff_source_file(),
|
||||
fix,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for Diff<'_> {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
// TODO(dhruvmanila): Add support for Notebook cells once it's user-facing
|
||||
let mut output = String::with_capacity(self.source_code.source_text().len());
|
||||
let mut last_end = TextSize::default();
|
||||
|
||||
for edit in self.fix.edits() {
|
||||
output.push_str(
|
||||
self.source_code
|
||||
.slice(TextRange::new(last_end, edit.start())),
|
||||
);
|
||||
output.push_str(edit.content().unwrap_or_default());
|
||||
last_end = edit.end();
|
||||
}
|
||||
|
||||
output.push_str(&self.source_code.source_text()[usize::from(last_end)..]);
|
||||
|
||||
let diff = TextDiff::from_lines(self.source_code.source_text(), &output);
|
||||
|
||||
let message = match self.fix.applicability() {
|
||||
// TODO(zanieb): Adjust this messaging once it's user-facing
|
||||
Applicability::Safe => "Safe fix",
|
||||
Applicability::Unsafe => "Unsafe fix",
|
||||
Applicability::DisplayOnly => "Display-only fix",
|
||||
};
|
||||
writeln!(f, "ℹ {}", message.blue())?;
|
||||
|
||||
let (largest_old, largest_new) = diff
|
||||
.ops()
|
||||
.last()
|
||||
.map(|op| (op.old_range().start, op.new_range().start))
|
||||
.unwrap_or_default();
|
||||
|
||||
let digit_with =
|
||||
calculate_print_width(OneIndexed::from_zero_indexed(largest_new.max(largest_old)));
|
||||
|
||||
for (idx, group) in diff.grouped_ops(3).iter().enumerate() {
|
||||
if idx > 0 {
|
||||
writeln!(f, "{:-^1$}", "-", 80)?;
|
||||
}
|
||||
for op in group {
|
||||
for change in diff.iter_inline_changes(op) {
|
||||
let sign = match change.tag() {
|
||||
ChangeTag::Delete => "-",
|
||||
ChangeTag::Insert => "+",
|
||||
ChangeTag::Equal => " ",
|
||||
};
|
||||
|
||||
let line_style = LineStyle::from(change.tag());
|
||||
|
||||
let old_index = change.old_index().map(OneIndexed::from_zero_indexed);
|
||||
let new_index = change.new_index().map(OneIndexed::from_zero_indexed);
|
||||
|
||||
write!(
|
||||
f,
|
||||
"{} {} |{}",
|
||||
Line {
|
||||
index: old_index,
|
||||
width: digit_with
|
||||
},
|
||||
Line {
|
||||
index: new_index,
|
||||
width: digit_with
|
||||
},
|
||||
line_style.apply_to(sign).bold()
|
||||
)?;
|
||||
|
||||
for (emphasized, value) in change.iter_strings_lossy() {
|
||||
let value = value.show_nonprinting();
|
||||
if emphasized {
|
||||
write!(f, "{}", line_style.apply_to(&value).underline().on_black())?;
|
||||
} else {
|
||||
write!(f, "{}", line_style.apply_to(&value))?;
|
||||
}
|
||||
}
|
||||
if change.missing_newline() {
|
||||
writeln!(f)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
struct LineStyle {
|
||||
fgcolor: Option<Color>,
|
||||
style: Option<Styles>,
|
||||
}
|
||||
|
||||
impl LineStyle {
|
||||
fn apply_to(&self, input: &str) -> ColoredString {
|
||||
let mut colored = ColoredString::from(input);
|
||||
if let Some(color) = self.fgcolor {
|
||||
colored = colored.color(color);
|
||||
}
|
||||
|
||||
if let Some(style) = self.style {
|
||||
match style {
|
||||
Styles::Clear => colored.clear(),
|
||||
Styles::Bold => colored.bold(),
|
||||
Styles::Dimmed => colored.dimmed(),
|
||||
Styles::Underline => colored.underline(),
|
||||
Styles::Reversed => colored.reversed(),
|
||||
Styles::Italic => colored.italic(),
|
||||
Styles::Blink => colored.blink(),
|
||||
Styles::Hidden => colored.hidden(),
|
||||
Styles::Strikethrough => colored.strikethrough(),
|
||||
}
|
||||
} else {
|
||||
colored
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ChangeTag> for LineStyle {
|
||||
fn from(value: ChangeTag) -> Self {
|
||||
match value {
|
||||
ChangeTag::Equal => LineStyle {
|
||||
fgcolor: None,
|
||||
style: Some(Styles::Dimmed),
|
||||
},
|
||||
ChangeTag::Delete => LineStyle {
|
||||
fgcolor: Some(Color::Red),
|
||||
style: None,
|
||||
},
|
||||
ChangeTag::Insert => LineStyle {
|
||||
fgcolor: Some(Color::Green),
|
||||
style: None,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct Line {
|
||||
index: Option<OneIndexed>,
|
||||
width: NonZeroUsize,
|
||||
}
|
||||
|
||||
impl Display for Line {
|
||||
fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
|
||||
match self.index {
|
||||
None => {
|
||||
for _ in 0..self.width.get() {
|
||||
f.write_str(" ")?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
Some(idx) => write!(f, "{:<width$}", idx, width = self.width.get()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Calculate the length of the string representation of `value`
|
||||
pub(super) fn calculate_print_width(mut value: OneIndexed) -> NonZeroUsize {
|
||||
const TEN: OneIndexed = OneIndexed::from_zero_indexed(9);
|
||||
|
||||
let mut width = OneIndexed::ONE;
|
||||
|
||||
while value >= TEN {
|
||||
value = OneIndexed::new(value.get() / 10).unwrap_or(OneIndexed::MIN);
|
||||
width = width.checked_add(1).unwrap();
|
||||
}
|
||||
|
||||
width
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
use std::collections::HashSet;
|
||||
use std::collections::hash_map::DefaultHasher;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::io::Write;
|
||||
|
||||
use serde::ser::SerializeSeq;
|
||||
use serde::{Serialize, Serializer};
|
||||
use serde_json::json;
|
||||
|
||||
use ruff_db::diagnostic::Diagnostic;
|
||||
|
||||
use crate::fs::{relativize_path, relativize_path_to};
|
||||
use crate::message::{Emitter, EmitterContext};
|
||||
|
||||
/// Generate JSON with violations in GitLab CI format
|
||||
// https://docs.gitlab.com/ee/ci/testing/code_quality.html#implement-a-custom-tool
|
||||
pub struct GitlabEmitter {
|
||||
project_dir: Option<String>,
|
||||
}
|
||||
|
||||
impl Default for GitlabEmitter {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
project_dir: std::env::var("CI_PROJECT_DIR").ok(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Emitter for GitlabEmitter {
|
||||
fn emit(
|
||||
&mut self,
|
||||
writer: &mut dyn Write,
|
||||
diagnostics: &[Diagnostic],
|
||||
context: &EmitterContext,
|
||||
) -> anyhow::Result<()> {
|
||||
serde_json::to_writer_pretty(
|
||||
writer,
|
||||
&SerializedMessages {
|
||||
diagnostics,
|
||||
context,
|
||||
project_dir: self.project_dir.as_deref(),
|
||||
},
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
struct SerializedMessages<'a> {
|
||||
diagnostics: &'a [Diagnostic],
|
||||
context: &'a EmitterContext<'a>,
|
||||
project_dir: Option<&'a str>,
|
||||
}
|
||||
|
||||
impl Serialize for SerializedMessages<'_> {
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
S: Serializer,
|
||||
{
|
||||
let mut s = serializer.serialize_seq(Some(self.diagnostics.len()))?;
|
||||
let mut fingerprints = HashSet::<u64>::with_capacity(self.diagnostics.len());
|
||||
|
||||
for diagnostic in self.diagnostics {
|
||||
let filename = diagnostic.expect_ruff_filename();
|
||||
|
||||
let (start_location, end_location) = if self.context.is_notebook(&filename) {
|
||||
// We can't give a reasonable location for the structured formats,
|
||||
// so we show one that's clearly a fallback
|
||||
Default::default()
|
||||
} else {
|
||||
(
|
||||
diagnostic.expect_ruff_start_location(),
|
||||
diagnostic.expect_ruff_end_location(),
|
||||
)
|
||||
};
|
||||
|
||||
let path = self.project_dir.as_ref().map_or_else(
|
||||
|| relativize_path(&filename),
|
||||
|project_dir| relativize_path_to(&filename, project_dir),
|
||||
);
|
||||
|
||||
let mut message_fingerprint = fingerprint(diagnostic, &path, 0);
|
||||
|
||||
// Make sure that we do not get a fingerprint that is already in use
|
||||
// by adding in the previously generated one.
|
||||
while fingerprints.contains(&message_fingerprint) {
|
||||
message_fingerprint = fingerprint(diagnostic, &path, message_fingerprint);
|
||||
}
|
||||
fingerprints.insert(message_fingerprint);
|
||||
|
||||
let description = diagnostic.body();
|
||||
let check_name = diagnostic.secondary_code_or_id();
|
||||
|
||||
let value = json!({
|
||||
"check_name": check_name,
|
||||
// GitLab doesn't display the separate `check_name` field in a Code Quality report,
|
||||
// so prepend it to the description too.
|
||||
"description": format!("{check_name}: {description}"),
|
||||
"severity": "major",
|
||||
"fingerprint": format!("{:x}", message_fingerprint),
|
||||
"location": {
|
||||
"path": path,
|
||||
"positions": {
|
||||
"begin": start_location,
|
||||
"end": end_location,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
s.serialize_element(&value)?;
|
||||
}
|
||||
|
||||
s.end()
|
||||
}
|
||||
}
|
||||
|
||||
/// Generate a unique fingerprint to identify a violation.
|
||||
fn fingerprint(message: &Diagnostic, project_path: &str, salt: u64) -> u64 {
|
||||
let mut hasher = DefaultHasher::new();
|
||||
|
||||
salt.hash(&mut hasher);
|
||||
message.name().hash(&mut hasher);
|
||||
project_path.hash(&mut hasher);
|
||||
|
||||
hasher.finish()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use insta::assert_snapshot;
|
||||
|
||||
use crate::message::GitlabEmitter;
|
||||
use crate::message::tests::{
|
||||
capture_emitter_output, create_diagnostics, create_syntax_error_diagnostics,
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn output() {
|
||||
let mut emitter = GitlabEmitter::default();
|
||||
let content = capture_emitter_output(&mut emitter, &create_diagnostics());
|
||||
|
||||
assert_snapshot!(redact_fingerprint(&content));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn syntax_errors() {
|
||||
let mut emitter = GitlabEmitter::default();
|
||||
let content = capture_emitter_output(&mut emitter, &create_syntax_error_diagnostics());
|
||||
|
||||
assert_snapshot!(redact_fingerprint(&content));
|
||||
}
|
||||
|
||||
// Redact the fingerprint because the default hasher isn't stable across platforms.
|
||||
fn redact_fingerprint(content: &str) -> String {
|
||||
static FINGERPRINT_HAY_KEY: &str = r#""fingerprint": ""#;
|
||||
|
||||
let mut output = String::with_capacity(content.len());
|
||||
let mut last = 0;
|
||||
|
||||
for (start, _) in content.match_indices(FINGERPRINT_HAY_KEY) {
|
||||
let fingerprint_hash_start = start + FINGERPRINT_HAY_KEY.len();
|
||||
output.push_str(&content[last..fingerprint_hash_start]);
|
||||
output.push_str("<redacted>");
|
||||
last = fingerprint_hash_start
|
||||
+ content[fingerprint_hash_start..]
|
||||
.find('"')
|
||||
.expect("Expected terminating quote");
|
||||
}
|
||||
|
||||
output.push_str(&content[last..]);
|
||||
|
||||
output
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,6 @@ use ruff_notebook::NotebookIndex;
|
||||
use ruff_source_file::{LineColumn, OneIndexed};
|
||||
|
||||
use crate::fs::relativize_path;
|
||||
use crate::message::diff::calculate_print_width;
|
||||
use crate::message::{Emitter, EmitterContext};
|
||||
use crate::settings::types::UnsafeFixes;
|
||||
|
||||
@@ -53,8 +52,8 @@ impl Emitter for GroupedEmitter {
|
||||
max_column_length = max_column_length.max(message.start_location.column);
|
||||
}
|
||||
|
||||
let row_length = calculate_print_width(max_row_length);
|
||||
let column_length = calculate_print_width(max_column_length);
|
||||
let row_length = max_row_length.digits();
|
||||
let column_length = max_column_length.digits();
|
||||
|
||||
// Print the filename.
|
||||
writeln!(writer, "{}:", relativize_path(&*filename).underline())?;
|
||||
@@ -131,8 +130,7 @@ impl Display for DisplayGroupedMessage<'_> {
|
||||
write!(
|
||||
f,
|
||||
" {row_padding}",
|
||||
row_padding = " "
|
||||
.repeat(self.row_length.get() - calculate_print_width(start_location.line).get())
|
||||
row_padding = " ".repeat(self.row_length.get() - start_location.line.digits().get())
|
||||
)?;
|
||||
|
||||
// Check if we're working on a jupyter notebook and translate positions with cell accordingly
|
||||
@@ -159,9 +157,8 @@ impl Display for DisplayGroupedMessage<'_> {
|
||||
f,
|
||||
"{row}{sep}{col}{col_padding} {code_and_body}",
|
||||
sep = ":".cyan(),
|
||||
col_padding = " ".repeat(
|
||||
self.column_length.get() - calculate_print_width(start_location.column).get()
|
||||
),
|
||||
col_padding =
|
||||
" ".repeat(self.column_length.get() - start_location.column.digits().get()),
|
||||
code_and_body = RuleCodeAndBody {
|
||||
message,
|
||||
show_fix_status: self.show_fix_status,
|
||||
|
||||
@@ -10,7 +10,6 @@ use ruff_db::diagnostic::{
|
||||
use ruff_db::files::File;
|
||||
|
||||
pub use github::GithubEmitter;
|
||||
pub use gitlab::GitlabEmitter;
|
||||
pub use grouped::GroupedEmitter;
|
||||
use ruff_notebook::NotebookIndex;
|
||||
use ruff_source_file::SourceFile;
|
||||
@@ -21,9 +20,7 @@ pub use text::TextEmitter;
|
||||
use crate::Fix;
|
||||
use crate::registry::Rule;
|
||||
|
||||
mod diff;
|
||||
mod github;
|
||||
mod gitlab;
|
||||
mod grouped;
|
||||
mod sarif;
|
||||
mod text;
|
||||
|
||||
@@ -1,23 +1,19 @@
|
||||
use std::io::Write;
|
||||
|
||||
use ruff_db::diagnostic::{Diagnostic, DiagnosticFormat, DisplayDiagnosticConfig};
|
||||
use ruff_db::diagnostic::{
|
||||
Diagnostic, DiagnosticFormat, DisplayDiagnosticConfig, DisplayDiagnostics,
|
||||
};
|
||||
use ruff_diagnostics::Applicability;
|
||||
|
||||
use crate::message::diff::Diff;
|
||||
use crate::message::{Emitter, EmitterContext};
|
||||
use crate::settings::types::UnsafeFixes;
|
||||
|
||||
pub struct TextEmitter {
|
||||
/// Whether to show the diff of a fix, for diagnostics that have a fix.
|
||||
///
|
||||
/// Note that this is not currently exposed in the CLI (#7352) and is only used in tests.
|
||||
show_fix_diff: bool,
|
||||
config: DisplayDiagnosticConfig,
|
||||
}
|
||||
|
||||
impl Default for TextEmitter {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
show_fix_diff: false,
|
||||
config: DisplayDiagnosticConfig::default()
|
||||
.format(DiagnosticFormat::Concise)
|
||||
.hide_severity(true)
|
||||
@@ -35,7 +31,7 @@ impl TextEmitter {
|
||||
|
||||
#[must_use]
|
||||
pub fn with_show_fix_diff(mut self, show_fix_diff: bool) -> Self {
|
||||
self.show_fix_diff = show_fix_diff;
|
||||
self.config = self.config.show_fix_diff(show_fix_diff);
|
||||
self
|
||||
}
|
||||
|
||||
@@ -50,10 +46,8 @@ impl TextEmitter {
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn with_unsafe_fixes(mut self, unsafe_fixes: UnsafeFixes) -> Self {
|
||||
self.config = self
|
||||
.config
|
||||
.fix_applicability(unsafe_fixes.required_applicability());
|
||||
pub fn with_fix_applicability(mut self, applicability: Applicability) -> Self {
|
||||
self.config = self.config.fix_applicability(applicability);
|
||||
self
|
||||
}
|
||||
|
||||
@@ -77,15 +71,11 @@ impl Emitter for TextEmitter {
|
||||
diagnostics: &[Diagnostic],
|
||||
context: &EmitterContext,
|
||||
) -> anyhow::Result<()> {
|
||||
for message in diagnostics {
|
||||
write!(writer, "{}", message.display(context, &self.config))?;
|
||||
|
||||
if self.show_fix_diff {
|
||||
if let Some(diff) = Diff::from_message(message) {
|
||||
writeln!(writer, "{diff}")?;
|
||||
}
|
||||
}
|
||||
}
|
||||
write!(
|
||||
writer,
|
||||
"{}",
|
||||
DisplayDiagnostics::new(context, &self.config, diagnostics)
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -94,13 +84,13 @@ impl Emitter for TextEmitter {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use insta::assert_snapshot;
|
||||
use ruff_diagnostics::Applicability;
|
||||
|
||||
use crate::message::TextEmitter;
|
||||
use crate::message::tests::{
|
||||
capture_emitter_notebook_output, capture_emitter_output, create_diagnostics,
|
||||
create_notebook_diagnostics, create_syntax_error_diagnostics,
|
||||
};
|
||||
use crate::settings::types::UnsafeFixes;
|
||||
|
||||
#[test]
|
||||
fn default() {
|
||||
@@ -125,7 +115,7 @@ mod tests {
|
||||
let mut emitter = TextEmitter::default()
|
||||
.with_show_fix_status(true)
|
||||
.with_show_source(true)
|
||||
.with_unsafe_fixes(UnsafeFixes::Enabled);
|
||||
.with_fix_applicability(Applicability::Unsafe);
|
||||
let content = capture_emitter_output(&mut emitter, &create_diagnostics());
|
||||
|
||||
assert_snapshot!(content);
|
||||
@@ -136,7 +126,7 @@ mod tests {
|
||||
let mut emitter = TextEmitter::default()
|
||||
.with_show_fix_status(true)
|
||||
.with_show_source(true)
|
||||
.with_unsafe_fixes(UnsafeFixes::Enabled);
|
||||
.with_fix_applicability(Applicability::Unsafe);
|
||||
let (messages, notebook_indexes) = create_notebook_diagnostics();
|
||||
let content = capture_emitter_notebook_output(&mut emitter, &messages, ¬ebook_indexes);
|
||||
|
||||
|
||||
@@ -40,6 +40,11 @@ pub(crate) const fn is_bad_version_info_in_non_stub_enabled(settings: &LinterSet
|
||||
settings.preview.is_enabled()
|
||||
}
|
||||
|
||||
/// <https://github.com/astral-sh/ruff/pull/19303>
|
||||
pub(crate) const fn is_fix_f_string_logging_enabled(settings: &LinterSettings) -> bool {
|
||||
settings.preview.is_enabled()
|
||||
}
|
||||
|
||||
// https://github.com/astral-sh/ruff/pull/16719
|
||||
pub(crate) const fn is_fix_manual_dict_comprehension_enabled(settings: &LinterSettings) -> bool {
|
||||
settings.preview.is_enabled()
|
||||
@@ -159,6 +164,21 @@ pub(crate) const fn is_fix_os_getcwd_enabled(settings: &LinterSettings) -> bool
|
||||
settings.preview.is_enabled()
|
||||
}
|
||||
|
||||
// https://github.com/astral-sh/ruff/pull/19514
|
||||
pub(crate) const fn is_fix_os_mkdir_enabled(settings: &LinterSettings) -> bool {
|
||||
settings.preview.is_enabled()
|
||||
}
|
||||
|
||||
// https://github.com/astral-sh/ruff/pull/19514
|
||||
pub(crate) const fn is_fix_os_makedirs_enabled(settings: &LinterSettings) -> bool {
|
||||
settings.preview.is_enabled()
|
||||
}
|
||||
|
||||
// https://github.com/astral-sh/ruff/pull/20009
|
||||
pub(crate) const fn is_fix_os_symlink_enabled(settings: &LinterSettings) -> bool {
|
||||
settings.preview.is_enabled()
|
||||
}
|
||||
|
||||
// https://github.com/astral-sh/ruff/pull/11436
|
||||
// https://github.com/astral-sh/ruff/pull/11168
|
||||
pub(crate) const fn is_dunder_init_fix_unused_import_enabled(settings: &LinterSettings) -> bool {
|
||||
@@ -230,3 +250,13 @@ pub(crate) const fn is_add_future_annotations_imports_enabled(settings: &LinterS
|
||||
pub(crate) const fn is_trailing_comma_type_params_enabled(settings: &LinterSettings) -> bool {
|
||||
settings.preview.is_enabled()
|
||||
}
|
||||
|
||||
// https://github.com/astral-sh/ruff/pull/19851
|
||||
pub(crate) const fn is_maxsplit_without_separator_fix_enabled(settings: &LinterSettings) -> bool {
|
||||
settings.preview.is_enabled()
|
||||
}
|
||||
|
||||
// https://github.com/astral-sh/ruff/pull/20106
|
||||
pub(crate) const fn is_bidi_forbid_arabic_letter_mark_enabled(settings: &LinterSettings) -> bool {
|
||||
settings.preview.is_enabled()
|
||||
}
|
||||
|
||||
@@ -354,7 +354,10 @@ impl Renamer {
|
||||
))
|
||||
}
|
||||
// Avoid renaming builtins and other "special" bindings.
|
||||
BindingKind::FutureImport | BindingKind::Builtin | BindingKind::Export(_) => None,
|
||||
BindingKind::FutureImport
|
||||
| BindingKind::Builtin
|
||||
| BindingKind::Export(_)
|
||||
| BindingKind::DunderClassCell => None,
|
||||
// By default, replace the binding's name with the target name.
|
||||
BindingKind::Annotation
|
||||
| BindingKind::Argument
|
||||
|
||||
@@ -215,6 +215,12 @@ fn check_names_moved_to_provider(checker: &Checker, expr: &Expr, ranged: TextRan
|
||||
version: "0.0.1",
|
||||
}
|
||||
}
|
||||
["airflow", "sensors", "bash", "BashSensor"] => ProviderReplacement::AutoImport {
|
||||
module: "airflow.providers.standard.sensor.bash",
|
||||
name: "BashSensor",
|
||||
provider: "standard",
|
||||
version: "0.0.1",
|
||||
},
|
||||
[
|
||||
"airflow",
|
||||
"sensors",
|
||||
@@ -243,6 +249,12 @@ fn check_names_moved_to_provider(checker: &Checker, expr: &Expr, ranged: TextRan
|
||||
provider: "standard",
|
||||
version: "0.0.2",
|
||||
},
|
||||
["airflow", "sensors", "python", "PythonSensor"] => ProviderReplacement::AutoImport {
|
||||
module: "airflow.providers.standard.sensors.python",
|
||||
name: "PythonSensor",
|
||||
provider: "standard",
|
||||
version: "0.0.1",
|
||||
},
|
||||
[
|
||||
"airflow",
|
||||
"sensors",
|
||||
|
||||
@@ -227,13 +227,26 @@ fn check_name(checker: &Checker, expr: &Expr, range: TextRange) {
|
||||
module: "airflow.sdk",
|
||||
name: (*rest).to_string(),
|
||||
},
|
||||
[
|
||||
"airflow",
|
||||
"decorators",
|
||||
"base",
|
||||
rest @ ("DecoratedMappedOperator"
|
||||
| "DecoratedOperator"
|
||||
| "TaskDecorator"
|
||||
| "get_unique_task_id"
|
||||
| "task_decorator_factory"),
|
||||
] => Replacement::SourceModuleMoved {
|
||||
module: "airflow.sdk.bases.decorator",
|
||||
name: (*rest).to_string(),
|
||||
},
|
||||
|
||||
// airflow.io
|
||||
["airflow", "io", "path", "ObjectStoragePath"] => Replacement::SourceModuleMoved {
|
||||
module: "airflow.sdk",
|
||||
name: "ObjectStoragePath".to_string(),
|
||||
},
|
||||
["airflow", "io", "storage", "attach"] => Replacement::SourceModuleMoved {
|
||||
["airflow", "io", "store", "attach"] => Replacement::SourceModuleMoved {
|
||||
module: "airflow.sdk.io",
|
||||
name: "attach".to_string(),
|
||||
},
|
||||
@@ -245,6 +258,10 @@ fn check_name(checker: &Checker, expr: &Expr, range: TextRange) {
|
||||
name: (*rest).to_string(),
|
||||
}
|
||||
}
|
||||
["airflow", "models", "Param"] => Replacement::AutoImport {
|
||||
module: "airflow.sdk.definitions.param",
|
||||
name: "Param",
|
||||
},
|
||||
|
||||
// airflow.models.baseoperator
|
||||
[
|
||||
@@ -260,16 +277,30 @@ fn check_name(checker: &Checker, expr: &Expr, range: TextRange) {
|
||||
module: "airflow.sdk",
|
||||
name: "BaseOperatorLink",
|
||||
},
|
||||
|
||||
// airflow.model..DAG
|
||||
["airflow", "models", .., "DAG"] => Replacement::SourceModuleMoved {
|
||||
module: "airflow.sdk",
|
||||
name: "DAG".to_string(),
|
||||
},
|
||||
|
||||
// airflow.sensors.base
|
||||
[
|
||||
"airflow",
|
||||
"sensors",
|
||||
"base",
|
||||
rest @ ("BaseSensorOperator" | "PokeReturnValue" | "poke_mode_only"),
|
||||
] => Replacement::SourceModuleMoved {
|
||||
module: "airflow.sdk",
|
||||
name: (*rest).to_string(),
|
||||
},
|
||||
|
||||
// airflow.timetables
|
||||
["airflow", "timetables", "datasets", "DatasetOrTimeSchedule"] => Replacement::AutoImport {
|
||||
module: "airflow.timetables.assets",
|
||||
name: "AssetOrTimeSchedule",
|
||||
},
|
||||
|
||||
// airflow.utils
|
||||
[
|
||||
"airflow",
|
||||
|
||||
@@ -12,16 +12,14 @@ AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
23 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
|
|
||||
help: Use `schedule` instead
|
||||
|
||||
ℹ Safe fix
|
||||
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 |
|
||||
18 |
|
||||
19 | DAG(dag_id="class_schedule", schedule="@hourly")
|
||||
20 |
|
||||
- DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
|
||||
21 + DAG(dag_id="class_schedule_interval", schedule="@hourly")
|
||||
22 |
|
||||
23 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
24 |
|
||||
|
||||
AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:23:31
|
||||
@@ -32,16 +30,14 @@ AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
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)
|
||||
20 |
|
||||
21 | DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
|
||||
22 |
|
||||
- DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
23 + DAG(dag_id="class_timetable", schedule=NullTimetable())
|
||||
24 |
|
||||
25 |
|
||||
26 | DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
|
||||
AIR301 [*] `fail_stop` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:26:31
|
||||
@@ -52,16 +48,14 @@ AIR301 [*] `fail_stop` is removed in Airflow 3.0
|
||||
28 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
|
|
||||
help: Use `fail_fast` instead
|
||||
|
||||
ℹ Safe fix
|
||||
23 23 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
24 24 |
|
||||
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 |
|
||||
23 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
24 |
|
||||
25 |
|
||||
- DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
26 + DAG(dag_id="class_fail_stop", fail_fast=True)
|
||||
27 |
|
||||
28 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
29 |
|
||||
|
||||
AIR301 `default_view` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:28:34
|
||||
@@ -94,16 +88,14 @@ AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
43 | pass
|
||||
|
|
||||
help: Use `schedule` instead
|
||||
|
||||
ℹ Safe fix
|
||||
38 38 | pass
|
||||
39 39 |
|
||||
40 40 |
|
||||
41 |-@dag(schedule_interval="0 * * * *")
|
||||
41 |+@dag(schedule="0 * * * *")
|
||||
42 42 | def decorator_schedule_interval():
|
||||
43 43 | pass
|
||||
44 44 |
|
||||
38 | pass
|
||||
39 |
|
||||
40 |
|
||||
- @dag(schedule_interval="0 * * * *")
|
||||
41 + @dag(schedule="0 * * * *")
|
||||
42 | def decorator_schedule_interval():
|
||||
43 | pass
|
||||
44 |
|
||||
|
||||
AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:46:6
|
||||
@@ -114,16 +106,14 @@ AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
48 | pass
|
||||
|
|
||||
help: Use `schedule` instead
|
||||
|
||||
ℹ Safe fix
|
||||
43 43 | pass
|
||||
44 44 |
|
||||
45 45 |
|
||||
46 |-@dag(timetable=NullTimetable())
|
||||
46 |+@dag(schedule=NullTimetable())
|
||||
47 47 | def decorator_timetable():
|
||||
48 48 | pass
|
||||
49 49 |
|
||||
43 | pass
|
||||
44 |
|
||||
45 |
|
||||
- @dag(timetable=NullTimetable())
|
||||
46 + @dag(schedule=NullTimetable())
|
||||
47 | def decorator_timetable():
|
||||
48 | pass
|
||||
49 |
|
||||
|
||||
AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:54:62
|
||||
@@ -136,16 +126,14 @@ AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
56 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
|
|
||||
help: Use `logical_date` instead
|
||||
|
||||
ℹ Safe fix
|
||||
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"
|
||||
51 | @dag()
|
||||
52 | def decorator_deprecated_operator_args():
|
||||
53 | trigger_dagrun_op = trigger_dagrun.TriggerDagRunOperator(
|
||||
- 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 | )
|
||||
56 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
57 | task_id="trigger_dagrun_op2", trigger_dag_id="test", execution_date="2024-12-04"
|
||||
|
||||
AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:57:62
|
||||
@@ -157,16 +145,14 @@ AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
58 | )
|
||||
|
|
||||
help: Use `logical_date` instead
|
||||
|
||||
ℹ Safe fix
|
||||
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(
|
||||
54 | task_id="trigger_dagrun_op1", trigger_dag_id="test", execution_date="2024-12-04"
|
||||
55 | )
|
||||
56 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
- 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 | )
|
||||
59 |
|
||||
60 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
|
||||
AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:61:33
|
||||
@@ -178,16 +164,14 @@ AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
|
|
||||
help: Use `use_task_logical_date` instead
|
||||
|
||||
ℹ Safe fix
|
||||
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",
|
||||
58 | )
|
||||
59 |
|
||||
60 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
- 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 | )
|
||||
63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
64 | task_id="branch_dt_op2",
|
||||
|
||||
AIR301 [*] `task_concurrency` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:61:62
|
||||
@@ -199,16 +183,14 @@ AIR301 [*] `task_concurrency` is removed in Airflow 3.0
|
||||
63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
|
|
||||
help: Use `max_active_tis_per_dag` instead
|
||||
|
||||
ℹ Safe fix
|
||||
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",
|
||||
58 | )
|
||||
59 |
|
||||
60 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
- 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 | )
|
||||
63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
64 | task_id="branch_dt_op2",
|
||||
|
||||
AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:65:9
|
||||
@@ -221,16 +203,14 @@ AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
67 | )
|
||||
|
|
||||
help: Use `use_task_logical_date` instead
|
||||
|
||||
ℹ Safe fix
|
||||
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 |
|
||||
62 | )
|
||||
63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
64 | task_id="branch_dt_op2",
|
||||
- use_task_execution_day=True,
|
||||
65 + use_task_logical_date=True,
|
||||
66 | sla=timedelta(seconds=10),
|
||||
67 | )
|
||||
68 |
|
||||
|
||||
AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:92:9
|
||||
@@ -242,16 +222,14 @@ AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
93 | )
|
||||
|
|
||||
help: Use `use_task_logical_date` instead
|
||||
|
||||
ℹ 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
|
||||
89 | follow_task_ids_if_false=None,
|
||||
90 | follow_task_ids_if_true=None,
|
||||
91 | week_day=1,
|
||||
- use_task_execution_day=True,
|
||||
92 + use_task_logical_date=True,
|
||||
93 | )
|
||||
94 |
|
||||
95 | trigger_dagrun_op >> trigger_dagrun_op2
|
||||
|
||||
AIR301 `filename_template` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:102:15
|
||||
|
||||
@@ -11,16 +11,14 @@ AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
26 | dataset_from_root.iter_dataset_aliases()
|
||||
|
|
||||
help: Use `iter_assets` instead
|
||||
|
||||
ℹ Safe fix
|
||||
22 22 |
|
||||
23 23 | # airflow.Dataset
|
||||
24 24 | dataset_from_root = DatasetFromRoot()
|
||||
25 |-dataset_from_root.iter_datasets()
|
||||
25 |+dataset_from_root.iter_assets()
|
||||
26 26 | dataset_from_root.iter_dataset_aliases()
|
||||
27 27 |
|
||||
28 28 | # airflow.datasets
|
||||
22 |
|
||||
23 | # airflow.Dataset
|
||||
24 | dataset_from_root = DatasetFromRoot()
|
||||
- dataset_from_root.iter_datasets()
|
||||
25 + dataset_from_root.iter_assets()
|
||||
26 | dataset_from_root.iter_dataset_aliases()
|
||||
27 |
|
||||
28 | # airflow.datasets
|
||||
|
||||
AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:26:19
|
||||
@@ -33,16 +31,14 @@ AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
28 | # airflow.datasets
|
||||
|
|
||||
help: Use `iter_asset_aliases` instead
|
||||
|
||||
ℹ Safe fix
|
||||
23 23 | # airflow.Dataset
|
||||
24 24 | dataset_from_root = DatasetFromRoot()
|
||||
25 25 | dataset_from_root.iter_datasets()
|
||||
26 |-dataset_from_root.iter_dataset_aliases()
|
||||
26 |+dataset_from_root.iter_asset_aliases()
|
||||
27 27 |
|
||||
28 28 | # airflow.datasets
|
||||
29 29 | dataset_to_test_method_call = Dataset()
|
||||
23 | # airflow.Dataset
|
||||
24 | dataset_from_root = DatasetFromRoot()
|
||||
25 | dataset_from_root.iter_datasets()
|
||||
- dataset_from_root.iter_dataset_aliases()
|
||||
26 + dataset_from_root.iter_asset_aliases()
|
||||
27 |
|
||||
28 | # airflow.datasets
|
||||
29 | dataset_to_test_method_call = Dataset()
|
||||
|
||||
AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:30:29
|
||||
@@ -54,16 +50,14 @@ AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
31 | dataset_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
||||
help: Use `iter_assets` instead
|
||||
|
||||
ℹ Safe fix
|
||||
27 27 |
|
||||
28 28 | # airflow.datasets
|
||||
29 29 | dataset_to_test_method_call = Dataset()
|
||||
30 |-dataset_to_test_method_call.iter_datasets()
|
||||
30 |+dataset_to_test_method_call.iter_assets()
|
||||
31 31 | dataset_to_test_method_call.iter_dataset_aliases()
|
||||
32 32 |
|
||||
33 33 | alias_to_test_method_call = DatasetAlias()
|
||||
27 |
|
||||
28 | # airflow.datasets
|
||||
29 | dataset_to_test_method_call = Dataset()
|
||||
- dataset_to_test_method_call.iter_datasets()
|
||||
30 + dataset_to_test_method_call.iter_assets()
|
||||
31 | dataset_to_test_method_call.iter_dataset_aliases()
|
||||
32 |
|
||||
33 | alias_to_test_method_call = DatasetAlias()
|
||||
|
||||
AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:31:29
|
||||
@@ -76,16 +70,14 @@ AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
33 | alias_to_test_method_call = DatasetAlias()
|
||||
|
|
||||
help: Use `iter_asset_aliases` instead
|
||||
|
||||
ℹ Safe fix
|
||||
28 28 | # airflow.datasets
|
||||
29 29 | dataset_to_test_method_call = Dataset()
|
||||
30 30 | dataset_to_test_method_call.iter_datasets()
|
||||
31 |-dataset_to_test_method_call.iter_dataset_aliases()
|
||||
31 |+dataset_to_test_method_call.iter_asset_aliases()
|
||||
32 32 |
|
||||
33 33 | alias_to_test_method_call = DatasetAlias()
|
||||
34 34 | alias_to_test_method_call.iter_datasets()
|
||||
28 | # airflow.datasets
|
||||
29 | dataset_to_test_method_call = Dataset()
|
||||
30 | dataset_to_test_method_call.iter_datasets()
|
||||
- dataset_to_test_method_call.iter_dataset_aliases()
|
||||
31 + dataset_to_test_method_call.iter_asset_aliases()
|
||||
32 |
|
||||
33 | alias_to_test_method_call = DatasetAlias()
|
||||
34 | alias_to_test_method_call.iter_datasets()
|
||||
|
||||
AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:34:27
|
||||
@@ -96,16 +88,14 @@ AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
35 | alias_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
||||
help: Use `iter_assets` instead
|
||||
|
||||
ℹ Safe fix
|
||||
31 31 | dataset_to_test_method_call.iter_dataset_aliases()
|
||||
32 32 |
|
||||
33 33 | alias_to_test_method_call = DatasetAlias()
|
||||
34 |-alias_to_test_method_call.iter_datasets()
|
||||
34 |+alias_to_test_method_call.iter_assets()
|
||||
35 35 | alias_to_test_method_call.iter_dataset_aliases()
|
||||
36 36 |
|
||||
37 37 | any_to_test_method_call = DatasetAny()
|
||||
31 | dataset_to_test_method_call.iter_dataset_aliases()
|
||||
32 |
|
||||
33 | alias_to_test_method_call = DatasetAlias()
|
||||
- alias_to_test_method_call.iter_datasets()
|
||||
34 + alias_to_test_method_call.iter_assets()
|
||||
35 | alias_to_test_method_call.iter_dataset_aliases()
|
||||
36 |
|
||||
37 | any_to_test_method_call = DatasetAny()
|
||||
|
||||
AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:35:27
|
||||
@@ -118,16 +108,14 @@ AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
37 | any_to_test_method_call = DatasetAny()
|
||||
|
|
||||
help: Use `iter_asset_aliases` instead
|
||||
|
||||
ℹ Safe fix
|
||||
32 32 |
|
||||
33 33 | alias_to_test_method_call = DatasetAlias()
|
||||
34 34 | alias_to_test_method_call.iter_datasets()
|
||||
35 |-alias_to_test_method_call.iter_dataset_aliases()
|
||||
35 |+alias_to_test_method_call.iter_asset_aliases()
|
||||
36 36 |
|
||||
37 37 | any_to_test_method_call = DatasetAny()
|
||||
38 38 | any_to_test_method_call.iter_datasets()
|
||||
32 |
|
||||
33 | alias_to_test_method_call = DatasetAlias()
|
||||
34 | alias_to_test_method_call.iter_datasets()
|
||||
- alias_to_test_method_call.iter_dataset_aliases()
|
||||
35 + alias_to_test_method_call.iter_asset_aliases()
|
||||
36 |
|
||||
37 | any_to_test_method_call = DatasetAny()
|
||||
38 | any_to_test_method_call.iter_datasets()
|
||||
|
||||
AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:38:25
|
||||
@@ -138,16 +126,14 @@ AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
39 | any_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
||||
help: Use `iter_assets` instead
|
||||
|
||||
ℹ Safe fix
|
||||
35 35 | alias_to_test_method_call.iter_dataset_aliases()
|
||||
36 36 |
|
||||
37 37 | any_to_test_method_call = DatasetAny()
|
||||
38 |-any_to_test_method_call.iter_datasets()
|
||||
38 |+any_to_test_method_call.iter_assets()
|
||||
39 39 | any_to_test_method_call.iter_dataset_aliases()
|
||||
40 40 |
|
||||
41 41 | # airflow.datasets.manager
|
||||
35 | alias_to_test_method_call.iter_dataset_aliases()
|
||||
36 |
|
||||
37 | any_to_test_method_call = DatasetAny()
|
||||
- any_to_test_method_call.iter_datasets()
|
||||
38 + any_to_test_method_call.iter_assets()
|
||||
39 | any_to_test_method_call.iter_dataset_aliases()
|
||||
40 |
|
||||
41 | # airflow.datasets.manager
|
||||
|
||||
AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:39:25
|
||||
@@ -160,16 +146,14 @@ AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
41 | # airflow.datasets.manager
|
||||
|
|
||||
help: Use `iter_asset_aliases` instead
|
||||
|
||||
ℹ Safe fix
|
||||
36 36 |
|
||||
37 37 | any_to_test_method_call = DatasetAny()
|
||||
38 38 | any_to_test_method_call.iter_datasets()
|
||||
39 |-any_to_test_method_call.iter_dataset_aliases()
|
||||
39 |+any_to_test_method_call.iter_asset_aliases()
|
||||
40 40 |
|
||||
41 41 | # airflow.datasets.manager
|
||||
42 42 | dm = DatasetManager()
|
||||
36 |
|
||||
37 | any_to_test_method_call = DatasetAny()
|
||||
38 | any_to_test_method_call.iter_datasets()
|
||||
- any_to_test_method_call.iter_dataset_aliases()
|
||||
39 + any_to_test_method_call.iter_asset_aliases()
|
||||
40 |
|
||||
41 | # airflow.datasets.manager
|
||||
42 | dm = DatasetManager()
|
||||
|
||||
AIR301 [*] `airflow.datasets.manager.DatasetManager` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:42:6
|
||||
@@ -181,24 +165,22 @@ AIR301 [*] `airflow.datasets.manager.DatasetManager` is removed in Airflow 3.0
|
||||
44 | dm.create_datasets()
|
||||
|
|
||||
help: Use `AssetManager` from `airflow.assets.manager` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
19 19 | from airflow.providers_manager import ProvidersManager
|
||||
20 20 | from airflow.secrets.base_secrets import BaseSecretsBackend
|
||||
21 21 | from airflow.secrets.local_filesystem import LocalFilesystemBackend
|
||||
22 |+from airflow.assets.manager import AssetManager
|
||||
22 23 |
|
||||
23 24 | # airflow.Dataset
|
||||
24 25 | dataset_from_root = DatasetFromRoot()
|
||||
19 | from airflow.providers_manager import ProvidersManager
|
||||
20 | from airflow.secrets.base_secrets import BaseSecretsBackend
|
||||
21 | from airflow.secrets.local_filesystem import LocalFilesystemBackend
|
||||
22 + from airflow.assets.manager import AssetManager
|
||||
23 |
|
||||
24 | # airflow.Dataset
|
||||
25 | dataset_from_root = DatasetFromRoot()
|
||||
--------------------------------------------------------------------------------
|
||||
39 40 | any_to_test_method_call.iter_dataset_aliases()
|
||||
40 41 |
|
||||
41 42 | # airflow.datasets.manager
|
||||
42 |-dm = DatasetManager()
|
||||
43 |+dm = AssetManager()
|
||||
43 44 | dm.register_dataset_change()
|
||||
44 45 | dm.create_datasets()
|
||||
45 46 | dm.notify_dataset_created()
|
||||
40 | any_to_test_method_call.iter_dataset_aliases()
|
||||
41 |
|
||||
42 | # airflow.datasets.manager
|
||||
- dm = DatasetManager()
|
||||
43 + dm = AssetManager()
|
||||
44 | dm.register_dataset_change()
|
||||
45 | dm.create_datasets()
|
||||
46 | dm.notify_dataset_created()
|
||||
|
||||
AIR301 [*] `register_dataset_change` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:43:4
|
||||
@@ -211,16 +193,14 @@ AIR301 [*] `register_dataset_change` is removed in Airflow 3.0
|
||||
45 | dm.notify_dataset_created()
|
||||
|
|
||||
help: Use `register_asset_change` instead
|
||||
|
||||
ℹ Safe fix
|
||||
40 40 |
|
||||
41 41 | # airflow.datasets.manager
|
||||
42 42 | dm = DatasetManager()
|
||||
43 |-dm.register_dataset_change()
|
||||
43 |+dm.register_asset_change()
|
||||
44 44 | dm.create_datasets()
|
||||
45 45 | dm.notify_dataset_created()
|
||||
46 46 | dm.notify_dataset_changed()
|
||||
40 |
|
||||
41 | # airflow.datasets.manager
|
||||
42 | dm = DatasetManager()
|
||||
- dm.register_dataset_change()
|
||||
43 + dm.register_asset_change()
|
||||
44 | dm.create_datasets()
|
||||
45 | dm.notify_dataset_created()
|
||||
46 | dm.notify_dataset_changed()
|
||||
|
||||
AIR301 [*] `create_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:44:4
|
||||
@@ -233,16 +213,14 @@ AIR301 [*] `create_datasets` is removed in Airflow 3.0
|
||||
46 | dm.notify_dataset_changed()
|
||||
|
|
||||
help: Use `create_assets` instead
|
||||
|
||||
ℹ Safe fix
|
||||
41 41 | # airflow.datasets.manager
|
||||
42 42 | dm = DatasetManager()
|
||||
43 43 | dm.register_dataset_change()
|
||||
44 |-dm.create_datasets()
|
||||
44 |+dm.create_assets()
|
||||
45 45 | dm.notify_dataset_created()
|
||||
46 46 | dm.notify_dataset_changed()
|
||||
47 47 | dm.notify_dataset_alias_created()
|
||||
41 | # airflow.datasets.manager
|
||||
42 | dm = DatasetManager()
|
||||
43 | dm.register_dataset_change()
|
||||
- dm.create_datasets()
|
||||
44 + dm.create_assets()
|
||||
45 | dm.notify_dataset_created()
|
||||
46 | dm.notify_dataset_changed()
|
||||
47 | dm.notify_dataset_alias_created()
|
||||
|
||||
AIR301 [*] `notify_dataset_created` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:45:4
|
||||
@@ -255,16 +233,14 @@ AIR301 [*] `notify_dataset_created` is removed in Airflow 3.0
|
||||
47 | dm.notify_dataset_alias_created()
|
||||
|
|
||||
help: Use `notify_asset_created` instead
|
||||
|
||||
ℹ Safe fix
|
||||
42 42 | dm = DatasetManager()
|
||||
43 43 | dm.register_dataset_change()
|
||||
44 44 | dm.create_datasets()
|
||||
45 |-dm.notify_dataset_created()
|
||||
45 |+dm.notify_asset_created()
|
||||
46 46 | dm.notify_dataset_changed()
|
||||
47 47 | dm.notify_dataset_alias_created()
|
||||
48 48 |
|
||||
42 | dm = DatasetManager()
|
||||
43 | dm.register_dataset_change()
|
||||
44 | dm.create_datasets()
|
||||
- dm.notify_dataset_created()
|
||||
45 + dm.notify_asset_created()
|
||||
46 | dm.notify_dataset_changed()
|
||||
47 | dm.notify_dataset_alias_created()
|
||||
48 |
|
||||
|
||||
AIR301 [*] `notify_dataset_changed` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:46:4
|
||||
@@ -276,16 +252,14 @@ AIR301 [*] `notify_dataset_changed` is removed in Airflow 3.0
|
||||
47 | dm.notify_dataset_alias_created()
|
||||
|
|
||||
help: Use `notify_asset_changed` instead
|
||||
|
||||
ℹ Safe fix
|
||||
43 43 | dm.register_dataset_change()
|
||||
44 44 | dm.create_datasets()
|
||||
45 45 | dm.notify_dataset_created()
|
||||
46 |-dm.notify_dataset_changed()
|
||||
46 |+dm.notify_asset_changed()
|
||||
47 47 | dm.notify_dataset_alias_created()
|
||||
48 48 |
|
||||
49 49 | # airflow.lineage.hook
|
||||
43 | dm.register_dataset_change()
|
||||
44 | dm.create_datasets()
|
||||
45 | dm.notify_dataset_created()
|
||||
- dm.notify_dataset_changed()
|
||||
46 + dm.notify_asset_changed()
|
||||
47 | dm.notify_dataset_alias_created()
|
||||
48 |
|
||||
49 | # airflow.lineage.hook
|
||||
|
||||
AIR301 [*] `notify_dataset_alias_created` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:47:4
|
||||
@@ -298,16 +272,14 @@ AIR301 [*] `notify_dataset_alias_created` is removed in Airflow 3.0
|
||||
49 | # airflow.lineage.hook
|
||||
|
|
||||
help: Use `notify_asset_alias_created` instead
|
||||
|
||||
ℹ Safe fix
|
||||
44 44 | dm.create_datasets()
|
||||
45 45 | dm.notify_dataset_created()
|
||||
46 46 | dm.notify_dataset_changed()
|
||||
47 |-dm.notify_dataset_alias_created()
|
||||
47 |+dm.notify_asset_alias_created()
|
||||
48 48 |
|
||||
49 49 | # airflow.lineage.hook
|
||||
50 50 | dl_info = DatasetLineageInfo()
|
||||
44 | dm.create_datasets()
|
||||
45 | dm.notify_dataset_created()
|
||||
46 | dm.notify_dataset_changed()
|
||||
- dm.notify_dataset_alias_created()
|
||||
47 + dm.notify_asset_alias_created()
|
||||
48 |
|
||||
49 | # airflow.lineage.hook
|
||||
50 | dl_info = DatasetLineageInfo()
|
||||
|
||||
AIR301 [*] `airflow.lineage.hook.DatasetLineageInfo` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:50:11
|
||||
@@ -318,25 +290,23 @@ AIR301 [*] `airflow.lineage.hook.DatasetLineageInfo` is removed in Airflow 3.0
|
||||
51 | dl_info.dataset
|
||||
|
|
||||
help: Use `AssetLineageInfo` from `airflow.lineage.hook` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
9 9 | DatasetAny,
|
||||
10 10 | )
|
||||
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.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 (
|
||||
9 | DatasetAny,
|
||||
10 | )
|
||||
11 | from airflow.datasets.manager import DatasetManager
|
||||
- from airflow.lineage.hook import DatasetLineageInfo, HookLineageCollector
|
||||
12 + from airflow.lineage.hook import DatasetLineageInfo, HookLineageCollector, AssetLineageInfo
|
||||
13 | from airflow.providers.amazon.aws.auth_manager.aws_auth_manager import AwsAuthManager
|
||||
14 | from airflow.providers.apache.beam.hooks import BeamHook, NotAir302HookError
|
||||
15 | from airflow.providers.google.cloud.secrets.secret_manager import (
|
||||
--------------------------------------------------------------------------------
|
||||
47 47 | dm.notify_dataset_alias_created()
|
||||
48 48 |
|
||||
49 49 | # airflow.lineage.hook
|
||||
50 |-dl_info = DatasetLineageInfo()
|
||||
50 |+dl_info = AssetLineageInfo()
|
||||
51 51 | dl_info.dataset
|
||||
52 52 |
|
||||
53 53 | hlc = HookLineageCollector()
|
||||
47 | dm.notify_dataset_alias_created()
|
||||
48 |
|
||||
49 | # airflow.lineage.hook
|
||||
- dl_info = DatasetLineageInfo()
|
||||
50 + dl_info = AssetLineageInfo()
|
||||
51 | dl_info.dataset
|
||||
52 |
|
||||
53 | hlc = HookLineageCollector()
|
||||
|
||||
AIR301 [*] `dataset` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:51:9
|
||||
@@ -349,16 +319,14 @@ AIR301 [*] `dataset` is removed in Airflow 3.0
|
||||
53 | hlc = HookLineageCollector()
|
||||
|
|
||||
help: Use `asset` instead
|
||||
|
||||
ℹ Safe fix
|
||||
48 48 |
|
||||
49 49 | # airflow.lineage.hook
|
||||
50 50 | dl_info = DatasetLineageInfo()
|
||||
51 |-dl_info.dataset
|
||||
51 |+dl_info.asset
|
||||
52 52 |
|
||||
53 53 | hlc = HookLineageCollector()
|
||||
54 54 | hlc.create_dataset()
|
||||
48 |
|
||||
49 | # airflow.lineage.hook
|
||||
50 | dl_info = DatasetLineageInfo()
|
||||
- dl_info.dataset
|
||||
51 + dl_info.asset
|
||||
52 |
|
||||
53 | hlc = HookLineageCollector()
|
||||
54 | hlc.create_dataset()
|
||||
|
||||
AIR301 [*] `create_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:54:5
|
||||
@@ -370,16 +338,14 @@ AIR301 [*] `create_dataset` is removed in Airflow 3.0
|
||||
56 | hlc.add_output_dataset()
|
||||
|
|
||||
help: Use `create_asset` instead
|
||||
|
||||
ℹ Safe fix
|
||||
51 51 | dl_info.dataset
|
||||
52 52 |
|
||||
53 53 | hlc = HookLineageCollector()
|
||||
54 |-hlc.create_dataset()
|
||||
54 |+hlc.create_asset()
|
||||
55 55 | hlc.add_input_dataset()
|
||||
56 56 | hlc.add_output_dataset()
|
||||
57 57 | hlc.collected_datasets()
|
||||
51 | dl_info.dataset
|
||||
52 |
|
||||
53 | hlc = HookLineageCollector()
|
||||
- hlc.create_dataset()
|
||||
54 + hlc.create_asset()
|
||||
55 | hlc.add_input_dataset()
|
||||
56 | hlc.add_output_dataset()
|
||||
57 | hlc.collected_datasets()
|
||||
|
||||
AIR301 [*] `add_input_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:55:5
|
||||
@@ -392,16 +358,14 @@ AIR301 [*] `add_input_dataset` is removed in Airflow 3.0
|
||||
57 | hlc.collected_datasets()
|
||||
|
|
||||
help: Use `add_input_asset` instead
|
||||
|
||||
ℹ Safe fix
|
||||
52 52 |
|
||||
53 53 | hlc = HookLineageCollector()
|
||||
54 54 | hlc.create_dataset()
|
||||
55 |-hlc.add_input_dataset()
|
||||
55 |+hlc.add_input_asset()
|
||||
56 56 | hlc.add_output_dataset()
|
||||
57 57 | hlc.collected_datasets()
|
||||
58 58 |
|
||||
52 |
|
||||
53 | hlc = HookLineageCollector()
|
||||
54 | hlc.create_dataset()
|
||||
- hlc.add_input_dataset()
|
||||
55 + hlc.add_input_asset()
|
||||
56 | hlc.add_output_dataset()
|
||||
57 | hlc.collected_datasets()
|
||||
58 |
|
||||
|
||||
AIR301 [*] `add_output_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:56:5
|
||||
@@ -413,16 +377,14 @@ AIR301 [*] `add_output_dataset` is removed in Airflow 3.0
|
||||
57 | hlc.collected_datasets()
|
||||
|
|
||||
help: Use `add_output_asset` instead
|
||||
|
||||
ℹ Safe fix
|
||||
53 53 | hlc = HookLineageCollector()
|
||||
54 54 | hlc.create_dataset()
|
||||
55 55 | hlc.add_input_dataset()
|
||||
56 |-hlc.add_output_dataset()
|
||||
56 |+hlc.add_output_asset()
|
||||
57 57 | hlc.collected_datasets()
|
||||
58 58 |
|
||||
59 59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
53 | hlc = HookLineageCollector()
|
||||
54 | hlc.create_dataset()
|
||||
55 | hlc.add_input_dataset()
|
||||
- hlc.add_output_dataset()
|
||||
56 + hlc.add_output_asset()
|
||||
57 | hlc.collected_datasets()
|
||||
58 |
|
||||
59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
|
||||
AIR301 [*] `collected_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:57:5
|
||||
@@ -435,16 +397,14 @@ AIR301 [*] `collected_datasets` is removed in Airflow 3.0
|
||||
59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
|
|
||||
help: Use `collected_assets` instead
|
||||
|
||||
ℹ Safe fix
|
||||
54 54 | hlc.create_dataset()
|
||||
55 55 | hlc.add_input_dataset()
|
||||
56 56 | hlc.add_output_dataset()
|
||||
57 |-hlc.collected_datasets()
|
||||
57 |+hlc.collected_assets()
|
||||
58 58 |
|
||||
59 59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
60 60 | aam = AwsAuthManager()
|
||||
54 | hlc.create_dataset()
|
||||
55 | hlc.add_input_dataset()
|
||||
56 | hlc.add_output_dataset()
|
||||
- hlc.collected_datasets()
|
||||
57 + hlc.collected_assets()
|
||||
58 |
|
||||
59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
60 | aam = AwsAuthManager()
|
||||
|
||||
AIR301 [*] `is_authorized_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:61:5
|
||||
@@ -457,16 +417,14 @@ AIR301 [*] `is_authorized_dataset` is removed in Airflow 3.0
|
||||
63 | # airflow.providers.apache.beam.hooks
|
||||
|
|
||||
help: Use `is_authorized_asset` instead
|
||||
|
||||
ℹ Safe fix
|
||||
58 58 |
|
||||
59 59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
60 60 | aam = AwsAuthManager()
|
||||
61 |-aam.is_authorized_dataset()
|
||||
61 |+aam.is_authorized_asset()
|
||||
62 62 |
|
||||
63 63 | # airflow.providers.apache.beam.hooks
|
||||
64 64 | # check get_conn_uri is caught if the class inherits from an airflow hook
|
||||
58 |
|
||||
59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
60 | aam = AwsAuthManager()
|
||||
- aam.is_authorized_dataset()
|
||||
61 + aam.is_authorized_asset()
|
||||
62 |
|
||||
63 | # airflow.providers.apache.beam.hooks
|
||||
64 | # check get_conn_uri is caught if the class inherits from an airflow hook
|
||||
|
||||
AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:73:13
|
||||
@@ -478,16 +436,14 @@ AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
74 | csm_backend.get_connections()
|
||||
|
|
||||
help: Use `get_conn_value` instead
|
||||
|
||||
ℹ Safe fix
|
||||
70 70 |
|
||||
71 71 | # airflow.providers.google.cloud.secrets.secret_manager
|
||||
72 72 | csm_backend = CloudSecretManagerBackend()
|
||||
73 |-csm_backend.get_conn_uri()
|
||||
73 |+csm_backend.get_conn_value()
|
||||
74 74 | csm_backend.get_connections()
|
||||
75 75 |
|
||||
76 76 | # airflow.providers.hashicorp.secrets.vault
|
||||
70 |
|
||||
71 | # airflow.providers.google.cloud.secrets.secret_manager
|
||||
72 | csm_backend = CloudSecretManagerBackend()
|
||||
- csm_backend.get_conn_uri()
|
||||
73 + csm_backend.get_conn_value()
|
||||
74 | csm_backend.get_connections()
|
||||
75 |
|
||||
76 | # airflow.providers.hashicorp.secrets.vault
|
||||
|
||||
AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:74:13
|
||||
@@ -500,16 +456,14 @@ AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
76 | # airflow.providers.hashicorp.secrets.vault
|
||||
|
|
||||
help: Use `get_connection` instead
|
||||
|
||||
ℹ Safe fix
|
||||
71 71 | # airflow.providers.google.cloud.secrets.secret_manager
|
||||
72 72 | csm_backend = CloudSecretManagerBackend()
|
||||
73 73 | csm_backend.get_conn_uri()
|
||||
74 |-csm_backend.get_connections()
|
||||
74 |+csm_backend.get_connection()
|
||||
75 75 |
|
||||
76 76 | # airflow.providers.hashicorp.secrets.vault
|
||||
77 77 | vault_backend = VaultBackend()
|
||||
71 | # airflow.providers.google.cloud.secrets.secret_manager
|
||||
72 | csm_backend = CloudSecretManagerBackend()
|
||||
73 | csm_backend.get_conn_uri()
|
||||
- csm_backend.get_connections()
|
||||
74 + csm_backend.get_connection()
|
||||
75 |
|
||||
76 | # airflow.providers.hashicorp.secrets.vault
|
||||
77 | vault_backend = VaultBackend()
|
||||
|
||||
AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:78:15
|
||||
@@ -521,16 +475,14 @@ AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
79 | vault_backend.get_connections()
|
||||
|
|
||||
help: Use `get_conn_value` instead
|
||||
|
||||
ℹ Safe fix
|
||||
75 75 |
|
||||
76 76 | # airflow.providers.hashicorp.secrets.vault
|
||||
77 77 | vault_backend = VaultBackend()
|
||||
78 |-vault_backend.get_conn_uri()
|
||||
78 |+vault_backend.get_conn_value()
|
||||
79 79 | vault_backend.get_connections()
|
||||
80 80 |
|
||||
81 81 | not_an_error = NotAir302SecretError()
|
||||
75 |
|
||||
76 | # airflow.providers.hashicorp.secrets.vault
|
||||
77 | vault_backend = VaultBackend()
|
||||
- vault_backend.get_conn_uri()
|
||||
78 + vault_backend.get_conn_value()
|
||||
79 | vault_backend.get_connections()
|
||||
80 |
|
||||
81 | not_an_error = NotAir302SecretError()
|
||||
|
||||
AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:79:15
|
||||
@@ -543,16 +495,14 @@ AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
81 | not_an_error = NotAir302SecretError()
|
||||
|
|
||||
help: Use `get_connection` instead
|
||||
|
||||
ℹ Safe fix
|
||||
76 76 | # airflow.providers.hashicorp.secrets.vault
|
||||
77 77 | vault_backend = VaultBackend()
|
||||
78 78 | vault_backend.get_conn_uri()
|
||||
79 |-vault_backend.get_connections()
|
||||
79 |+vault_backend.get_connection()
|
||||
80 80 |
|
||||
81 81 | not_an_error = NotAir302SecretError()
|
||||
82 82 | not_an_error.get_conn_uri()
|
||||
76 | # airflow.providers.hashicorp.secrets.vault
|
||||
77 | vault_backend = VaultBackend()
|
||||
78 | vault_backend.get_conn_uri()
|
||||
- vault_backend.get_connections()
|
||||
79 + vault_backend.get_connection()
|
||||
80 |
|
||||
81 | not_an_error = NotAir302SecretError()
|
||||
82 | not_an_error.get_conn_uri()
|
||||
|
||||
AIR301 [*] `initialize_providers_dataset_uri_resources` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:86:4
|
||||
@@ -565,16 +515,14 @@ AIR301 [*] `initialize_providers_dataset_uri_resources` is removed in Airflow 3.
|
||||
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
|
||||
83 |
|
||||
84 | # airflow.providers_manager
|
||||
85 | pm = ProvidersManager()
|
||||
- pm.initialize_providers_dataset_uri_resources()
|
||||
86 + pm.initialize_providers_asset_uri_resources()
|
||||
87 | pm.dataset_factories
|
||||
88 | pm.dataset_uri_handlers
|
||||
89 | pm.dataset_to_openlineage_converters
|
||||
|
||||
AIR301 [*] `dataset_factories` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:87:4
|
||||
@@ -587,16 +535,14 @@ AIR301 [*] `dataset_factories` is removed in Airflow 3.0
|
||||
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_dataset_uri_resources()
|
||||
87 |-pm.dataset_factories
|
||||
87 |+pm.asset_factories
|
||||
88 88 | pm.dataset_uri_handlers
|
||||
89 89 | pm.dataset_to_openlineage_converters
|
||||
90 90 |
|
||||
84 | # airflow.providers_manager
|
||||
85 | pm = ProvidersManager()
|
||||
86 | pm.initialize_providers_dataset_uri_resources()
|
||||
- pm.dataset_factories
|
||||
87 + pm.asset_factories
|
||||
88 | pm.dataset_uri_handlers
|
||||
89 | pm.dataset_to_openlineage_converters
|
||||
90 |
|
||||
|
||||
AIR301 [*] `dataset_uri_handlers` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:88:4
|
||||
@@ -608,16 +554,14 @@ AIR301 [*] `dataset_uri_handlers` is removed in Airflow 3.0
|
||||
89 | pm.dataset_to_openlineage_converters
|
||||
|
|
||||
help: Use `asset_uri_handlers` instead
|
||||
|
||||
ℹ Safe fix
|
||||
85 85 | pm = ProvidersManager()
|
||||
86 86 | pm.initialize_providers_dataset_uri_resources()
|
||||
87 87 | pm.dataset_factories
|
||||
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
|
||||
85 | pm = ProvidersManager()
|
||||
86 | pm.initialize_providers_dataset_uri_resources()
|
||||
87 | pm.dataset_factories
|
||||
- pm.dataset_uri_handlers
|
||||
88 + pm.asset_uri_handlers
|
||||
89 | pm.dataset_to_openlineage_converters
|
||||
90 |
|
||||
91 | # airflow.secrets.base_secrets
|
||||
|
||||
AIR301 [*] `dataset_to_openlineage_converters` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:89:4
|
||||
@@ -630,16 +574,14 @@ AIR301 [*] `dataset_to_openlineage_converters` is removed in Airflow 3.0
|
||||
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_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()
|
||||
86 | pm.initialize_providers_dataset_uri_resources()
|
||||
87 | pm.dataset_factories
|
||||
88 | pm.dataset_uri_handlers
|
||||
- pm.dataset_to_openlineage_converters
|
||||
89 + pm.asset_to_openlineage_converters
|
||||
90 |
|
||||
91 | # airflow.secrets.base_secrets
|
||||
92 | base_secret_backend = BaseSecretsBackend()
|
||||
|
||||
AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:93:21
|
||||
@@ -651,16 +593,14 @@ AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
94 | base_secret_backend.get_connections()
|
||||
|
|
||||
help: Use `get_conn_value` instead
|
||||
|
||||
ℹ Safe fix
|
||||
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
|
||||
90 |
|
||||
91 | # airflow.secrets.base_secrets
|
||||
92 | base_secret_backend = BaseSecretsBackend()
|
||||
- base_secret_backend.get_conn_uri()
|
||||
93 + base_secret_backend.get_conn_value()
|
||||
94 | base_secret_backend.get_connections()
|
||||
95 |
|
||||
96 | # airflow.secrets.local_filesystem
|
||||
|
||||
AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:94:21
|
||||
@@ -673,16 +613,14 @@ AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
96 | # airflow.secrets.local_filesystem
|
||||
|
|
||||
help: Use `get_connection` instead
|
||||
|
||||
ℹ Safe fix
|
||||
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()
|
||||
91 | # airflow.secrets.base_secrets
|
||||
92 | base_secret_backend = BaseSecretsBackend()
|
||||
93 | base_secret_backend.get_conn_uri()
|
||||
- base_secret_backend.get_connections()
|
||||
94 + base_secret_backend.get_connection()
|
||||
95 |
|
||||
96 | # airflow.secrets.local_filesystem
|
||||
97 | lfb = LocalFilesystemBackend()
|
||||
|
||||
AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:98:5
|
||||
@@ -693,10 +631,8 @@ AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Use `get_connection` instead
|
||||
|
||||
ℹ Safe fix
|
||||
95 95 |
|
||||
96 96 | # airflow.secrets.local_filesystem
|
||||
97 97 | lfb = LocalFilesystemBackend()
|
||||
98 |-lfb.get_connections()
|
||||
98 |+lfb.get_connection()
|
||||
95 |
|
||||
96 | # airflow.secrets.local_filesystem
|
||||
97 | lfb = LocalFilesystemBackend()
|
||||
- lfb.get_connections()
|
||||
98 + lfb.get_connection()
|
||||
|
||||
@@ -337,16 +337,14 @@ AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
113 | template_searchpath=["/templates"],
|
||||
|
|
||||
help: Use `schedule` instead
|
||||
|
||||
ℹ Safe fix
|
||||
108 108 |
|
||||
109 109 | with DAG(
|
||||
110 110 | dag_id="example_dag",
|
||||
111 |- schedule_interval="@daily",
|
||||
111 |+ schedule="@daily",
|
||||
112 112 | start_date=datetime(2023, 1, 1),
|
||||
113 113 | template_searchpath=["/templates"],
|
||||
114 114 | ) as dag:
|
||||
108 |
|
||||
109 | with DAG(
|
||||
110 | dag_id="example_dag",
|
||||
- schedule_interval="@daily",
|
||||
111 + schedule="@daily",
|
||||
112 | start_date=datetime(2023, 1, 1),
|
||||
113 | template_searchpath=["/templates"],
|
||||
114 | ) as dag:
|
||||
|
||||
AIR301 `next_ds` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:135:23
|
||||
|
||||
@@ -123,23 +123,22 @@ AIR301 [*] `airflow.secrets.cache.SecretCache` is removed in Airflow 3.0
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
help: Use `SecretCache` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
13 13 | from airflow.contrib.aws_athena_hook import AWSAthenaHook
|
||||
14 14 | from airflow.datasets import DatasetAliasEvent
|
||||
15 15 | from airflow.operators.subdag import SubDagOperator
|
||||
16 |-from airflow.secrets.cache import SecretCache
|
||||
17 16 | from airflow.secrets.local_filesystem import LocalFilesystemBackend
|
||||
18 17 | from airflow.triggers.external_task import TaskStateTrigger
|
||||
19 18 | from airflow.utils import dates
|
||||
13 | from airflow.contrib.aws_athena_hook import AWSAthenaHook
|
||||
14 | from airflow.datasets import DatasetAliasEvent
|
||||
15 | from airflow.operators.subdag import SubDagOperator
|
||||
- from airflow.secrets.cache import SecretCache
|
||||
16 | from airflow.secrets.local_filesystem import LocalFilesystemBackend
|
||||
17 | from airflow.triggers.external_task import TaskStateTrigger
|
||||
18 | from airflow.utils import dates
|
||||
--------------------------------------------------------------------------------
|
||||
34 33 | from airflow.utils.trigger_rule import TriggerRule
|
||||
35 34 | from airflow.www.auth import has_access, has_access_dataset
|
||||
36 35 | from airflow.www.utils import get_sensitive_variables_fields, should_hide_value_for_key
|
||||
36 |+from airflow.sdk import SecretCache
|
||||
37 37 |
|
||||
38 38 | # airflow root
|
||||
39 39 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
33 | from airflow.utils.trigger_rule import TriggerRule
|
||||
34 | from airflow.www.auth import has_access, has_access_dataset
|
||||
35 | from airflow.www.utils import get_sensitive_variables_fields, should_hide_value_for_key
|
||||
36 + from airflow.sdk import SecretCache
|
||||
37 |
|
||||
38 | # airflow root
|
||||
39 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR301 `airflow.triggers.external_task.TaskStateTrigger` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:65:1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -12,16 +12,14 @@ AIR301 [*] `airflow.providers.amazon.aws.auth_manager.avp.entities.AvpEntities.D
|
||||
13 | # airflow.providers.openlineage.utils.utils
|
||||
|
|
||||
help: Use `AvpEntities.ASSET` from `airflow.providers.amazon.aws.auth_manager.avp.entities` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
8 8 | from airflow.secrets.local_filesystem import load_connections
|
||||
9 9 | from airflow.security.permissions import RESOURCE_DATASET
|
||||
10 10 |
|
||||
11 |-AvpEntities.DATASET
|
||||
11 |+AvpEntities
|
||||
12 12 |
|
||||
13 13 | # airflow.providers.openlineage.utils.utils
|
||||
14 14 | DatasetInfo()
|
||||
8 | from airflow.secrets.local_filesystem import load_connections
|
||||
9 | from airflow.security.permissions import RESOURCE_DATASET
|
||||
10 |
|
||||
- AvpEntities.DATASET
|
||||
11 + AvpEntities
|
||||
12 |
|
||||
13 | # airflow.providers.openlineage.utils.utils
|
||||
14 | DatasetInfo()
|
||||
|
||||
AIR301 [*] `airflow.providers.openlineage.utils.utils.DatasetInfo` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:14:1
|
||||
@@ -32,24 +30,22 @@ AIR301 [*] `airflow.providers.openlineage.utils.utils.DatasetInfo` is removed in
|
||||
15 | translate_airflow_dataset()
|
||||
|
|
||||
help: Use `AssetInfo` from `airflow.providers.openlineage.utils.utils` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
4 4 | from airflow.providers.openlineage.utils.utils import (
|
||||
5 5 | DatasetInfo,
|
||||
6 6 | translate_airflow_dataset,
|
||||
7 |+AssetInfo,
|
||||
7 8 | )
|
||||
8 9 | from airflow.secrets.local_filesystem import load_connections
|
||||
9 10 | from airflow.security.permissions import RESOURCE_DATASET
|
||||
4 | from airflow.providers.openlineage.utils.utils import (
|
||||
5 | DatasetInfo,
|
||||
6 | translate_airflow_dataset,
|
||||
7 + AssetInfo,
|
||||
8 | )
|
||||
9 | from airflow.secrets.local_filesystem import load_connections
|
||||
10 | from airflow.security.permissions import RESOURCE_DATASET
|
||||
--------------------------------------------------------------------------------
|
||||
11 12 | AvpEntities.DATASET
|
||||
12 13 |
|
||||
13 14 | # airflow.providers.openlineage.utils.utils
|
||||
14 |-DatasetInfo()
|
||||
15 |+AssetInfo()
|
||||
15 16 | translate_airflow_dataset()
|
||||
16 17 |
|
||||
17 18 | # airflow.secrets.local_filesystem
|
||||
12 | AvpEntities.DATASET
|
||||
13 |
|
||||
14 | # airflow.providers.openlineage.utils.utils
|
||||
- DatasetInfo()
|
||||
15 + AssetInfo()
|
||||
16 | translate_airflow_dataset()
|
||||
17 |
|
||||
18 | # airflow.secrets.local_filesystem
|
||||
|
||||
AIR301 [*] `airflow.providers.openlineage.utils.utils.translate_airflow_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:15:1
|
||||
@@ -62,24 +58,22 @@ AIR301 [*] `airflow.providers.openlineage.utils.utils.translate_airflow_dataset`
|
||||
17 | # airflow.secrets.local_filesystem
|
||||
|
|
||||
help: Use `translate_airflow_asset` from `airflow.providers.openlineage.utils.utils` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
4 4 | from airflow.providers.openlineage.utils.utils import (
|
||||
5 5 | DatasetInfo,
|
||||
6 6 | translate_airflow_dataset,
|
||||
7 |+translate_airflow_asset,
|
||||
7 8 | )
|
||||
8 9 | from airflow.secrets.local_filesystem import load_connections
|
||||
9 10 | from airflow.security.permissions import RESOURCE_DATASET
|
||||
4 | from airflow.providers.openlineage.utils.utils import (
|
||||
5 | DatasetInfo,
|
||||
6 | translate_airflow_dataset,
|
||||
7 + translate_airflow_asset,
|
||||
8 | )
|
||||
9 | from airflow.secrets.local_filesystem import load_connections
|
||||
10 | from airflow.security.permissions import RESOURCE_DATASET
|
||||
--------------------------------------------------------------------------------
|
||||
12 13 |
|
||||
13 14 | # airflow.providers.openlineage.utils.utils
|
||||
14 15 | DatasetInfo()
|
||||
15 |-translate_airflow_dataset()
|
||||
16 |+translate_airflow_asset()
|
||||
16 17 |
|
||||
17 18 | # airflow.secrets.local_filesystem
|
||||
18 19 | load_connections()
|
||||
13 |
|
||||
14 | # airflow.providers.openlineage.utils.utils
|
||||
15 | DatasetInfo()
|
||||
- translate_airflow_dataset()
|
||||
16 + translate_airflow_asset()
|
||||
17 |
|
||||
18 | # airflow.secrets.local_filesystem
|
||||
19 | load_connections()
|
||||
|
||||
AIR301 [*] `airflow.secrets.local_filesystem.load_connections` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:18:1
|
||||
@@ -91,25 +85,23 @@ AIR301 [*] `airflow.secrets.local_filesystem.load_connections` is removed in Air
|
||||
20 | # airflow.security.permissions
|
||||
|
|
||||
help: Use `load_connections_dict` from `airflow.secrets.local_filesystem` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
5 5 | DatasetInfo,
|
||||
6 6 | translate_airflow_dataset,
|
||||
7 7 | )
|
||||
8 |-from airflow.secrets.local_filesystem import load_connections
|
||||
8 |+from airflow.secrets.local_filesystem import load_connections, load_connections_dict
|
||||
9 9 | from airflow.security.permissions import RESOURCE_DATASET
|
||||
10 10 |
|
||||
11 11 | AvpEntities.DATASET
|
||||
5 | DatasetInfo,
|
||||
6 | translate_airflow_dataset,
|
||||
7 | )
|
||||
- from airflow.secrets.local_filesystem import load_connections
|
||||
8 + from airflow.secrets.local_filesystem import load_connections, load_connections_dict
|
||||
9 | from airflow.security.permissions import RESOURCE_DATASET
|
||||
10 |
|
||||
11 | AvpEntities.DATASET
|
||||
--------------------------------------------------------------------------------
|
||||
15 15 | translate_airflow_dataset()
|
||||
16 16 |
|
||||
17 17 | # airflow.secrets.local_filesystem
|
||||
18 |-load_connections()
|
||||
18 |+load_connections_dict()
|
||||
19 19 |
|
||||
20 20 | # airflow.security.permissions
|
||||
21 21 | RESOURCE_DATASET
|
||||
15 | translate_airflow_dataset()
|
||||
16 |
|
||||
17 | # airflow.secrets.local_filesystem
|
||||
- load_connections()
|
||||
18 + load_connections_dict()
|
||||
19 |
|
||||
20 | # airflow.security.permissions
|
||||
21 | RESOURCE_DATASET
|
||||
|
||||
AIR301 [*] `airflow.security.permissions.RESOURCE_DATASET` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:21:1
|
||||
@@ -121,25 +113,23 @@ AIR301 [*] `airflow.security.permissions.RESOURCE_DATASET` is removed in Airflow
|
||||
23 | from airflow.providers.amazon.aws.datasets.s3 import (
|
||||
|
|
||||
help: Use `RESOURCE_ASSET` from `airflow.security.permissions` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
6 6 | translate_airflow_dataset,
|
||||
7 7 | )
|
||||
8 8 | from airflow.secrets.local_filesystem import load_connections
|
||||
9 |-from airflow.security.permissions import RESOURCE_DATASET
|
||||
9 |+from airflow.security.permissions import RESOURCE_DATASET, RESOURCE_ASSET
|
||||
10 10 |
|
||||
11 11 | AvpEntities.DATASET
|
||||
12 12 |
|
||||
6 | translate_airflow_dataset,
|
||||
7 | )
|
||||
8 | from airflow.secrets.local_filesystem import load_connections
|
||||
- from airflow.security.permissions import RESOURCE_DATASET
|
||||
9 + from airflow.security.permissions import RESOURCE_DATASET, RESOURCE_ASSET
|
||||
10 |
|
||||
11 | AvpEntities.DATASET
|
||||
12 |
|
||||
--------------------------------------------------------------------------------
|
||||
18 18 | load_connections()
|
||||
19 19 |
|
||||
20 20 | # airflow.security.permissions
|
||||
21 |-RESOURCE_DATASET
|
||||
21 |+RESOURCE_ASSET
|
||||
22 22 |
|
||||
23 23 | from airflow.providers.amazon.aws.datasets.s3 import (
|
||||
24 24 | convert_dataset_to_openlineage as s3_convert_dataset_to_openlineage,
|
||||
18 | load_connections()
|
||||
19 |
|
||||
20 | # airflow.security.permissions
|
||||
- RESOURCE_DATASET
|
||||
21 + RESOURCE_ASSET
|
||||
22 |
|
||||
23 | from airflow.providers.amazon.aws.datasets.s3 import (
|
||||
24 | convert_dataset_to_openlineage as s3_convert_dataset_to_openlineage,
|
||||
|
||||
AIR301 [*] `airflow.providers.amazon.aws.datasets.s3.create_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:28:1
|
||||
@@ -151,18 +141,16 @@ AIR301 [*] `airflow.providers.amazon.aws.datasets.s3.create_dataset` is removed
|
||||
29 | s3_convert_dataset_to_openlineage()
|
||||
|
|
||||
help: Use `create_asset` from `airflow.providers.amazon.aws.assets.s3` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
24 24 | convert_dataset_to_openlineage as s3_convert_dataset_to_openlineage,
|
||||
25 25 | )
|
||||
26 26 | from airflow.providers.amazon.aws.datasets.s3 import create_dataset as s3_create_dataset
|
||||
27 |+from airflow.providers.amazon.aws.assets.s3 import create_asset
|
||||
27 28 |
|
||||
28 |-s3_create_dataset()
|
||||
29 |+create_asset()
|
||||
29 30 | s3_convert_dataset_to_openlineage()
|
||||
30 31 |
|
||||
31 32 | from airflow.providers.common.io.dataset.file import (
|
||||
24 | convert_dataset_to_openlineage as s3_convert_dataset_to_openlineage,
|
||||
25 | )
|
||||
26 | from airflow.providers.amazon.aws.datasets.s3 import create_dataset as s3_create_dataset
|
||||
27 + from airflow.providers.amazon.aws.assets.s3 import create_asset
|
||||
28 |
|
||||
- s3_create_dataset()
|
||||
29 + create_asset()
|
||||
30 | s3_convert_dataset_to_openlineage()
|
||||
31 |
|
||||
32 | from airflow.providers.common.io.dataset.file import (
|
||||
|
||||
AIR301 [*] `airflow.providers.amazon.aws.datasets.s3.convert_dataset_to_openlineage` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:29:1
|
||||
@@ -174,19 +162,17 @@ AIR301 [*] `airflow.providers.amazon.aws.datasets.s3.convert_dataset_to_openline
|
||||
31 | from airflow.providers.common.io.dataset.file import (
|
||||
|
|
||||
help: Use `convert_asset_to_openlineage` from `airflow.providers.amazon.aws.assets.s3` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
24 24 | convert_dataset_to_openlineage as s3_convert_dataset_to_openlineage,
|
||||
25 25 | )
|
||||
26 26 | from airflow.providers.amazon.aws.datasets.s3 import create_dataset as s3_create_dataset
|
||||
27 |+from airflow.providers.amazon.aws.assets.s3 import convert_asset_to_openlineage
|
||||
27 28 |
|
||||
28 29 | s3_create_dataset()
|
||||
29 |-s3_convert_dataset_to_openlineage()
|
||||
30 |+convert_asset_to_openlineage()
|
||||
30 31 |
|
||||
31 32 | from airflow.providers.common.io.dataset.file import (
|
||||
32 33 | convert_dataset_to_openlineage as io_convert_dataset_to_openlineage,
|
||||
24 | convert_dataset_to_openlineage as s3_convert_dataset_to_openlineage,
|
||||
25 | )
|
||||
26 | from airflow.providers.amazon.aws.datasets.s3 import create_dataset as s3_create_dataset
|
||||
27 + from airflow.providers.amazon.aws.assets.s3 import convert_asset_to_openlineage
|
||||
28 |
|
||||
29 | s3_create_dataset()
|
||||
- s3_convert_dataset_to_openlineage()
|
||||
30 + convert_asset_to_openlineage()
|
||||
31 |
|
||||
32 | from airflow.providers.common.io.dataset.file import (
|
||||
33 | convert_dataset_to_openlineage as io_convert_dataset_to_openlineage,
|
||||
|
||||
AIR301 [*] `airflow.providers.google.datasets.bigquery.create_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:45:1
|
||||
@@ -199,18 +185,16 @@ AIR301 [*] `airflow.providers.google.datasets.bigquery.create_dataset` is remove
|
||||
47 | # airflow.providers.google.datasets.gcs
|
||||
|
|
||||
help: Use `create_asset` from `airflow.providers.google.assets.bigquery` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
41 41 | from airflow.providers.google.datasets.bigquery import (
|
||||
42 42 | create_dataset as bigquery_create_dataset,
|
||||
43 43 | )
|
||||
44 |+from airflow.providers.google.assets.bigquery import create_asset
|
||||
44 45 |
|
||||
45 |-bigquery_create_dataset()
|
||||
46 |+create_asset()
|
||||
46 47 |
|
||||
47 48 | # airflow.providers.google.datasets.gcs
|
||||
48 49 | from airflow.providers.google.datasets.gcs import (
|
||||
41 | from airflow.providers.google.datasets.bigquery import (
|
||||
42 | create_dataset as bigquery_create_dataset,
|
||||
43 | )
|
||||
44 + from airflow.providers.google.assets.bigquery import create_asset
|
||||
45 |
|
||||
- bigquery_create_dataset()
|
||||
46 + create_asset()
|
||||
47 |
|
||||
48 | # airflow.providers.google.datasets.gcs
|
||||
49 | from airflow.providers.google.datasets.gcs import (
|
||||
|
||||
AIR301 [*] `airflow.providers.google.datasets.gcs.create_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:53:1
|
||||
@@ -222,16 +206,14 @@ AIR301 [*] `airflow.providers.google.datasets.gcs.create_dataset` is removed in
|
||||
54 | gcs_convert_dataset_to_openlineage()
|
||||
|
|
||||
help: Use `create_asset` from `airflow.providers.google.assets.gcs` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
49 49 | convert_dataset_to_openlineage as gcs_convert_dataset_to_openlineage,
|
||||
50 50 | )
|
||||
51 51 | from airflow.providers.google.datasets.gcs import create_dataset as gcs_create_dataset
|
||||
52 |+from airflow.providers.google.assets.gcs import create_asset
|
||||
52 53 |
|
||||
53 |-gcs_create_dataset()
|
||||
54 |+create_asset()
|
||||
54 55 | gcs_convert_dataset_to_openlineage()
|
||||
49 | convert_dataset_to_openlineage as gcs_convert_dataset_to_openlineage,
|
||||
50 | )
|
||||
51 | from airflow.providers.google.datasets.gcs import create_dataset as gcs_create_dataset
|
||||
52 + from airflow.providers.google.assets.gcs import create_asset
|
||||
53 |
|
||||
- gcs_create_dataset()
|
||||
54 + create_asset()
|
||||
55 | gcs_convert_dataset_to_openlineage()
|
||||
|
||||
AIR301 [*] `airflow.providers.google.datasets.gcs.convert_dataset_to_openlineage` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:54:1
|
||||
@@ -241,13 +223,11 @@ AIR301 [*] `airflow.providers.google.datasets.gcs.convert_dataset_to_openlineage
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Use `convert_asset_to_openlineage` from `airflow.providers.google.assets.gcs` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
49 49 | convert_dataset_to_openlineage as gcs_convert_dataset_to_openlineage,
|
||||
50 50 | )
|
||||
51 51 | from airflow.providers.google.datasets.gcs import create_dataset as gcs_create_dataset
|
||||
52 |+from airflow.providers.google.assets.gcs import convert_asset_to_openlineage
|
||||
52 53 |
|
||||
53 54 | gcs_create_dataset()
|
||||
54 |-gcs_convert_dataset_to_openlineage()
|
||||
55 |+convert_asset_to_openlineage()
|
||||
49 | convert_dataset_to_openlineage as gcs_convert_dataset_to_openlineage,
|
||||
50 | )
|
||||
51 | from airflow.providers.google.datasets.gcs import create_dataset as gcs_create_dataset
|
||||
52 + from airflow.providers.google.assets.gcs import convert_asset_to_openlineage
|
||||
53 |
|
||||
54 | gcs_create_dataset()
|
||||
- gcs_convert_dataset_to_openlineage()
|
||||
55 + convert_asset_to_openlineage()
|
||||
|
||||
@@ -11,23 +11,22 @@ AIR302 [*] `airflow.hooks.S3_hook.S3Hook` is moved into `amazon` provider in Air
|
||||
15 | provide_bucket_name()
|
||||
|
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `S3Hook` from `airflow.providers.amazon.aws.hooks.s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 3 | from airflow.hooks.S3_hook import (
|
||||
4 |- S3Hook,
|
||||
5 4 | provide_bucket_name,
|
||||
6 5 | )
|
||||
7 6 | from airflow.operators.gcs_to_s3 import GCSToS3Operator
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
3 | from airflow.hooks.S3_hook import (
|
||||
- S3Hook,
|
||||
4 | provide_bucket_name,
|
||||
5 | )
|
||||
6 | from airflow.operators.gcs_to_s3 import GCSToS3Operator
|
||||
--------------------------------------------------------------------------------
|
||||
10 9 | from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
11 10 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
12 11 | from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 |+from airflow.providers.amazon.aws.hooks.s3 import S3Hook
|
||||
13 13 |
|
||||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
9 | from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
10 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
11 | from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 + from airflow.providers.amazon.aws.hooks.s3 import S3Hook
|
||||
13 |
|
||||
14 | S3Hook()
|
||||
15 | provide_bucket_name()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.hooks.S3_hook.provide_bucket_name` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:15:1
|
||||
@@ -39,23 +38,22 @@ AIR302 [*] `airflow.hooks.S3_hook.provide_bucket_name` is moved into `amazon` pr
|
||||
17 | GCSToS3Operator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `provide_bucket_name` from `airflow.providers.amazon.aws.hooks.s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
3 3 | from airflow.hooks.S3_hook import (
|
||||
4 4 | S3Hook,
|
||||
5 |- provide_bucket_name,
|
||||
6 5 | )
|
||||
7 6 | from airflow.operators.gcs_to_s3 import GCSToS3Operator
|
||||
8 7 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Operator
|
||||
2 |
|
||||
3 | from airflow.hooks.S3_hook import (
|
||||
4 | S3Hook,
|
||||
- provide_bucket_name,
|
||||
5 | )
|
||||
6 | from airflow.operators.gcs_to_s3 import GCSToS3Operator
|
||||
7 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Operator
|
||||
--------------------------------------------------------------------------------
|
||||
10 9 | from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
11 10 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
12 11 | from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 |+from airflow.providers.amazon.aws.hooks.s3 import provide_bucket_name
|
||||
13 13 |
|
||||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
9 | from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
10 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
11 | from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 + from airflow.providers.amazon.aws.hooks.s3 import provide_bucket_name
|
||||
13 |
|
||||
14 | S3Hook()
|
||||
15 | provide_bucket_name()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.gcs_to_s3.GCSToS3Operator` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:17:1
|
||||
@@ -68,21 +66,20 @@ AIR302 [*] `airflow.operators.gcs_to_s3.GCSToS3Operator` is moved into `amazon`
|
||||
19 | RedshiftToS3Operator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `GCSToS3Operator` from `airflow.providers.amazon.aws.transfers.gcs_to_s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
4 4 | S3Hook,
|
||||
5 5 | provide_bucket_name,
|
||||
6 6 | )
|
||||
7 |-from airflow.operators.gcs_to_s3 import GCSToS3Operator
|
||||
8 7 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Operator
|
||||
9 8 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Operator
|
||||
10 9 | from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
11 10 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
12 11 | from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 |+from airflow.providers.amazon.aws.transfers.gcs_to_s3 import GCSToS3Operator
|
||||
13 13 |
|
||||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
4 | S3Hook,
|
||||
5 | provide_bucket_name,
|
||||
6 | )
|
||||
- from airflow.operators.gcs_to_s3 import GCSToS3Operator
|
||||
7 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Operator
|
||||
8 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Operator
|
||||
9 | from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
10 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
11 | from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 + from airflow.providers.amazon.aws.transfers.gcs_to_s3 import GCSToS3Operator
|
||||
13 |
|
||||
14 | S3Hook()
|
||||
15 | provide_bucket_name()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.google_api_to_s3_transfer.GoogleApiToS3Operator` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:18:1
|
||||
@@ -94,20 +91,19 @@ AIR302 [*] `airflow.operators.google_api_to_s3_transfer.GoogleApiToS3Operator` i
|
||||
20 | S3FileTransformOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `GoogleApiToS3Operator` from `airflow.providers.amazon.aws.transfers.google_api_to_s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
5 5 | provide_bucket_name,
|
||||
6 6 | )
|
||||
7 7 | from airflow.operators.gcs_to_s3 import GCSToS3Operator
|
||||
8 |-from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Operator
|
||||
9 8 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Operator
|
||||
10 9 | from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
11 10 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
12 11 | from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 |+from airflow.providers.amazon.aws.transfers.google_api_to_s3 import GoogleApiToS3Operator
|
||||
13 13 |
|
||||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
5 | provide_bucket_name,
|
||||
6 | )
|
||||
7 | from airflow.operators.gcs_to_s3 import GCSToS3Operator
|
||||
- from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Operator
|
||||
8 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Operator
|
||||
9 | from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
10 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
11 | from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 + from airflow.providers.amazon.aws.transfers.google_api_to_s3 import GoogleApiToS3Operator
|
||||
13 |
|
||||
14 | S3Hook()
|
||||
15 | provide_bucket_name()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.redshift_to_s3_operator.RedshiftToS3Operator` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:19:1
|
||||
@@ -120,19 +116,18 @@ AIR302 [*] `airflow.operators.redshift_to_s3_operator.RedshiftToS3Operator` is m
|
||||
21 | S3ToRedshiftOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `RedshiftToS3Operator` from `airflow.providers.amazon.aws.transfers.redshift_to_s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
6 6 | )
|
||||
7 7 | from airflow.operators.gcs_to_s3 import GCSToS3Operator
|
||||
8 8 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Operator
|
||||
9 |-from airflow.operators.redshift_to_s3_operator import RedshiftToS3Operator
|
||||
10 9 | from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
11 10 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
12 11 | from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 |+from airflow.providers.amazon.aws.transfers.redshift_to_s3 import RedshiftToS3Operator
|
||||
13 13 |
|
||||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
6 | )
|
||||
7 | from airflow.operators.gcs_to_s3 import GCSToS3Operator
|
||||
8 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Operator
|
||||
- from airflow.operators.redshift_to_s3_operator import RedshiftToS3Operator
|
||||
9 | from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
10 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
11 | from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 + from airflow.providers.amazon.aws.transfers.redshift_to_s3 import RedshiftToS3Operator
|
||||
13 |
|
||||
14 | S3Hook()
|
||||
15 | provide_bucket_name()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.s3_file_transform_operator.S3FileTransformOperator` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:20:1
|
||||
@@ -145,18 +140,17 @@ AIR302 [*] `airflow.operators.s3_file_transform_operator.S3FileTransformOperator
|
||||
22 | S3KeySensor()
|
||||
|
|
||||
help: Install `apache-airflow-providers-amazon>=3.0.0` and use `S3FileTransformOperator` from `airflow.providers.amazon.aws.operators.s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
7 7 | from airflow.operators.gcs_to_s3 import GCSToS3Operator
|
||||
8 8 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Operator
|
||||
9 9 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Operator
|
||||
10 |-from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
11 10 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
12 11 | from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 |+from airflow.providers.amazon.aws.operators.s3 import S3FileTransformOperator
|
||||
13 13 |
|
||||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
7 | from airflow.operators.gcs_to_s3 import GCSToS3Operator
|
||||
8 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Operator
|
||||
9 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Operator
|
||||
- from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
10 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
11 | from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 + from airflow.providers.amazon.aws.operators.s3 import S3FileTransformOperator
|
||||
13 |
|
||||
14 | S3Hook()
|
||||
15 | provide_bucket_name()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.s3_to_redshift_operator.S3ToRedshiftOperator` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:21:1
|
||||
@@ -168,17 +162,16 @@ AIR302 [*] `airflow.operators.s3_to_redshift_operator.S3ToRedshiftOperator` is m
|
||||
22 | S3KeySensor()
|
||||
|
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `S3ToRedshiftOperator` from `airflow.providers.amazon.aws.transfers.s3_to_redshift` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
8 8 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Operator
|
||||
9 9 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Operator
|
||||
10 10 | from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
11 |-from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
12 11 | from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 |+from airflow.providers.amazon.aws.transfers.s3_to_redshift import S3ToRedshiftOperator
|
||||
13 13 |
|
||||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
8 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Operator
|
||||
9 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Operator
|
||||
10 | from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
- from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
11 | from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 + from airflow.providers.amazon.aws.transfers.s3_to_redshift import S3ToRedshiftOperator
|
||||
13 |
|
||||
14 | S3Hook()
|
||||
15 | provide_bucket_name()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.sensors.s3_key_sensor.S3KeySensor` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:22:1
|
||||
@@ -191,16 +184,15 @@ AIR302 [*] `airflow.sensors.s3_key_sensor.S3KeySensor` is moved into `amazon` pr
|
||||
24 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Transfer
|
||||
|
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `S3KeySensor` from `airflow.providers.amazon.aws.sensors.s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
9 9 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Operator
|
||||
10 10 | from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
11 11 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
12 |-from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 |+from airflow.providers.amazon.aws.sensors.s3 import S3KeySensor
|
||||
13 13 |
|
||||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
9 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Operator
|
||||
10 | from airflow.operators.s3_file_transform_operator import S3FileTransformOperator
|
||||
11 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftOperator
|
||||
- from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
12 + from airflow.providers.amazon.aws.sensors.s3 import S3KeySensor
|
||||
13 |
|
||||
14 | S3Hook()
|
||||
15 | provide_bucket_name()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.google_api_to_s3_transfer.GoogleApiToS3Transfer` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:26:1
|
||||
@@ -213,15 +205,14 @@ AIR302 [*] `airflow.operators.google_api_to_s3_transfer.GoogleApiToS3Transfer` i
|
||||
28 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Transfer
|
||||
|
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `GoogleApiToS3Operator` from `airflow.providers.amazon.aws.transfers.google_api_to_s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
22 22 | S3KeySensor()
|
||||
23 23 |
|
||||
24 24 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Transfer
|
||||
25 |+from airflow.providers.amazon.aws.transfers.google_api_to_s3 import GoogleApiToS3Operator
|
||||
25 26 |
|
||||
26 27 | GoogleApiToS3Transfer()
|
||||
27 28 |
|
||||
22 | S3KeySensor()
|
||||
23 |
|
||||
24 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Transfer
|
||||
25 + from airflow.providers.amazon.aws.transfers.google_api_to_s3 import GoogleApiToS3Operator
|
||||
26 |
|
||||
27 | GoogleApiToS3Transfer()
|
||||
28 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.redshift_to_s3_operator.RedshiftToS3Transfer` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:30:1
|
||||
@@ -234,15 +225,14 @@ AIR302 [*] `airflow.operators.redshift_to_s3_operator.RedshiftToS3Transfer` is m
|
||||
32 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftTransfer
|
||||
|
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `RedshiftToS3Operator` from `airflow.providers.amazon.aws.transfers.redshift_to_s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
26 26 | GoogleApiToS3Transfer()
|
||||
27 27 |
|
||||
28 28 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Transfer
|
||||
29 |+from airflow.providers.amazon.aws.transfers.redshift_to_s3 import RedshiftToS3Operator
|
||||
29 30 |
|
||||
30 31 | RedshiftToS3Transfer()
|
||||
31 32 |
|
||||
26 | GoogleApiToS3Transfer()
|
||||
27 |
|
||||
28 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Transfer
|
||||
29 + from airflow.providers.amazon.aws.transfers.redshift_to_s3 import RedshiftToS3Operator
|
||||
30 |
|
||||
31 | RedshiftToS3Transfer()
|
||||
32 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.s3_to_redshift_operator.S3ToRedshiftTransfer` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:34:1
|
||||
@@ -253,11 +243,10 @@ AIR302 [*] `airflow.operators.s3_to_redshift_operator.S3ToRedshiftTransfer` is m
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `S3ToRedshiftOperator` from `airflow.providers.amazon.aws.transfers.s3_to_redshift` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
30 30 | RedshiftToS3Transfer()
|
||||
31 31 |
|
||||
32 32 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftTransfer
|
||||
33 |+from airflow.providers.amazon.aws.transfers.s3_to_redshift import S3ToRedshiftOperator
|
||||
33 34 |
|
||||
34 35 | S3ToRedshiftTransfer()
|
||||
30 | RedshiftToS3Transfer()
|
||||
31 |
|
||||
32 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftTransfer
|
||||
33 + from airflow.providers.amazon.aws.transfers.s3_to_redshift import S3ToRedshiftOperator
|
||||
34 |
|
||||
35 | S3ToRedshiftTransfer()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
@@ -12,19 +12,18 @@ AIR302 [*] `airflow.config_templates.default_celery.DEFAULT_CELERY_CONFIG` is mo
|
||||
11 | app
|
||||
|
|
||||
help: Install `apache-airflow-providers-celery>=3.3.0` and use `DEFAULT_CELERY_CONFIG` from `airflow.providers.celery.executors.default_celery` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 |-from airflow.config_templates.default_celery import DEFAULT_CELERY_CONFIG
|
||||
4 3 | from airflow.executors.celery_executor import (
|
||||
5 4 | CeleryExecutor,
|
||||
6 5 | app,
|
||||
7 6 | )
|
||||
7 |+from airflow.providers.celery.executors.default_celery import DEFAULT_CELERY_CONFIG
|
||||
8 8 |
|
||||
9 9 | DEFAULT_CELERY_CONFIG
|
||||
10 10 |
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
- from airflow.config_templates.default_celery import DEFAULT_CELERY_CONFIG
|
||||
3 | from airflow.executors.celery_executor import (
|
||||
4 | CeleryExecutor,
|
||||
5 | app,
|
||||
6 | )
|
||||
7 + from airflow.providers.celery.executors.default_celery import DEFAULT_CELERY_CONFIG
|
||||
8 |
|
||||
9 | DEFAULT_CELERY_CONFIG
|
||||
10 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.executors.celery_executor.app` is moved into `celery` provider in Airflow 3.0;
|
||||
--> AIR302_celery.py:11:1
|
||||
@@ -36,17 +35,16 @@ AIR302 [*] `airflow.executors.celery_executor.app` is moved into `celery` provid
|
||||
12 | CeleryExecutor()
|
||||
|
|
||||
help: Install `apache-airflow-providers-celery>=3.3.0` and use `app` from `airflow.providers.celery.executors.celery_executor_utils` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
3 3 | from airflow.config_templates.default_celery import DEFAULT_CELERY_CONFIG
|
||||
4 4 | from airflow.executors.celery_executor import (
|
||||
5 5 | CeleryExecutor,
|
||||
6 |- app,
|
||||
7 6 | )
|
||||
7 |+from airflow.providers.celery.executors.celery_executor_utils import app
|
||||
8 8 |
|
||||
9 9 | DEFAULT_CELERY_CONFIG
|
||||
10 10 |
|
||||
3 | from airflow.config_templates.default_celery import DEFAULT_CELERY_CONFIG
|
||||
4 | from airflow.executors.celery_executor import (
|
||||
5 | CeleryExecutor,
|
||||
- app,
|
||||
6 | )
|
||||
7 + from airflow.providers.celery.executors.celery_executor_utils import app
|
||||
8 |
|
||||
9 | DEFAULT_CELERY_CONFIG
|
||||
10 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.executors.celery_executor.CeleryExecutor` is moved into `celery` provider in Airflow 3.0;
|
||||
--> AIR302_celery.py:12:1
|
||||
@@ -56,15 +54,14 @@ AIR302 [*] `airflow.executors.celery_executor.CeleryExecutor` is moved into `cel
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-celery>=3.3.0` and use `CeleryExecutor` from `airflow.providers.celery.executors.celery_executor` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
3 3 | from airflow.config_templates.default_celery import DEFAULT_CELERY_CONFIG
|
||||
4 4 | from airflow.executors.celery_executor import (
|
||||
5 |- CeleryExecutor,
|
||||
6 5 | app,
|
||||
7 6 | )
|
||||
7 |+from airflow.providers.celery.executors.celery_executor import CeleryExecutor
|
||||
8 8 |
|
||||
9 9 | DEFAULT_CELERY_CONFIG
|
||||
10 10 |
|
||||
2 |
|
||||
3 | from airflow.config_templates.default_celery import DEFAULT_CELERY_CONFIG
|
||||
4 | from airflow.executors.celery_executor import (
|
||||
- CeleryExecutor,
|
||||
5 | app,
|
||||
6 | )
|
||||
7 + from airflow.providers.celery.executors.celery_executor import CeleryExecutor
|
||||
8 |
|
||||
9 | DEFAULT_CELERY_CONFIG
|
||||
10 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
@@ -11,18 +11,17 @@ AIR302 [*] `airflow.hooks.dbapi.ConnectorProtocol` is moved into `common-sql` pr
|
||||
9 | DbApiHook()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `ConnectorProtocol` from `airflow.providers.common.sql.hooks.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 3 | from airflow.hooks.dbapi import (
|
||||
4 |- ConnectorProtocol,
|
||||
5 4 | DbApiHook,
|
||||
6 5 | )
|
||||
6 |+from airflow.providers.common.sql.hooks.sql import ConnectorProtocol
|
||||
7 7 |
|
||||
8 8 | ConnectorProtocol()
|
||||
9 9 | DbApiHook()
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
3 | from airflow.hooks.dbapi import (
|
||||
- ConnectorProtocol,
|
||||
4 | DbApiHook,
|
||||
5 | )
|
||||
6 + from airflow.providers.common.sql.hooks.sql import ConnectorProtocol
|
||||
7 |
|
||||
8 | ConnectorProtocol()
|
||||
9 | DbApiHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.hooks.dbapi.DbApiHook` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:9:1
|
||||
@@ -34,17 +33,16 @@ AIR302 [*] `airflow.hooks.dbapi.DbApiHook` is moved into `common-sql` provider i
|
||||
11 | from airflow.hooks.dbapi_hook import DbApiHook
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `DbApiHook` from `airflow.providers.common.sql.hooks.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
3 3 | from airflow.hooks.dbapi import (
|
||||
4 4 | ConnectorProtocol,
|
||||
5 |- DbApiHook,
|
||||
6 5 | )
|
||||
6 |+from airflow.providers.common.sql.hooks.sql import DbApiHook
|
||||
7 7 |
|
||||
8 8 | ConnectorProtocol()
|
||||
9 9 | DbApiHook()
|
||||
2 |
|
||||
3 | from airflow.hooks.dbapi import (
|
||||
4 | ConnectorProtocol,
|
||||
- DbApiHook,
|
||||
5 | )
|
||||
6 + from airflow.providers.common.sql.hooks.sql import DbApiHook
|
||||
7 |
|
||||
8 | ConnectorProtocol()
|
||||
9 | DbApiHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.hooks.dbapi_hook.DbApiHook` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:14:1
|
||||
@@ -56,17 +54,16 @@ AIR302 [*] `airflow.hooks.dbapi_hook.DbApiHook` is moved into `common-sql` provi
|
||||
15 | SQLCheckOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `DbApiHook` from `airflow.providers.common.sql.hooks.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
8 8 | ConnectorProtocol()
|
||||
9 9 | DbApiHook()
|
||||
10 10 |
|
||||
11 |-from airflow.hooks.dbapi_hook import DbApiHook
|
||||
12 11 | from airflow.operators.check_operator import SQLCheckOperator
|
||||
12 |+from airflow.providers.common.sql.hooks.sql import DbApiHook
|
||||
13 13 |
|
||||
14 14 | DbApiHook()
|
||||
15 15 | SQLCheckOperator()
|
||||
8 | ConnectorProtocol()
|
||||
9 | DbApiHook()
|
||||
10 |
|
||||
- from airflow.hooks.dbapi_hook import DbApiHook
|
||||
11 | from airflow.operators.check_operator import SQLCheckOperator
|
||||
12 + from airflow.providers.common.sql.hooks.sql import DbApiHook
|
||||
13 |
|
||||
14 | DbApiHook()
|
||||
15 | SQLCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.SQLCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:15:1
|
||||
@@ -76,16 +73,15 @@ AIR302 [*] `airflow.operators.check_operator.SQLCheckOperator` is moved into `co
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
9 9 | DbApiHook()
|
||||
10 10 |
|
||||
11 11 | from airflow.hooks.dbapi_hook import DbApiHook
|
||||
12 |-from airflow.operators.check_operator import SQLCheckOperator
|
||||
12 |+from airflow.providers.common.sql.operators.sql import SQLCheckOperator
|
||||
13 13 |
|
||||
14 14 | DbApiHook()
|
||||
15 15 | SQLCheckOperator()
|
||||
9 | DbApiHook()
|
||||
10 |
|
||||
11 | from airflow.hooks.dbapi_hook import DbApiHook
|
||||
- from airflow.operators.check_operator import SQLCheckOperator
|
||||
12 + from airflow.providers.common.sql.operators.sql import SQLCheckOperator
|
||||
13 |
|
||||
14 | DbApiHook()
|
||||
15 | SQLCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.SQLCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:21:1
|
||||
@@ -97,16 +93,15 @@ AIR302 [*] `airflow.operators.sql.SQLCheckOperator` is moved into `common-sql` p
|
||||
22 | CheckOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
16 16 |
|
||||
17 17 |
|
||||
18 18 | from airflow.operators.check_operator import CheckOperator
|
||||
19 |-from airflow.operators.sql import SQLCheckOperator
|
||||
19 |+from airflow.providers.common.sql.operators.sql import SQLCheckOperator
|
||||
20 20 |
|
||||
21 21 | SQLCheckOperator()
|
||||
22 22 | CheckOperator()
|
||||
16 |
|
||||
17 |
|
||||
18 | from airflow.operators.check_operator import CheckOperator
|
||||
- from airflow.operators.sql import SQLCheckOperator
|
||||
19 + from airflow.providers.common.sql.operators.sql import SQLCheckOperator
|
||||
20 |
|
||||
21 | SQLCheckOperator()
|
||||
22 | CheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.CheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:22:1
|
||||
@@ -116,15 +111,14 @@ AIR302 [*] `airflow.operators.check_operator.CheckOperator` is moved into `commo
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
17 17 |
|
||||
18 18 | from airflow.operators.check_operator import CheckOperator
|
||||
19 19 | from airflow.operators.sql import SQLCheckOperator
|
||||
20 |+from airflow.providers.common.sql.operators.sql import SQLCheckOperator
|
||||
20 21 |
|
||||
21 22 | SQLCheckOperator()
|
||||
22 23 | CheckOperator()
|
||||
17 |
|
||||
18 | from airflow.operators.check_operator import CheckOperator
|
||||
19 | from airflow.operators.sql import SQLCheckOperator
|
||||
20 + from airflow.providers.common.sql.operators.sql import SQLCheckOperator
|
||||
21 |
|
||||
22 | SQLCheckOperator()
|
||||
23 | CheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.druid_check_operator.CheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:27:1
|
||||
@@ -135,15 +129,14 @@ AIR302 [*] `airflow.operators.druid_check_operator.CheckOperator` is moved into
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
23 23 |
|
||||
24 24 |
|
||||
25 25 | from airflow.operators.druid_check_operator import CheckOperator
|
||||
26 |+from airflow.providers.common.sql.operators.sql import SQLCheckOperator
|
||||
26 27 |
|
||||
27 28 | CheckOperator()
|
||||
28 29 |
|
||||
23 |
|
||||
24 |
|
||||
25 | from airflow.operators.druid_check_operator import CheckOperator
|
||||
26 + from airflow.providers.common.sql.operators.sql import SQLCheckOperator
|
||||
27 |
|
||||
28 | CheckOperator()
|
||||
29 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.CheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:32:1
|
||||
@@ -154,15 +147,14 @@ AIR302 [*] `airflow.operators.presto_check_operator.CheckOperator` is moved into
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
28 28 |
|
||||
29 29 |
|
||||
30 30 | from airflow.operators.presto_check_operator import CheckOperator
|
||||
31 |+from airflow.providers.common.sql.operators.sql import SQLCheckOperator
|
||||
31 32 |
|
||||
32 33 | CheckOperator()
|
||||
33 34 |
|
||||
28 |
|
||||
29 |
|
||||
30 | from airflow.operators.presto_check_operator import CheckOperator
|
||||
31 + from airflow.providers.common.sql.operators.sql import SQLCheckOperator
|
||||
32 |
|
||||
33 | CheckOperator()
|
||||
34 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.druid_check_operator.DruidCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:42:1
|
||||
@@ -175,15 +167,14 @@ AIR302 [*] `airflow.operators.druid_check_operator.DruidCheckOperator` is moved
|
||||
44 | IntervalCheckOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
38 38 | )
|
||||
39 39 | from airflow.operators.druid_check_operator import DruidCheckOperator
|
||||
40 40 | from airflow.operators.presto_check_operator import PrestoCheckOperator
|
||||
41 |+from airflow.providers.common.sql.operators.sql import SQLCheckOperator
|
||||
41 42 |
|
||||
42 43 | DruidCheckOperator()
|
||||
43 44 | PrestoCheckOperator()
|
||||
38 | )
|
||||
39 | from airflow.operators.druid_check_operator import DruidCheckOperator
|
||||
40 | from airflow.operators.presto_check_operator import PrestoCheckOperator
|
||||
41 + from airflow.providers.common.sql.operators.sql import SQLCheckOperator
|
||||
42 |
|
||||
43 | DruidCheckOperator()
|
||||
44 | PrestoCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.PrestoCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:43:1
|
||||
@@ -195,15 +186,14 @@ AIR302 [*] `airflow.operators.presto_check_operator.PrestoCheckOperator` is move
|
||||
45 | SQLIntervalCheckOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
38 38 | )
|
||||
39 39 | from airflow.operators.druid_check_operator import DruidCheckOperator
|
||||
40 40 | from airflow.operators.presto_check_operator import PrestoCheckOperator
|
||||
41 |+from airflow.providers.common.sql.operators.sql import SQLCheckOperator
|
||||
41 42 |
|
||||
42 43 | DruidCheckOperator()
|
||||
43 44 | PrestoCheckOperator()
|
||||
38 | )
|
||||
39 | from airflow.operators.druid_check_operator import DruidCheckOperator
|
||||
40 | from airflow.operators.presto_check_operator import PrestoCheckOperator
|
||||
41 + from airflow.providers.common.sql.operators.sql import SQLCheckOperator
|
||||
42 |
|
||||
43 | DruidCheckOperator()
|
||||
44 | PrestoCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.IntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:44:1
|
||||
@@ -215,19 +205,18 @@ AIR302 [*] `airflow.operators.check_operator.IntervalCheckOperator` is moved int
|
||||
45 | SQLIntervalCheckOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLIntervalCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
34 34 |
|
||||
35 35 | from airflow.operators.check_operator import (
|
||||
36 36 | IntervalCheckOperator,
|
||||
37 |- SQLIntervalCheckOperator,
|
||||
38 37 | )
|
||||
39 38 | from airflow.operators.druid_check_operator import DruidCheckOperator
|
||||
40 39 | from airflow.operators.presto_check_operator import PrestoCheckOperator
|
||||
40 |+from airflow.providers.common.sql.operators.sql import SQLIntervalCheckOperator
|
||||
41 41 |
|
||||
42 42 | DruidCheckOperator()
|
||||
43 43 | PrestoCheckOperator()
|
||||
34 |
|
||||
35 | from airflow.operators.check_operator import (
|
||||
36 | IntervalCheckOperator,
|
||||
- SQLIntervalCheckOperator,
|
||||
37 | )
|
||||
38 | from airflow.operators.druid_check_operator import DruidCheckOperator
|
||||
39 | from airflow.operators.presto_check_operator import PrestoCheckOperator
|
||||
40 + from airflow.providers.common.sql.operators.sql import SQLIntervalCheckOperator
|
||||
41 |
|
||||
42 | DruidCheckOperator()
|
||||
43 | PrestoCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.SQLIntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:45:1
|
||||
@@ -238,19 +227,18 @@ AIR302 [*] `airflow.operators.check_operator.SQLIntervalCheckOperator` is moved
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLIntervalCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
34 34 |
|
||||
35 35 | from airflow.operators.check_operator import (
|
||||
36 36 | IntervalCheckOperator,
|
||||
37 |- SQLIntervalCheckOperator,
|
||||
38 37 | )
|
||||
39 38 | from airflow.operators.druid_check_operator import DruidCheckOperator
|
||||
40 39 | from airflow.operators.presto_check_operator import PrestoCheckOperator
|
||||
40 |+from airflow.providers.common.sql.operators.sql import SQLIntervalCheckOperator
|
||||
41 41 |
|
||||
42 42 | DruidCheckOperator()
|
||||
43 43 | PrestoCheckOperator()
|
||||
34 |
|
||||
35 | from airflow.operators.check_operator import (
|
||||
36 | IntervalCheckOperator,
|
||||
- SQLIntervalCheckOperator,
|
||||
37 | )
|
||||
38 | from airflow.operators.druid_check_operator import DruidCheckOperator
|
||||
39 | from airflow.operators.presto_check_operator import PrestoCheckOperator
|
||||
40 + from airflow.providers.common.sql.operators.sql import SQLIntervalCheckOperator
|
||||
41 |
|
||||
42 | DruidCheckOperator()
|
||||
43 | PrestoCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.IntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:54:1
|
||||
@@ -263,15 +251,14 @@ AIR302 [*] `airflow.operators.presto_check_operator.IntervalCheckOperator` is mo
|
||||
56 | PrestoIntervalCheckOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLIntervalCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
50 50 | PrestoIntervalCheckOperator,
|
||||
51 51 | )
|
||||
52 52 | from airflow.operators.sql import SQLIntervalCheckOperator
|
||||
53 |+from airflow.providers.common.sql.operators.sql import SQLIntervalCheckOperator
|
||||
53 54 |
|
||||
54 55 | IntervalCheckOperator()
|
||||
55 56 | SQLIntervalCheckOperator()
|
||||
50 | PrestoIntervalCheckOperator,
|
||||
51 | )
|
||||
52 | from airflow.operators.sql import SQLIntervalCheckOperator
|
||||
53 + from airflow.providers.common.sql.operators.sql import SQLIntervalCheckOperator
|
||||
54 |
|
||||
55 | IntervalCheckOperator()
|
||||
56 | SQLIntervalCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.SQLIntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:55:1
|
||||
@@ -282,16 +269,15 @@ AIR302 [*] `airflow.operators.sql.SQLIntervalCheckOperator` is moved into `commo
|
||||
56 | PrestoIntervalCheckOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLIntervalCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
49 49 | IntervalCheckOperator,
|
||||
50 50 | PrestoIntervalCheckOperator,
|
||||
51 51 | )
|
||||
52 |-from airflow.operators.sql import SQLIntervalCheckOperator
|
||||
52 |+from airflow.providers.common.sql.operators.sql import SQLIntervalCheckOperator
|
||||
53 53 |
|
||||
54 54 | IntervalCheckOperator()
|
||||
55 55 | SQLIntervalCheckOperator()
|
||||
49 | IntervalCheckOperator,
|
||||
50 | PrestoIntervalCheckOperator,
|
||||
51 | )
|
||||
- from airflow.operators.sql import SQLIntervalCheckOperator
|
||||
52 + from airflow.providers.common.sql.operators.sql import SQLIntervalCheckOperator
|
||||
53 |
|
||||
54 | IntervalCheckOperator()
|
||||
55 | SQLIntervalCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.PrestoIntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:56:1
|
||||
@@ -302,15 +288,14 @@ AIR302 [*] `airflow.operators.presto_check_operator.PrestoIntervalCheckOperator`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLIntervalCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
50 50 | PrestoIntervalCheckOperator,
|
||||
51 51 | )
|
||||
52 52 | from airflow.operators.sql import SQLIntervalCheckOperator
|
||||
53 |+from airflow.providers.common.sql.operators.sql import SQLIntervalCheckOperator
|
||||
53 54 |
|
||||
54 55 | IntervalCheckOperator()
|
||||
55 56 | SQLIntervalCheckOperator()
|
||||
50 | PrestoIntervalCheckOperator,
|
||||
51 | )
|
||||
52 | from airflow.operators.sql import SQLIntervalCheckOperator
|
||||
53 + from airflow.providers.common.sql.operators.sql import SQLIntervalCheckOperator
|
||||
54 |
|
||||
55 | IntervalCheckOperator()
|
||||
56 | SQLIntervalCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.SQLThresholdCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:64:1
|
||||
@@ -322,18 +307,17 @@ AIR302 [*] `airflow.operators.check_operator.SQLThresholdCheckOperator` is moved
|
||||
65 | ThresholdCheckOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLThresholdCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
57 57 |
|
||||
58 58 |
|
||||
59 59 | from airflow.operators.check_operator import (
|
||||
60 |- SQLThresholdCheckOperator,
|
||||
61 60 | ThresholdCheckOperator,
|
||||
62 61 | )
|
||||
62 |+from airflow.providers.common.sql.operators.sql import SQLThresholdCheckOperator
|
||||
63 63 |
|
||||
64 64 | SQLThresholdCheckOperator()
|
||||
65 65 | ThresholdCheckOperator()
|
||||
57 |
|
||||
58 |
|
||||
59 | from airflow.operators.check_operator import (
|
||||
- SQLThresholdCheckOperator,
|
||||
60 | ThresholdCheckOperator,
|
||||
61 | )
|
||||
62 + from airflow.providers.common.sql.operators.sql import SQLThresholdCheckOperator
|
||||
63 |
|
||||
64 | SQLThresholdCheckOperator()
|
||||
65 | ThresholdCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.ThresholdCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:65:1
|
||||
@@ -343,18 +327,17 @@ AIR302 [*] `airflow.operators.check_operator.ThresholdCheckOperator` is moved in
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLThresholdCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
57 57 |
|
||||
58 58 |
|
||||
59 59 | from airflow.operators.check_operator import (
|
||||
60 |- SQLThresholdCheckOperator,
|
||||
61 60 | ThresholdCheckOperator,
|
||||
62 61 | )
|
||||
62 |+from airflow.providers.common.sql.operators.sql import SQLThresholdCheckOperator
|
||||
63 63 |
|
||||
64 64 | SQLThresholdCheckOperator()
|
||||
65 65 | ThresholdCheckOperator()
|
||||
57 |
|
||||
58 |
|
||||
59 | from airflow.operators.check_operator import (
|
||||
- SQLThresholdCheckOperator,
|
||||
60 | ThresholdCheckOperator,
|
||||
61 | )
|
||||
62 + from airflow.providers.common.sql.operators.sql import SQLThresholdCheckOperator
|
||||
63 |
|
||||
64 | SQLThresholdCheckOperator()
|
||||
65 | ThresholdCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.SQLThresholdCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:70:1
|
||||
@@ -365,16 +348,15 @@ AIR302 [*] `airflow.operators.sql.SQLThresholdCheckOperator` is moved into `comm
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLThresholdCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
65 65 | ThresholdCheckOperator()
|
||||
66 66 |
|
||||
67 67 |
|
||||
68 |-from airflow.operators.sql import SQLThresholdCheckOperator
|
||||
68 |+from airflow.providers.common.sql.operators.sql import SQLThresholdCheckOperator
|
||||
69 69 |
|
||||
70 70 | SQLThresholdCheckOperator()
|
||||
71 71 |
|
||||
65 | ThresholdCheckOperator()
|
||||
66 |
|
||||
67 |
|
||||
- from airflow.operators.sql import SQLThresholdCheckOperator
|
||||
68 + from airflow.providers.common.sql.operators.sql import SQLThresholdCheckOperator
|
||||
69 |
|
||||
70 | SQLThresholdCheckOperator()
|
||||
71 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.SQLValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:78:1
|
||||
@@ -386,18 +368,17 @@ AIR302 [*] `airflow.operators.check_operator.SQLValueCheckOperator` is moved int
|
||||
79 | ValueCheckOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLValueCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
71 71 |
|
||||
72 72 |
|
||||
73 73 | from airflow.operators.check_operator import (
|
||||
74 |- SQLValueCheckOperator,
|
||||
75 74 | ValueCheckOperator,
|
||||
76 75 | )
|
||||
76 |+from airflow.providers.common.sql.operators.sql import SQLValueCheckOperator
|
||||
77 77 |
|
||||
78 78 | SQLValueCheckOperator()
|
||||
79 79 | ValueCheckOperator()
|
||||
71 |
|
||||
72 |
|
||||
73 | from airflow.operators.check_operator import (
|
||||
- SQLValueCheckOperator,
|
||||
74 | ValueCheckOperator,
|
||||
75 | )
|
||||
76 + from airflow.providers.common.sql.operators.sql import SQLValueCheckOperator
|
||||
77 |
|
||||
78 | SQLValueCheckOperator()
|
||||
79 | ValueCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.ValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:79:1
|
||||
@@ -407,18 +388,17 @@ AIR302 [*] `airflow.operators.check_operator.ValueCheckOperator` is moved into `
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLValueCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
71 71 |
|
||||
72 72 |
|
||||
73 73 | from airflow.operators.check_operator import (
|
||||
74 |- SQLValueCheckOperator,
|
||||
75 74 | ValueCheckOperator,
|
||||
76 75 | )
|
||||
76 |+from airflow.providers.common.sql.operators.sql import SQLValueCheckOperator
|
||||
77 77 |
|
||||
78 78 | SQLValueCheckOperator()
|
||||
79 79 | ValueCheckOperator()
|
||||
71 |
|
||||
72 |
|
||||
73 | from airflow.operators.check_operator import (
|
||||
- SQLValueCheckOperator,
|
||||
74 | ValueCheckOperator,
|
||||
75 | )
|
||||
76 + from airflow.providers.common.sql.operators.sql import SQLValueCheckOperator
|
||||
77 |
|
||||
78 | SQLValueCheckOperator()
|
||||
79 | ValueCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.SQLValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:88:1
|
||||
@@ -431,16 +411,15 @@ AIR302 [*] `airflow.operators.sql.SQLValueCheckOperator` is moved into `common-s
|
||||
90 | PrestoValueCheckOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLValueCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
83 83 | PrestoValueCheckOperator,
|
||||
84 84 | ValueCheckOperator,
|
||||
85 85 | )
|
||||
86 |-from airflow.operators.sql import SQLValueCheckOperator
|
||||
86 |+from airflow.providers.common.sql.operators.sql import SQLValueCheckOperator
|
||||
87 87 |
|
||||
88 88 | SQLValueCheckOperator()
|
||||
89 89 | ValueCheckOperator()
|
||||
83 | PrestoValueCheckOperator,
|
||||
84 | ValueCheckOperator,
|
||||
85 | )
|
||||
- from airflow.operators.sql import SQLValueCheckOperator
|
||||
86 + from airflow.providers.common.sql.operators.sql import SQLValueCheckOperator
|
||||
87 |
|
||||
88 | SQLValueCheckOperator()
|
||||
89 | ValueCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.ValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:89:1
|
||||
@@ -451,15 +430,14 @@ AIR302 [*] `airflow.operators.presto_check_operator.ValueCheckOperator` is moved
|
||||
90 | PrestoValueCheckOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLValueCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
84 84 | ValueCheckOperator,
|
||||
85 85 | )
|
||||
86 86 | from airflow.operators.sql import SQLValueCheckOperator
|
||||
87 |+from airflow.providers.common.sql.operators.sql import SQLValueCheckOperator
|
||||
87 88 |
|
||||
88 89 | SQLValueCheckOperator()
|
||||
89 90 | ValueCheckOperator()
|
||||
84 | ValueCheckOperator,
|
||||
85 | )
|
||||
86 | from airflow.operators.sql import SQLValueCheckOperator
|
||||
87 + from airflow.providers.common.sql.operators.sql import SQLValueCheckOperator
|
||||
88 |
|
||||
89 | SQLValueCheckOperator()
|
||||
90 | ValueCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.PrestoValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:90:1
|
||||
@@ -470,15 +448,14 @@ AIR302 [*] `airflow.operators.presto_check_operator.PrestoValueCheckOperator` is
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLValueCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
84 84 | ValueCheckOperator,
|
||||
85 85 | )
|
||||
86 86 | from airflow.operators.sql import SQLValueCheckOperator
|
||||
87 |+from airflow.providers.common.sql.operators.sql import SQLValueCheckOperator
|
||||
87 88 |
|
||||
88 89 | SQLValueCheckOperator()
|
||||
89 90 | ValueCheckOperator()
|
||||
84 | ValueCheckOperator,
|
||||
85 | )
|
||||
86 | from airflow.operators.sql import SQLValueCheckOperator
|
||||
87 + from airflow.providers.common.sql.operators.sql import SQLValueCheckOperator
|
||||
88 |
|
||||
89 | SQLValueCheckOperator()
|
||||
90 | ValueCheckOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.BaseSQLOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:102:1
|
||||
@@ -491,22 +468,21 @@ AIR302 [*] `airflow.operators.sql.BaseSQLOperator` is moved into `common-sql` pr
|
||||
104 | SQLTableCheckOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `BaseSQLOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
91 91 |
|
||||
92 92 |
|
||||
93 93 | from airflow.operators.sql import (
|
||||
94 |- BaseSQLOperator,
|
||||
95 94 | BranchSQLOperator,
|
||||
96 95 | SQLColumnCheckOperator,
|
||||
97 96 | SQLTableCheckOperator,
|
||||
98 97 | _convert_to_float_if_possible,
|
||||
99 98 | parse_boolean,
|
||||
100 99 | )
|
||||
100 |+from airflow.providers.common.sql.operators.sql import BaseSQLOperator
|
||||
101 101 |
|
||||
102 102 | BaseSQLOperator()
|
||||
103 103 | BranchSQLOperator()
|
||||
91 |
|
||||
92 |
|
||||
93 | from airflow.operators.sql import (
|
||||
- BaseSQLOperator,
|
||||
94 | BranchSQLOperator,
|
||||
95 | SQLColumnCheckOperator,
|
||||
96 | SQLTableCheckOperator,
|
||||
97 | _convert_to_float_if_possible,
|
||||
98 | parse_boolean,
|
||||
99 | )
|
||||
100 + from airflow.providers.common.sql.operators.sql import BaseSQLOperator
|
||||
101 |
|
||||
102 | BaseSQLOperator()
|
||||
103 | BranchSQLOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.BranchSQLOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:103:1
|
||||
@@ -518,21 +494,20 @@ AIR302 [*] `airflow.operators.sql.BranchSQLOperator` is moved into `common-sql`
|
||||
105 | SQLColumnCheckOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `BranchSQLOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
92 92 |
|
||||
93 93 | from airflow.operators.sql import (
|
||||
94 94 | BaseSQLOperator,
|
||||
95 |- BranchSQLOperator,
|
||||
96 95 | SQLColumnCheckOperator,
|
||||
97 96 | SQLTableCheckOperator,
|
||||
98 97 | _convert_to_float_if_possible,
|
||||
99 98 | parse_boolean,
|
||||
100 99 | )
|
||||
100 |+from airflow.providers.common.sql.operators.sql import BranchSQLOperator
|
||||
101 101 |
|
||||
102 102 | BaseSQLOperator()
|
||||
103 103 | BranchSQLOperator()
|
||||
92 |
|
||||
93 | from airflow.operators.sql import (
|
||||
94 | BaseSQLOperator,
|
||||
- BranchSQLOperator,
|
||||
95 | SQLColumnCheckOperator,
|
||||
96 | SQLTableCheckOperator,
|
||||
97 | _convert_to_float_if_possible,
|
||||
98 | parse_boolean,
|
||||
99 | )
|
||||
100 + from airflow.providers.common.sql.operators.sql import BranchSQLOperator
|
||||
101 |
|
||||
102 | BaseSQLOperator()
|
||||
103 | BranchSQLOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.SQLTableCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:104:1
|
||||
@@ -545,19 +520,18 @@ AIR302 [*] `airflow.operators.sql.SQLTableCheckOperator` is moved into `common-s
|
||||
106 | _convert_to_float_if_possible()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLTableCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
94 94 | BaseSQLOperator,
|
||||
95 95 | BranchSQLOperator,
|
||||
96 96 | SQLColumnCheckOperator,
|
||||
97 |- SQLTableCheckOperator,
|
||||
98 97 | _convert_to_float_if_possible,
|
||||
99 98 | parse_boolean,
|
||||
100 99 | )
|
||||
100 |+from airflow.providers.common.sql.operators.sql import SQLTableCheckOperator
|
||||
101 101 |
|
||||
102 102 | BaseSQLOperator()
|
||||
103 103 | BranchSQLOperator()
|
||||
94 | BaseSQLOperator,
|
||||
95 | BranchSQLOperator,
|
||||
96 | SQLColumnCheckOperator,
|
||||
- SQLTableCheckOperator,
|
||||
97 | _convert_to_float_if_possible,
|
||||
98 | parse_boolean,
|
||||
99 | )
|
||||
100 + from airflow.providers.common.sql.operators.sql import SQLTableCheckOperator
|
||||
101 |
|
||||
102 | BaseSQLOperator()
|
||||
103 | BranchSQLOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.SQLColumnCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:105:1
|
||||
@@ -570,20 +544,19 @@ AIR302 [*] `airflow.operators.sql.SQLColumnCheckOperator` is moved into `common-
|
||||
107 | parse_boolean()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `SQLColumnCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
93 93 | from airflow.operators.sql import (
|
||||
94 94 | BaseSQLOperator,
|
||||
95 95 | BranchSQLOperator,
|
||||
96 |- SQLColumnCheckOperator,
|
||||
97 96 | SQLTableCheckOperator,
|
||||
98 97 | _convert_to_float_if_possible,
|
||||
99 98 | parse_boolean,
|
||||
100 99 | )
|
||||
100 |+from airflow.providers.common.sql.operators.sql import SQLColumnCheckOperator
|
||||
101 101 |
|
||||
102 102 | BaseSQLOperator()
|
||||
103 103 | BranchSQLOperator()
|
||||
93 | from airflow.operators.sql import (
|
||||
94 | BaseSQLOperator,
|
||||
95 | BranchSQLOperator,
|
||||
- SQLColumnCheckOperator,
|
||||
96 | SQLTableCheckOperator,
|
||||
97 | _convert_to_float_if_possible,
|
||||
98 | parse_boolean,
|
||||
99 | )
|
||||
100 + from airflow.providers.common.sql.operators.sql import SQLColumnCheckOperator
|
||||
101 |
|
||||
102 | BaseSQLOperator()
|
||||
103 | BranchSQLOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.sql._convert_to_float_if_possible` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:106:1
|
||||
@@ -595,18 +568,17 @@ AIR302 [*] `airflow.operators.sql._convert_to_float_if_possible` is moved into `
|
||||
107 | parse_boolean()
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `_convert_to_float_if_possible` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
95 95 | BranchSQLOperator,
|
||||
96 96 | SQLColumnCheckOperator,
|
||||
97 97 | SQLTableCheckOperator,
|
||||
98 |- _convert_to_float_if_possible,
|
||||
99 98 | parse_boolean,
|
||||
100 99 | )
|
||||
100 |+from airflow.providers.common.sql.operators.sql import _convert_to_float_if_possible
|
||||
101 101 |
|
||||
102 102 | BaseSQLOperator()
|
||||
103 103 | BranchSQLOperator()
|
||||
95 | BranchSQLOperator,
|
||||
96 | SQLColumnCheckOperator,
|
||||
97 | SQLTableCheckOperator,
|
||||
- _convert_to_float_if_possible,
|
||||
98 | parse_boolean,
|
||||
99 | )
|
||||
100 + from airflow.providers.common.sql.operators.sql import _convert_to_float_if_possible
|
||||
101 |
|
||||
102 | BaseSQLOperator()
|
||||
103 | BranchSQLOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.parse_boolean` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:107:1
|
||||
@@ -617,17 +589,16 @@ AIR302 [*] `airflow.operators.sql.parse_boolean` is moved into `common-sql` prov
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `parse_boolean` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
96 96 | SQLColumnCheckOperator,
|
||||
97 97 | SQLTableCheckOperator,
|
||||
98 98 | _convert_to_float_if_possible,
|
||||
99 |- parse_boolean,
|
||||
100 99 | )
|
||||
100 |+from airflow.providers.common.sql.operators.sql import parse_boolean
|
||||
101 101 |
|
||||
102 102 | BaseSQLOperator()
|
||||
103 103 | BranchSQLOperator()
|
||||
96 | SQLColumnCheckOperator,
|
||||
97 | SQLTableCheckOperator,
|
||||
98 | _convert_to_float_if_possible,
|
||||
- parse_boolean,
|
||||
99 | )
|
||||
100 + from airflow.providers.common.sql.operators.sql import parse_boolean
|
||||
101 |
|
||||
102 | BaseSQLOperator()
|
||||
103 | BranchSQLOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.sensors.sql.SqlSensor` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:112:1
|
||||
@@ -638,16 +609,15 @@ AIR302 [*] `airflow.sensors.sql.SqlSensor` is moved into `common-sql` provider i
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `SqlSensor` from `airflow.providers.common.sql.sensors.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
107 107 | parse_boolean()
|
||||
108 108 |
|
||||
109 109 |
|
||||
110 |-from airflow.sensors.sql import SqlSensor
|
||||
110 |+from airflow.providers.common.sql.sensors.sql import SqlSensor
|
||||
111 111 |
|
||||
112 112 | SqlSensor()
|
||||
113 113 |
|
||||
107 | parse_boolean()
|
||||
108 |
|
||||
109 |
|
||||
- from airflow.sensors.sql import SqlSensor
|
||||
110 + from airflow.providers.common.sql.sensors.sql import SqlSensor
|
||||
111 |
|
||||
112 | SqlSensor()
|
||||
113 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.sensors.sql_sensor.SqlSensor` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:117:1
|
||||
@@ -658,13 +628,12 @@ AIR302 [*] `airflow.sensors.sql_sensor.SqlSensor` is moved into `common-sql` pro
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `SqlSensor` from `airflow.providers.common.sql.sensors.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
112 112 | SqlSensor()
|
||||
113 113 |
|
||||
114 114 |
|
||||
115 |-from airflow.sensors.sql_sensor import SqlSensor
|
||||
115 |+from airflow.providers.common.sql.sensors.sql import SqlSensor
|
||||
116 116 |
|
||||
117 117 | SqlSensor()
|
||||
118 118 |
|
||||
112 | SqlSensor()
|
||||
113 |
|
||||
114 |
|
||||
- from airflow.sensors.sql_sensor import SqlSensor
|
||||
115 + from airflow.providers.common.sql.sensors.sql import SqlSensor
|
||||
116 |
|
||||
117 | SqlSensor()
|
||||
118 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
@@ -10,11 +10,10 @@ AIR302 [*] `airflow.executors.dask_executor.DaskExecutor` is moved into `daskexe
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-daskexecutor>=1.0.0` and use `DaskExecutor` from `airflow.providers.daskexecutor.executors.dask_executor` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 |-from airflow.executors.dask_executor import DaskExecutor
|
||||
3 |+from airflow.providers.daskexecutor.executors.dask_executor import DaskExecutor
|
||||
4 4 |
|
||||
5 5 | DaskExecutor()
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
- from airflow.executors.dask_executor import DaskExecutor
|
||||
3 + from airflow.providers.daskexecutor.executors.dask_executor import DaskExecutor
|
||||
4 |
|
||||
5 | DaskExecutor()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
@@ -11,22 +11,21 @@ AIR302 [*] `airflow.hooks.druid_hook.DruidDbApiHook` is moved into `apache-druid
|
||||
13 | DruidHook()
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-druid>=1.0.0` and use `DruidDbApiHook` from `airflow.providers.apache.druid.hooks.druid` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 3 | from airflow.hooks.druid_hook import (
|
||||
4 |- DruidDbApiHook,
|
||||
5 4 | DruidHook,
|
||||
6 5 | )
|
||||
7 6 | from airflow.operators.hive_to_druid import (
|
||||
8 7 | HiveToDruidOperator,
|
||||
9 8 | HiveToDruidTransfer,
|
||||
10 9 | )
|
||||
10 |+from airflow.providers.apache.druid.hooks.druid import DruidDbApiHook
|
||||
11 11 |
|
||||
12 12 | DruidDbApiHook()
|
||||
13 13 | DruidHook()
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
3 | from airflow.hooks.druid_hook import (
|
||||
- DruidDbApiHook,
|
||||
4 | DruidHook,
|
||||
5 | )
|
||||
6 | from airflow.operators.hive_to_druid import (
|
||||
7 | HiveToDruidOperator,
|
||||
8 | HiveToDruidTransfer,
|
||||
9 | )
|
||||
10 + from airflow.providers.apache.druid.hooks.druid import DruidDbApiHook
|
||||
11 |
|
||||
12 | DruidDbApiHook()
|
||||
13 | DruidHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.hooks.druid_hook.DruidHook` is moved into `apache-druid` provider in Airflow 3.0;
|
||||
--> AIR302_druid.py:13:1
|
||||
@@ -38,21 +37,20 @@ AIR302 [*] `airflow.hooks.druid_hook.DruidHook` is moved into `apache-druid` pro
|
||||
15 | HiveToDruidOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-druid>=1.0.0` and use `DruidHook` from `airflow.providers.apache.druid.hooks.druid` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
3 3 | from airflow.hooks.druid_hook import (
|
||||
4 4 | DruidDbApiHook,
|
||||
5 |- DruidHook,
|
||||
6 5 | )
|
||||
7 6 | from airflow.operators.hive_to_druid import (
|
||||
8 7 | HiveToDruidOperator,
|
||||
9 8 | HiveToDruidTransfer,
|
||||
10 9 | )
|
||||
10 |+from airflow.providers.apache.druid.hooks.druid import DruidHook
|
||||
11 11 |
|
||||
12 12 | DruidDbApiHook()
|
||||
13 13 | DruidHook()
|
||||
2 |
|
||||
3 | from airflow.hooks.druid_hook import (
|
||||
4 | DruidDbApiHook,
|
||||
- DruidHook,
|
||||
5 | )
|
||||
6 | from airflow.operators.hive_to_druid import (
|
||||
7 | HiveToDruidOperator,
|
||||
8 | HiveToDruidTransfer,
|
||||
9 | )
|
||||
10 + from airflow.providers.apache.druid.hooks.druid import DruidHook
|
||||
11 |
|
||||
12 | DruidDbApiHook()
|
||||
13 | DruidHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.hive_to_druid.HiveToDruidOperator` is moved into `apache-druid` provider in Airflow 3.0;
|
||||
--> AIR302_druid.py:15:1
|
||||
@@ -64,18 +62,17 @@ AIR302 [*] `airflow.operators.hive_to_druid.HiveToDruidOperator` is moved into `
|
||||
16 | HiveToDruidTransfer()
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-druid>=1.0.0` and use `HiveToDruidOperator` from `airflow.providers.apache.druid.transfers.hive_to_druid` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
5 5 | DruidHook,
|
||||
6 6 | )
|
||||
7 7 | from airflow.operators.hive_to_druid import (
|
||||
8 |- HiveToDruidOperator,
|
||||
9 8 | HiveToDruidTransfer,
|
||||
10 9 | )
|
||||
10 |+from airflow.providers.apache.druid.transfers.hive_to_druid import HiveToDruidOperator
|
||||
11 11 |
|
||||
12 12 | DruidDbApiHook()
|
||||
13 13 | DruidHook()
|
||||
5 | DruidHook,
|
||||
6 | )
|
||||
7 | from airflow.operators.hive_to_druid import (
|
||||
- HiveToDruidOperator,
|
||||
8 | HiveToDruidTransfer,
|
||||
9 | )
|
||||
10 + from airflow.providers.apache.druid.transfers.hive_to_druid import HiveToDruidOperator
|
||||
11 |
|
||||
12 | DruidDbApiHook()
|
||||
13 | DruidHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.hive_to_druid.HiveToDruidTransfer` is moved into `apache-druid` provider in Airflow 3.0;
|
||||
--> AIR302_druid.py:16:1
|
||||
@@ -85,15 +82,14 @@ AIR302 [*] `airflow.operators.hive_to_druid.HiveToDruidTransfer` is moved into `
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-druid>=1.0.0` and use `HiveToDruidOperator` from `airflow.providers.apache.druid.transfers.hive_to_druid` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
5 5 | DruidHook,
|
||||
6 6 | )
|
||||
7 7 | from airflow.operators.hive_to_druid import (
|
||||
8 |- HiveToDruidOperator,
|
||||
9 8 | HiveToDruidTransfer,
|
||||
10 9 | )
|
||||
10 |+from airflow.providers.apache.druid.transfers.hive_to_druid import HiveToDruidOperator
|
||||
11 11 |
|
||||
12 12 | DruidDbApiHook()
|
||||
13 13 | DruidHook()
|
||||
5 | DruidHook,
|
||||
6 | )
|
||||
7 | from airflow.operators.hive_to_druid import (
|
||||
- HiveToDruidOperator,
|
||||
8 | HiveToDruidTransfer,
|
||||
9 | )
|
||||
10 + from airflow.providers.apache.druid.transfers.hive_to_druid import HiveToDruidOperator
|
||||
11 |
|
||||
12 | DruidDbApiHook()
|
||||
13 | DruidHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
@@ -12,20 +12,19 @@ AIR302 [*] `airflow.api.auth.backend.basic_auth.CLIENT_AUTH` is moved into `fab`
|
||||
12 | auth_current_user()
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `CLIENT_AUTH` from `airflow.providers.fab.auth_manager.api.auth.backend.basic_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 3 | from airflow.api.auth.backend.basic_auth import (
|
||||
4 |- CLIENT_AUTH,
|
||||
5 4 | auth_current_user,
|
||||
6 5 | init_app,
|
||||
7 6 | requires_authentication,
|
||||
8 7 | )
|
||||
8 |+from airflow.providers.fab.auth_manager.api.auth.backend.basic_auth import CLIENT_AUTH
|
||||
9 9 |
|
||||
10 10 | CLIENT_AUTH
|
||||
11 11 | init_app()
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
3 | from airflow.api.auth.backend.basic_auth import (
|
||||
- CLIENT_AUTH,
|
||||
4 | auth_current_user,
|
||||
5 | init_app,
|
||||
6 | requires_authentication,
|
||||
7 | )
|
||||
8 + from airflow.providers.fab.auth_manager.api.auth.backend.basic_auth import CLIENT_AUTH
|
||||
9 |
|
||||
10 | CLIENT_AUTH
|
||||
11 | init_app()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.basic_auth.init_app` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:11:1
|
||||
@@ -37,18 +36,17 @@ AIR302 [*] `airflow.api.auth.backend.basic_auth.init_app` is moved into `fab` pr
|
||||
13 | requires_authentication()
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `init_app` from `airflow.providers.fab.auth_manager.api.auth.backend.basic_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
3 3 | from airflow.api.auth.backend.basic_auth import (
|
||||
4 4 | CLIENT_AUTH,
|
||||
5 5 | auth_current_user,
|
||||
6 |- init_app,
|
||||
7 6 | requires_authentication,
|
||||
8 7 | )
|
||||
8 |+from airflow.providers.fab.auth_manager.api.auth.backend.basic_auth import init_app
|
||||
9 9 |
|
||||
10 10 | CLIENT_AUTH
|
||||
11 11 | init_app()
|
||||
3 | from airflow.api.auth.backend.basic_auth import (
|
||||
4 | CLIENT_AUTH,
|
||||
5 | auth_current_user,
|
||||
- init_app,
|
||||
6 | requires_authentication,
|
||||
7 | )
|
||||
8 + from airflow.providers.fab.auth_manager.api.auth.backend.basic_auth import init_app
|
||||
9 |
|
||||
10 | CLIENT_AUTH
|
||||
11 | init_app()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.basic_auth.auth_current_user` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:12:1
|
||||
@@ -60,19 +58,18 @@ AIR302 [*] `airflow.api.auth.backend.basic_auth.auth_current_user` is moved into
|
||||
13 | requires_authentication()
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `auth_current_user` from `airflow.providers.fab.auth_manager.api.auth.backend.basic_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
3 3 | from airflow.api.auth.backend.basic_auth import (
|
||||
4 4 | CLIENT_AUTH,
|
||||
5 |- auth_current_user,
|
||||
6 5 | init_app,
|
||||
7 6 | requires_authentication,
|
||||
8 7 | )
|
||||
8 |+from airflow.providers.fab.auth_manager.api.auth.backend.basic_auth import auth_current_user
|
||||
9 9 |
|
||||
10 10 | CLIENT_AUTH
|
||||
11 11 | init_app()
|
||||
2 |
|
||||
3 | from airflow.api.auth.backend.basic_auth import (
|
||||
4 | CLIENT_AUTH,
|
||||
- auth_current_user,
|
||||
5 | init_app,
|
||||
6 | requires_authentication,
|
||||
7 | )
|
||||
8 + from airflow.providers.fab.auth_manager.api.auth.backend.basic_auth import auth_current_user
|
||||
9 |
|
||||
10 | CLIENT_AUTH
|
||||
11 | init_app()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.basic_auth.requires_authentication` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:13:1
|
||||
@@ -85,17 +82,16 @@ AIR302 [*] `airflow.api.auth.backend.basic_auth.requires_authentication` is move
|
||||
15 | from airflow.api.auth.backend.kerberos_auth import (
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `requires_authentication` from `airflow.providers.fab.auth_manager.api.auth.backend.basic_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
4 4 | CLIENT_AUTH,
|
||||
5 5 | auth_current_user,
|
||||
6 6 | init_app,
|
||||
7 |- requires_authentication,
|
||||
8 7 | )
|
||||
8 |+from airflow.providers.fab.auth_manager.api.auth.backend.basic_auth import requires_authentication
|
||||
9 9 |
|
||||
10 10 | CLIENT_AUTH
|
||||
11 11 | init_app()
|
||||
4 | CLIENT_AUTH,
|
||||
5 | auth_current_user,
|
||||
6 | init_app,
|
||||
- requires_authentication,
|
||||
7 | )
|
||||
8 + from airflow.providers.fab.auth_manager.api.auth.backend.basic_auth import requires_authentication
|
||||
9 |
|
||||
10 | CLIENT_AUTH
|
||||
11 | init_app()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.kerberos_auth.log` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:23:1
|
||||
@@ -108,18 +104,17 @@ AIR302 [*] `airflow.api.auth.backend.kerberos_auth.log` is moved into `fab` prov
|
||||
25 | find_user()
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `log` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
16 16 | CLIENT_AUTH,
|
||||
17 17 | find_user,
|
||||
18 18 | init_app,
|
||||
19 |- log,
|
||||
20 19 | requires_authentication,
|
||||
21 20 | )
|
||||
21 |+from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import log
|
||||
22 22 |
|
||||
23 23 | log()
|
||||
24 24 | CLIENT_AUTH
|
||||
16 | CLIENT_AUTH,
|
||||
17 | find_user,
|
||||
18 | init_app,
|
||||
- log,
|
||||
19 | requires_authentication,
|
||||
20 | )
|
||||
21 + from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import log
|
||||
22 |
|
||||
23 | log()
|
||||
24 | CLIENT_AUTH
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.kerberos_auth.CLIENT_AUTH` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:24:1
|
||||
@@ -131,21 +126,20 @@ AIR302 [*] `airflow.api.auth.backend.kerberos_auth.CLIENT_AUTH` is moved into `f
|
||||
26 | init_app()
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `CLIENT_AUTH` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
13 13 | requires_authentication()
|
||||
14 14 |
|
||||
15 15 | from airflow.api.auth.backend.kerberos_auth import (
|
||||
16 |- CLIENT_AUTH,
|
||||
17 16 | find_user,
|
||||
18 17 | init_app,
|
||||
19 18 | log,
|
||||
20 19 | requires_authentication,
|
||||
21 20 | )
|
||||
21 |+from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import CLIENT_AUTH
|
||||
22 22 |
|
||||
23 23 | log()
|
||||
24 24 | CLIENT_AUTH
|
||||
13 | requires_authentication()
|
||||
14 |
|
||||
15 | from airflow.api.auth.backend.kerberos_auth import (
|
||||
- CLIENT_AUTH,
|
||||
16 | find_user,
|
||||
17 | init_app,
|
||||
18 | log,
|
||||
19 | requires_authentication,
|
||||
20 | )
|
||||
21 + from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import CLIENT_AUTH
|
||||
22 |
|
||||
23 | log()
|
||||
24 | CLIENT_AUTH
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.kerberos_auth.find_user` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:25:1
|
||||
@@ -158,20 +152,19 @@ AIR302 [*] `airflow.api.auth.backend.kerberos_auth.find_user` is moved into `fab
|
||||
27 | requires_authentication()
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `find_user` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
14 14 |
|
||||
15 15 | from airflow.api.auth.backend.kerberos_auth import (
|
||||
16 16 | CLIENT_AUTH,
|
||||
17 |- find_user,
|
||||
18 17 | init_app,
|
||||
19 18 | log,
|
||||
20 19 | requires_authentication,
|
||||
21 20 | )
|
||||
21 |+from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import find_user
|
||||
22 22 |
|
||||
23 23 | log()
|
||||
24 24 | CLIENT_AUTH
|
||||
14 |
|
||||
15 | from airflow.api.auth.backend.kerberos_auth import (
|
||||
16 | CLIENT_AUTH,
|
||||
- find_user,
|
||||
17 | init_app,
|
||||
18 | log,
|
||||
19 | requires_authentication,
|
||||
20 | )
|
||||
21 + from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import find_user
|
||||
22 |
|
||||
23 | log()
|
||||
24 | CLIENT_AUTH
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.kerberos_auth.init_app` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:26:1
|
||||
@@ -183,19 +176,18 @@ AIR302 [*] `airflow.api.auth.backend.kerberos_auth.init_app` is moved into `fab`
|
||||
27 | requires_authentication()
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `init_app` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
15 15 | from airflow.api.auth.backend.kerberos_auth import (
|
||||
16 16 | CLIENT_AUTH,
|
||||
17 17 | find_user,
|
||||
18 |- init_app,
|
||||
19 18 | log,
|
||||
20 19 | requires_authentication,
|
||||
21 20 | )
|
||||
21 |+from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import init_app
|
||||
22 22 |
|
||||
23 23 | log()
|
||||
24 24 | CLIENT_AUTH
|
||||
15 | from airflow.api.auth.backend.kerberos_auth import (
|
||||
16 | CLIENT_AUTH,
|
||||
17 | find_user,
|
||||
- init_app,
|
||||
18 | log,
|
||||
19 | requires_authentication,
|
||||
20 | )
|
||||
21 + from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import init_app
|
||||
22 |
|
||||
23 | log()
|
||||
24 | CLIENT_AUTH
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.kerberos_auth.requires_authentication` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:27:1
|
||||
@@ -208,17 +200,16 @@ AIR302 [*] `airflow.api.auth.backend.kerberos_auth.requires_authentication` is m
|
||||
29 | from airflow.auth.managers.fab.api.auth.backend.kerberos_auth import (
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `requires_authentication` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
17 17 | find_user,
|
||||
18 18 | init_app,
|
||||
19 19 | log,
|
||||
20 |- requires_authentication,
|
||||
21 20 | )
|
||||
21 |+from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import requires_authentication
|
||||
22 22 |
|
||||
23 23 | log()
|
||||
24 24 | CLIENT_AUTH
|
||||
17 | find_user,
|
||||
18 | init_app,
|
||||
19 | log,
|
||||
- requires_authentication,
|
||||
20 | )
|
||||
21 + from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import requires_authentication
|
||||
22 |
|
||||
23 | log()
|
||||
24 | CLIENT_AUTH
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.log` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:37:1
|
||||
@@ -231,18 +222,17 @@ AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.log` is mov
|
||||
39 | find_user()
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `log` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
30 30 | CLIENT_AUTH,
|
||||
31 31 | find_user,
|
||||
32 32 | init_app,
|
||||
33 |- log,
|
||||
34 33 | requires_authentication,
|
||||
35 34 | )
|
||||
35 |+from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import log
|
||||
36 36 |
|
||||
37 37 | log()
|
||||
38 38 | CLIENT_AUTH
|
||||
30 | CLIENT_AUTH,
|
||||
31 | find_user,
|
||||
32 | init_app,
|
||||
- log,
|
||||
33 | requires_authentication,
|
||||
34 | )
|
||||
35 + from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import log
|
||||
36 |
|
||||
37 | log()
|
||||
38 | CLIENT_AUTH
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.CLIENT_AUTH` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:38:1
|
||||
@@ -254,21 +244,20 @@ AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.CLIENT_AUTH
|
||||
40 | init_app()
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `CLIENT_AUTH` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
27 27 | requires_authentication()
|
||||
28 28 |
|
||||
29 29 | from airflow.auth.managers.fab.api.auth.backend.kerberos_auth import (
|
||||
30 |- CLIENT_AUTH,
|
||||
31 30 | find_user,
|
||||
32 31 | init_app,
|
||||
33 32 | log,
|
||||
34 33 | requires_authentication,
|
||||
35 34 | )
|
||||
35 |+from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import CLIENT_AUTH
|
||||
36 36 |
|
||||
37 37 | log()
|
||||
38 38 | CLIENT_AUTH
|
||||
27 | requires_authentication()
|
||||
28 |
|
||||
29 | from airflow.auth.managers.fab.api.auth.backend.kerberos_auth import (
|
||||
- CLIENT_AUTH,
|
||||
30 | find_user,
|
||||
31 | init_app,
|
||||
32 | log,
|
||||
33 | requires_authentication,
|
||||
34 | )
|
||||
35 + from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import CLIENT_AUTH
|
||||
36 |
|
||||
37 | log()
|
||||
38 | CLIENT_AUTH
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.find_user` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:39:1
|
||||
@@ -281,20 +270,19 @@ AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.find_user`
|
||||
41 | requires_authentication()
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `find_user` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
28 28 |
|
||||
29 29 | from airflow.auth.managers.fab.api.auth.backend.kerberos_auth import (
|
||||
30 30 | CLIENT_AUTH,
|
||||
31 |- find_user,
|
||||
32 31 | init_app,
|
||||
33 32 | log,
|
||||
34 33 | requires_authentication,
|
||||
35 34 | )
|
||||
35 |+from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import find_user
|
||||
36 36 |
|
||||
37 37 | log()
|
||||
38 38 | CLIENT_AUTH
|
||||
28 |
|
||||
29 | from airflow.auth.managers.fab.api.auth.backend.kerberos_auth import (
|
||||
30 | CLIENT_AUTH,
|
||||
- find_user,
|
||||
31 | init_app,
|
||||
32 | log,
|
||||
33 | requires_authentication,
|
||||
34 | )
|
||||
35 + from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import find_user
|
||||
36 |
|
||||
37 | log()
|
||||
38 | CLIENT_AUTH
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.init_app` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:40:1
|
||||
@@ -306,19 +294,18 @@ AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.init_app` i
|
||||
41 | requires_authentication()
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `init_app` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
29 29 | from airflow.auth.managers.fab.api.auth.backend.kerberos_auth import (
|
||||
30 30 | CLIENT_AUTH,
|
||||
31 31 | find_user,
|
||||
32 |- init_app,
|
||||
33 32 | log,
|
||||
34 33 | requires_authentication,
|
||||
35 34 | )
|
||||
35 |+from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import init_app
|
||||
36 36 |
|
||||
37 37 | log()
|
||||
38 38 | CLIENT_AUTH
|
||||
29 | from airflow.auth.managers.fab.api.auth.backend.kerberos_auth import (
|
||||
30 | CLIENT_AUTH,
|
||||
31 | find_user,
|
||||
- init_app,
|
||||
32 | log,
|
||||
33 | requires_authentication,
|
||||
34 | )
|
||||
35 + from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import init_app
|
||||
36 |
|
||||
37 | log()
|
||||
38 | CLIENT_AUTH
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.requires_authentication` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:41:1
|
||||
@@ -331,17 +318,16 @@ AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.requires_au
|
||||
43 | from airflow.auth.managers.fab.fab_auth_manager import FabAuthManager
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `requires_authentication` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
31 31 | find_user,
|
||||
32 32 | init_app,
|
||||
33 33 | log,
|
||||
34 |- requires_authentication,
|
||||
35 34 | )
|
||||
35 |+from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import requires_authentication
|
||||
36 36 |
|
||||
37 37 | log()
|
||||
38 38 | CLIENT_AUTH
|
||||
31 | find_user,
|
||||
32 | init_app,
|
||||
33 | log,
|
||||
- requires_authentication,
|
||||
34 | )
|
||||
35 + from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import requires_authentication
|
||||
36 |
|
||||
37 | log()
|
||||
38 | CLIENT_AUTH
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.auth.managers.fab.fab_auth_manager.FabAuthManager` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:49:1
|
||||
@@ -354,20 +340,19 @@ AIR302 [*] `airflow.auth.managers.fab.fab_auth_manager.FabAuthManager` is moved
|
||||
51 | FabAirflowSecurityManagerOverride()
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `FabAuthManager` from `airflow.providers.fab.auth_manager.fab_auth_manager` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
40 40 | init_app()
|
||||
41 41 | requires_authentication()
|
||||
42 42 |
|
||||
43 |-from airflow.auth.managers.fab.fab_auth_manager import FabAuthManager
|
||||
44 43 | from airflow.auth.managers.fab.security_manager.override import (
|
||||
45 44 | MAX_NUM_DATABASE_USER_SESSIONS,
|
||||
46 45 | FabAirflowSecurityManagerOverride,
|
||||
47 46 | )
|
||||
47 |+from airflow.providers.fab.auth_manager.fab_auth_manager import FabAuthManager
|
||||
48 48 |
|
||||
49 49 | FabAuthManager()
|
||||
50 50 | MAX_NUM_DATABASE_USER_SESSIONS
|
||||
40 | init_app()
|
||||
41 | requires_authentication()
|
||||
42 |
|
||||
- from airflow.auth.managers.fab.fab_auth_manager import FabAuthManager
|
||||
43 | from airflow.auth.managers.fab.security_manager.override import (
|
||||
44 | MAX_NUM_DATABASE_USER_SESSIONS,
|
||||
45 | FabAirflowSecurityManagerOverride,
|
||||
46 | )
|
||||
47 + from airflow.providers.fab.auth_manager.fab_auth_manager import FabAuthManager
|
||||
48 |
|
||||
49 | FabAuthManager()
|
||||
50 | MAX_NUM_DATABASE_USER_SESSIONS
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.auth.managers.fab.security_manager.override.MAX_NUM_DATABASE_USER_SESSIONS` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:50:1
|
||||
@@ -378,18 +363,17 @@ AIR302 [*] `airflow.auth.managers.fab.security_manager.override.MAX_NUM_DATABASE
|
||||
51 | FabAirflowSecurityManagerOverride()
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `MAX_NUM_DATABASE_USER_SESSIONS` from `airflow.providers.fab.auth_manager.security_manager.override` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
42 42 |
|
||||
43 43 | from airflow.auth.managers.fab.fab_auth_manager import FabAuthManager
|
||||
44 44 | from airflow.auth.managers.fab.security_manager.override import (
|
||||
45 |- MAX_NUM_DATABASE_USER_SESSIONS,
|
||||
46 45 | FabAirflowSecurityManagerOverride,
|
||||
47 46 | )
|
||||
47 |+from airflow.providers.fab.auth_manager.security_manager.override import MAX_NUM_DATABASE_USER_SESSIONS
|
||||
48 48 |
|
||||
49 49 | FabAuthManager()
|
||||
50 50 | MAX_NUM_DATABASE_USER_SESSIONS
|
||||
42 |
|
||||
43 | from airflow.auth.managers.fab.fab_auth_manager import FabAuthManager
|
||||
44 | from airflow.auth.managers.fab.security_manager.override import (
|
||||
- MAX_NUM_DATABASE_USER_SESSIONS,
|
||||
45 | FabAirflowSecurityManagerOverride,
|
||||
46 | )
|
||||
47 + from airflow.providers.fab.auth_manager.security_manager.override import MAX_NUM_DATABASE_USER_SESSIONS
|
||||
48 |
|
||||
49 | FabAuthManager()
|
||||
50 | MAX_NUM_DATABASE_USER_SESSIONS
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.auth.managers.fab.security_manager.override.FabAirflowSecurityManagerOverride` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:51:1
|
||||
@@ -402,17 +386,16 @@ AIR302 [*] `airflow.auth.managers.fab.security_manager.override.FabAirflowSecuri
|
||||
53 | from airflow.www.security import FabAirflowSecurityManagerOverride
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `FabAirflowSecurityManagerOverride` from `airflow.providers.fab.auth_manager.security_manager.override` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
43 43 | from airflow.auth.managers.fab.fab_auth_manager import FabAuthManager
|
||||
44 44 | from airflow.auth.managers.fab.security_manager.override import (
|
||||
45 45 | MAX_NUM_DATABASE_USER_SESSIONS,
|
||||
46 |- FabAirflowSecurityManagerOverride,
|
||||
47 46 | )
|
||||
47 |+from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride
|
||||
48 48 |
|
||||
49 49 | FabAuthManager()
|
||||
50 50 | MAX_NUM_DATABASE_USER_SESSIONS
|
||||
43 | from airflow.auth.managers.fab.fab_auth_manager import FabAuthManager
|
||||
44 | from airflow.auth.managers.fab.security_manager.override import (
|
||||
45 | MAX_NUM_DATABASE_USER_SESSIONS,
|
||||
- FabAirflowSecurityManagerOverride,
|
||||
46 | )
|
||||
47 + from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride
|
||||
48 |
|
||||
49 | FabAuthManager()
|
||||
50 | MAX_NUM_DATABASE_USER_SESSIONS
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.www.security.FabAirflowSecurityManagerOverride` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:55:1
|
||||
@@ -423,12 +406,11 @@ AIR302 [*] `airflow.www.security.FabAirflowSecurityManagerOverride` is moved int
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `FabAirflowSecurityManagerOverride` from `airflow.providers.fab.auth_manager.security_manager.override` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
50 50 | MAX_NUM_DATABASE_USER_SESSIONS
|
||||
51 51 | FabAirflowSecurityManagerOverride()
|
||||
52 52 |
|
||||
53 |-from airflow.www.security import FabAirflowSecurityManagerOverride
|
||||
53 |+from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride
|
||||
54 54 |
|
||||
55 55 | FabAirflowSecurityManagerOverride()
|
||||
50 | MAX_NUM_DATABASE_USER_SESSIONS
|
||||
51 | FabAirflowSecurityManagerOverride()
|
||||
52 |
|
||||
- from airflow.www.security import FabAirflowSecurityManagerOverride
|
||||
53 + from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride
|
||||
54 |
|
||||
55 | FabAirflowSecurityManagerOverride()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
@@ -11,16 +11,15 @@ AIR302 [*] `airflow.hooks.webhdfs_hook.WebHDFSHook` is moved into `apache-hdfs`
|
||||
7 | WebHdfsSensor()
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hdfs>=1.0.0` and use `WebHDFSHook` from `airflow.providers.apache.hdfs.hooks.webhdfs` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 |-from airflow.hooks.webhdfs_hook import WebHDFSHook
|
||||
4 3 | from airflow.sensors.web_hdfs_sensor import WebHdfsSensor
|
||||
4 |+from airflow.providers.apache.hdfs.hooks.webhdfs import WebHDFSHook
|
||||
5 5 |
|
||||
6 6 | WebHDFSHook()
|
||||
7 7 | WebHdfsSensor()
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
- from airflow.hooks.webhdfs_hook import WebHDFSHook
|
||||
3 | from airflow.sensors.web_hdfs_sensor import WebHdfsSensor
|
||||
4 + from airflow.providers.apache.hdfs.hooks.webhdfs import WebHDFSHook
|
||||
5 |
|
||||
6 | WebHDFSHook()
|
||||
7 | WebHdfsSensor()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.sensors.web_hdfs_sensor.WebHdfsSensor` is moved into `apache-hdfs` provider in Airflow 3.0;
|
||||
--> AIR302_hdfs.py:7:1
|
||||
@@ -30,13 +29,12 @@ AIR302 [*] `airflow.sensors.web_hdfs_sensor.WebHdfsSensor` is moved into `apache
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hdfs>=1.0.0` and use `WebHdfsSensor` from `airflow.providers.apache.hdfs.sensors.web_hdfs` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 3 | from airflow.hooks.webhdfs_hook import WebHDFSHook
|
||||
4 |-from airflow.sensors.web_hdfs_sensor import WebHdfsSensor
|
||||
4 |+from airflow.providers.apache.hdfs.sensors.web_hdfs import WebHdfsSensor
|
||||
5 5 |
|
||||
6 6 | WebHDFSHook()
|
||||
7 7 | WebHdfsSensor()
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
3 | from airflow.hooks.webhdfs_hook import WebHDFSHook
|
||||
- from airflow.sensors.web_hdfs_sensor import WebHdfsSensor
|
||||
4 + from airflow.providers.apache.hdfs.sensors.web_hdfs import WebHdfsSensor
|
||||
5 |
|
||||
6 | WebHDFSHook()
|
||||
7 | WebHdfsSensor()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
@@ -12,23 +12,22 @@ AIR302 [*] `airflow.hooks.hive_hooks.HIVE_QUEUE_PRIORITIES` is moved into `apach
|
||||
20 | HiveMetastoreHook()
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HIVE_QUEUE_PRIORITIES` from `airflow.providers.apache.hive.hooks.hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 3 | from airflow.hooks.hive_hooks import (
|
||||
4 |- HIVE_QUEUE_PRIORITIES,
|
||||
5 4 | HiveCliHook,
|
||||
6 5 | HiveMetastoreHook,
|
||||
7 6 | HiveServer2Hook,
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
3 | from airflow.hooks.hive_hooks import (
|
||||
- HIVE_QUEUE_PRIORITIES,
|
||||
4 | HiveCliHook,
|
||||
5 | HiveMetastoreHook,
|
||||
6 | HiveServer2Hook,
|
||||
--------------------------------------------------------------------------------
|
||||
14 13 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
15 14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
16 15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 |+from airflow.providers.apache.hive.hooks.hive import HIVE_QUEUE_PRIORITIES
|
||||
17 17 |
|
||||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
13 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 + from airflow.providers.apache.hive.hooks.hive import HIVE_QUEUE_PRIORITIES
|
||||
17 |
|
||||
18 | HIVE_QUEUE_PRIORITIES
|
||||
19 | HiveCliHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.hooks.hive_hooks.HiveCliHook` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:19:1
|
||||
@@ -40,23 +39,22 @@ AIR302 [*] `airflow.hooks.hive_hooks.HiveCliHook` is moved into `apache-hive` pr
|
||||
21 | HiveServer2Hook()
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveCliHook` from `airflow.providers.apache.hive.hooks.hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
3 3 | from airflow.hooks.hive_hooks import (
|
||||
4 4 | HIVE_QUEUE_PRIORITIES,
|
||||
5 |- HiveCliHook,
|
||||
6 5 | HiveMetastoreHook,
|
||||
7 6 | HiveServer2Hook,
|
||||
8 7 | )
|
||||
2 |
|
||||
3 | from airflow.hooks.hive_hooks import (
|
||||
4 | HIVE_QUEUE_PRIORITIES,
|
||||
- HiveCliHook,
|
||||
5 | HiveMetastoreHook,
|
||||
6 | HiveServer2Hook,
|
||||
7 | )
|
||||
--------------------------------------------------------------------------------
|
||||
14 13 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
15 14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
16 15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 |+from airflow.providers.apache.hive.hooks.hive import HiveCliHook
|
||||
17 17 |
|
||||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
13 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 + from airflow.providers.apache.hive.hooks.hive import HiveCliHook
|
||||
17 |
|
||||
18 | HIVE_QUEUE_PRIORITIES
|
||||
19 | HiveCliHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.hooks.hive_hooks.HiveMetastoreHook` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:20:1
|
||||
@@ -68,23 +66,22 @@ AIR302 [*] `airflow.hooks.hive_hooks.HiveMetastoreHook` is moved into `apache-hi
|
||||
21 | HiveServer2Hook()
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveMetastoreHook` from `airflow.providers.apache.hive.hooks.hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
3 3 | from airflow.hooks.hive_hooks import (
|
||||
4 4 | HIVE_QUEUE_PRIORITIES,
|
||||
5 5 | HiveCliHook,
|
||||
6 |- HiveMetastoreHook,
|
||||
7 6 | HiveServer2Hook,
|
||||
8 7 | )
|
||||
9 8 | from airflow.macros.hive import (
|
||||
3 | from airflow.hooks.hive_hooks import (
|
||||
4 | HIVE_QUEUE_PRIORITIES,
|
||||
5 | HiveCliHook,
|
||||
- HiveMetastoreHook,
|
||||
6 | HiveServer2Hook,
|
||||
7 | )
|
||||
8 | from airflow.macros.hive import (
|
||||
--------------------------------------------------------------------------------
|
||||
14 13 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
15 14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
16 15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 |+from airflow.providers.apache.hive.hooks.hive import HiveMetastoreHook
|
||||
17 17 |
|
||||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
13 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 + from airflow.providers.apache.hive.hooks.hive import HiveMetastoreHook
|
||||
17 |
|
||||
18 | HIVE_QUEUE_PRIORITIES
|
||||
19 | HiveCliHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.hooks.hive_hooks.HiveServer2Hook` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:21:1
|
||||
@@ -97,23 +94,22 @@ AIR302 [*] `airflow.hooks.hive_hooks.HiveServer2Hook` is moved into `apache-hive
|
||||
23 | closest_ds_partition()
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveServer2Hook` from `airflow.providers.apache.hive.hooks.hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
4 4 | HIVE_QUEUE_PRIORITIES,
|
||||
5 5 | HiveCliHook,
|
||||
6 6 | HiveMetastoreHook,
|
||||
7 |- HiveServer2Hook,
|
||||
8 7 | )
|
||||
9 8 | from airflow.macros.hive import (
|
||||
10 9 | closest_ds_partition,
|
||||
4 | HIVE_QUEUE_PRIORITIES,
|
||||
5 | HiveCliHook,
|
||||
6 | HiveMetastoreHook,
|
||||
- HiveServer2Hook,
|
||||
7 | )
|
||||
8 | from airflow.macros.hive import (
|
||||
9 | closest_ds_partition,
|
||||
--------------------------------------------------------------------------------
|
||||
14 13 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
15 14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
16 15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 |+from airflow.providers.apache.hive.hooks.hive import HiveServer2Hook
|
||||
17 17 |
|
||||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
13 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 + from airflow.providers.apache.hive.hooks.hive import HiveServer2Hook
|
||||
17 |
|
||||
18 | HIVE_QUEUE_PRIORITIES
|
||||
19 | HiveCliHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.macros.hive.closest_ds_partition` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:23:1
|
||||
@@ -125,22 +121,21 @@ AIR302 [*] `airflow.macros.hive.closest_ds_partition` is moved into `apache-hive
|
||||
24 | max_partition()
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=5.1.0` and use `closest_ds_partition` from `airflow.providers.apache.hive.macros.hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
7 7 | HiveServer2Hook,
|
||||
8 8 | )
|
||||
9 9 | from airflow.macros.hive import (
|
||||
10 |- closest_ds_partition,
|
||||
11 10 | max_partition,
|
||||
12 11 | )
|
||||
13 12 | from airflow.operators.hive_operator import HiveOperator
|
||||
14 13 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
15 14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
16 15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 |+from airflow.providers.apache.hive.macros.hive import closest_ds_partition
|
||||
17 17 |
|
||||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
7 | HiveServer2Hook,
|
||||
8 | )
|
||||
9 | from airflow.macros.hive import (
|
||||
- closest_ds_partition,
|
||||
10 | max_partition,
|
||||
11 | )
|
||||
12 | from airflow.operators.hive_operator import HiveOperator
|
||||
13 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 + from airflow.providers.apache.hive.macros.hive import closest_ds_partition
|
||||
17 |
|
||||
18 | HIVE_QUEUE_PRIORITIES
|
||||
19 | HiveCliHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.macros.hive.max_partition` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:24:1
|
||||
@@ -152,21 +147,20 @@ AIR302 [*] `airflow.macros.hive.max_partition` is moved into `apache-hive` provi
|
||||
26 | HiveOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=5.1.0` and use `max_partition` from `airflow.providers.apache.hive.macros.hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
8 8 | )
|
||||
9 9 | from airflow.macros.hive import (
|
||||
10 10 | closest_ds_partition,
|
||||
11 |- max_partition,
|
||||
12 11 | )
|
||||
13 12 | from airflow.operators.hive_operator import HiveOperator
|
||||
14 13 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
15 14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
16 15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 |+from airflow.providers.apache.hive.macros.hive import max_partition
|
||||
17 17 |
|
||||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
8 | )
|
||||
9 | from airflow.macros.hive import (
|
||||
10 | closest_ds_partition,
|
||||
- max_partition,
|
||||
11 | )
|
||||
12 | from airflow.operators.hive_operator import HiveOperator
|
||||
13 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 + from airflow.providers.apache.hive.macros.hive import max_partition
|
||||
17 |
|
||||
18 | HIVE_QUEUE_PRIORITIES
|
||||
19 | HiveCliHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.hive_operator.HiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:26:1
|
||||
@@ -179,19 +173,18 @@ AIR302 [*] `airflow.operators.hive_operator.HiveOperator` is moved into `apache-
|
||||
28 | HiveToMySqlOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveOperator` from `airflow.providers.apache.hive.operators.hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
10 10 | closest_ds_partition,
|
||||
11 11 | max_partition,
|
||||
12 12 | )
|
||||
13 |-from airflow.operators.hive_operator import HiveOperator
|
||||
14 13 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
15 14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
16 15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 |+from airflow.providers.apache.hive.operators.hive import HiveOperator
|
||||
17 17 |
|
||||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
10 | closest_ds_partition,
|
||||
11 | max_partition,
|
||||
12 | )
|
||||
- from airflow.operators.hive_operator import HiveOperator
|
||||
13 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 + from airflow.providers.apache.hive.operators.hive import HiveOperator
|
||||
17 |
|
||||
18 | HIVE_QUEUE_PRIORITIES
|
||||
19 | HiveCliHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.hive_stats_operator.HiveStatsCollectionOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:27:1
|
||||
@@ -203,18 +196,17 @@ AIR302 [*] `airflow.operators.hive_stats_operator.HiveStatsCollectionOperator` i
|
||||
29 | HiveToSambaOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveStatsCollectionOperator` from `airflow.providers.apache.hive.operators.hive_stats` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
11 11 | max_partition,
|
||||
12 12 | )
|
||||
13 13 | from airflow.operators.hive_operator import HiveOperator
|
||||
14 |-from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
15 14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
16 15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 |+from airflow.providers.apache.hive.operators.hive_stats import HiveStatsCollectionOperator
|
||||
17 17 |
|
||||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
11 | max_partition,
|
||||
12 | )
|
||||
13 | from airflow.operators.hive_operator import HiveOperator
|
||||
- from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
14 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 + from airflow.providers.apache.hive.operators.hive_stats import HiveStatsCollectionOperator
|
||||
17 |
|
||||
18 | HIVE_QUEUE_PRIORITIES
|
||||
19 | HiveCliHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.hive_to_mysql.HiveToMySqlOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:28:1
|
||||
@@ -226,17 +218,16 @@ AIR302 [*] `airflow.operators.hive_to_mysql.HiveToMySqlOperator` is moved into `
|
||||
29 | HiveToSambaOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveToMySqlOperator` from `airflow.providers.apache.hive.transfers.hive_to_mysql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | )
|
||||
13 13 | from airflow.operators.hive_operator import HiveOperator
|
||||
14 14 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
15 |-from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
16 15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 |+from airflow.providers.apache.hive.transfers.hive_to_mysql import HiveToMySqlOperator
|
||||
17 17 |
|
||||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
12 | )
|
||||
13 | from airflow.operators.hive_operator import HiveOperator
|
||||
14 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
- from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
15 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 + from airflow.providers.apache.hive.transfers.hive_to_mysql import HiveToMySqlOperator
|
||||
17 |
|
||||
18 | HIVE_QUEUE_PRIORITIES
|
||||
19 | HiveCliHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.hive_to_samba_operator.HiveToSambaOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:29:1
|
||||
@@ -247,16 +238,15 @@ AIR302 [*] `airflow.operators.hive_to_samba_operator.HiveToSambaOperator` is mov
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveToSambaOperator` from `airflow.providers.apache.hive.transfers.hive_to_samba` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
13 13 | from airflow.operators.hive_operator import HiveOperator
|
||||
14 14 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
15 15 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
16 |-from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 |+from airflow.providers.apache.hive.transfers.hive_to_samba import HiveToSambaOperator
|
||||
17 17 |
|
||||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
13 | from airflow.operators.hive_operator import HiveOperator
|
||||
14 | from airflow.operators.hive_stats_operator import HiveStatsCollectionOperator
|
||||
15 | from airflow.operators.hive_to_mysql import HiveToMySqlOperator
|
||||
- from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
16 + from airflow.providers.apache.hive.transfers.hive_to_samba import HiveToSambaOperator
|
||||
17 |
|
||||
18 | HIVE_QUEUE_PRIORITIES
|
||||
19 | HiveCliHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.hive_to_mysql.HiveToMySqlTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:34:1
|
||||
@@ -269,15 +259,14 @@ AIR302 [*] `airflow.operators.hive_to_mysql.HiveToMySqlTransfer` is moved into `
|
||||
36 | from airflow.operators.mysql_to_hive import MySqlToHiveOperator
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveToMySqlOperator` from `airflow.providers.apache.hive.transfers.hive_to_mysql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
30 30 |
|
||||
31 31 |
|
||||
32 32 | from airflow.operators.hive_to_mysql import HiveToMySqlTransfer
|
||||
33 |+from airflow.providers.apache.hive.transfers.hive_to_mysql import HiveToMySqlOperator
|
||||
33 34 |
|
||||
34 35 | HiveToMySqlTransfer()
|
||||
35 36 |
|
||||
30 |
|
||||
31 |
|
||||
32 | from airflow.operators.hive_to_mysql import HiveToMySqlTransfer
|
||||
33 + from airflow.providers.apache.hive.transfers.hive_to_mysql import HiveToMySqlOperator
|
||||
34 |
|
||||
35 | HiveToMySqlTransfer()
|
||||
36 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.mysql_to_hive.MySqlToHiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:38:1
|
||||
@@ -290,16 +279,15 @@ AIR302 [*] `airflow.operators.mysql_to_hive.MySqlToHiveOperator` is moved into `
|
||||
40 | from airflow.operators.mysql_to_hive import MySqlToHiveTransfer
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `MySqlToHiveOperator` from `airflow.providers.apache.hive.transfers.mysql_to_hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
33 33 |
|
||||
34 34 | HiveToMySqlTransfer()
|
||||
35 35 |
|
||||
36 |-from airflow.operators.mysql_to_hive import MySqlToHiveOperator
|
||||
36 |+from airflow.providers.apache.hive.transfers.mysql_to_hive import MySqlToHiveOperator
|
||||
37 37 |
|
||||
38 38 | MySqlToHiveOperator()
|
||||
39 39 |
|
||||
33 |
|
||||
34 | HiveToMySqlTransfer()
|
||||
35 |
|
||||
- from airflow.operators.mysql_to_hive import MySqlToHiveOperator
|
||||
36 + from airflow.providers.apache.hive.transfers.mysql_to_hive import MySqlToHiveOperator
|
||||
37 |
|
||||
38 | MySqlToHiveOperator()
|
||||
39 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.mysql_to_hive.MySqlToHiveTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:42:1
|
||||
@@ -312,15 +300,14 @@ AIR302 [*] `airflow.operators.mysql_to_hive.MySqlToHiveTransfer` is moved into `
|
||||
44 | from airflow.operators.mssql_to_hive import MsSqlToHiveOperator
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `MySqlToHiveOperator` from `airflow.providers.apache.hive.transfers.mysql_to_hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
38 38 | MySqlToHiveOperator()
|
||||
39 39 |
|
||||
40 40 | from airflow.operators.mysql_to_hive import MySqlToHiveTransfer
|
||||
41 |+from airflow.providers.apache.hive.transfers.mysql_to_hive import MySqlToHiveOperator
|
||||
41 42 |
|
||||
42 43 | MySqlToHiveTransfer()
|
||||
43 44 |
|
||||
38 | MySqlToHiveOperator()
|
||||
39 |
|
||||
40 | from airflow.operators.mysql_to_hive import MySqlToHiveTransfer
|
||||
41 + from airflow.providers.apache.hive.transfers.mysql_to_hive import MySqlToHiveOperator
|
||||
42 |
|
||||
43 | MySqlToHiveTransfer()
|
||||
44 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.mssql_to_hive.MsSqlToHiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:46:1
|
||||
@@ -333,16 +320,15 @@ AIR302 [*] `airflow.operators.mssql_to_hive.MsSqlToHiveOperator` is moved into `
|
||||
48 | from airflow.operators.mssql_to_hive import MsSqlToHiveTransfer
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `MsSqlToHiveOperator` from `airflow.providers.apache.hive.transfers.mssql_to_hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
41 41 |
|
||||
42 42 | MySqlToHiveTransfer()
|
||||
43 43 |
|
||||
44 |-from airflow.operators.mssql_to_hive import MsSqlToHiveOperator
|
||||
44 |+from airflow.providers.apache.hive.transfers.mssql_to_hive import MsSqlToHiveOperator
|
||||
45 45 |
|
||||
46 46 | MsSqlToHiveOperator()
|
||||
47 47 |
|
||||
41 |
|
||||
42 | MySqlToHiveTransfer()
|
||||
43 |
|
||||
- from airflow.operators.mssql_to_hive import MsSqlToHiveOperator
|
||||
44 + from airflow.providers.apache.hive.transfers.mssql_to_hive import MsSqlToHiveOperator
|
||||
45 |
|
||||
46 | MsSqlToHiveOperator()
|
||||
47 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.mssql_to_hive.MsSqlToHiveTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:50:1
|
||||
@@ -355,15 +341,14 @@ AIR302 [*] `airflow.operators.mssql_to_hive.MsSqlToHiveTransfer` is moved into `
|
||||
52 | from airflow.operators.s3_to_hive_operator import S3ToHiveOperator
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `MsSqlToHiveOperator` from `airflow.providers.apache.hive.transfers.mssql_to_hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
46 46 | MsSqlToHiveOperator()
|
||||
47 47 |
|
||||
48 48 | from airflow.operators.mssql_to_hive import MsSqlToHiveTransfer
|
||||
49 |+from airflow.providers.apache.hive.transfers.mssql_to_hive import MsSqlToHiveOperator
|
||||
49 50 |
|
||||
50 51 | MsSqlToHiveTransfer()
|
||||
51 52 |
|
||||
46 | MsSqlToHiveOperator()
|
||||
47 |
|
||||
48 | from airflow.operators.mssql_to_hive import MsSqlToHiveTransfer
|
||||
49 + from airflow.providers.apache.hive.transfers.mssql_to_hive import MsSqlToHiveOperator
|
||||
50 |
|
||||
51 | MsSqlToHiveTransfer()
|
||||
52 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.s3_to_hive_operator.S3ToHiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:54:1
|
||||
@@ -376,16 +361,15 @@ AIR302 [*] `airflow.operators.s3_to_hive_operator.S3ToHiveOperator` is moved int
|
||||
56 | from airflow.operators.s3_to_hive_operator import S3ToHiveTransfer
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `S3ToHiveOperator` from `airflow.providers.apache.hive.transfers.s3_to_hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
49 49 |
|
||||
50 50 | MsSqlToHiveTransfer()
|
||||
51 51 |
|
||||
52 |-from airflow.operators.s3_to_hive_operator import S3ToHiveOperator
|
||||
52 |+from airflow.providers.apache.hive.transfers.s3_to_hive import S3ToHiveOperator
|
||||
53 53 |
|
||||
54 54 | S3ToHiveOperator()
|
||||
55 55 |
|
||||
49 |
|
||||
50 | MsSqlToHiveTransfer()
|
||||
51 |
|
||||
- from airflow.operators.s3_to_hive_operator import S3ToHiveOperator
|
||||
52 + from airflow.providers.apache.hive.transfers.s3_to_hive import S3ToHiveOperator
|
||||
53 |
|
||||
54 | S3ToHiveOperator()
|
||||
55 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.s3_to_hive_operator.S3ToHiveTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:58:1
|
||||
@@ -398,15 +382,14 @@ AIR302 [*] `airflow.operators.s3_to_hive_operator.S3ToHiveTransfer` is moved int
|
||||
60 | from airflow.sensors.hive_partition_sensor import HivePartitionSensor
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `S3ToHiveOperator` from `airflow.providers.apache.hive.transfers.s3_to_hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
54 54 | S3ToHiveOperator()
|
||||
55 55 |
|
||||
56 56 | from airflow.operators.s3_to_hive_operator import S3ToHiveTransfer
|
||||
57 |+from airflow.providers.apache.hive.transfers.s3_to_hive import S3ToHiveOperator
|
||||
57 58 |
|
||||
58 59 | S3ToHiveTransfer()
|
||||
59 60 |
|
||||
54 | S3ToHiveOperator()
|
||||
55 |
|
||||
56 | from airflow.operators.s3_to_hive_operator import S3ToHiveTransfer
|
||||
57 + from airflow.providers.apache.hive.transfers.s3_to_hive import S3ToHiveOperator
|
||||
58 |
|
||||
59 | S3ToHiveTransfer()
|
||||
60 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.sensors.hive_partition_sensor.HivePartitionSensor` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:62:1
|
||||
@@ -419,16 +402,15 @@ AIR302 [*] `airflow.sensors.hive_partition_sensor.HivePartitionSensor` is moved
|
||||
64 | from airflow.sensors.metastore_partition_sensor import MetastorePartitionSensor
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HivePartitionSensor` from `airflow.providers.apache.hive.sensors.hive_partition` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
57 57 |
|
||||
58 58 | S3ToHiveTransfer()
|
||||
59 59 |
|
||||
60 |-from airflow.sensors.hive_partition_sensor import HivePartitionSensor
|
||||
60 |+from airflow.providers.apache.hive.sensors.hive_partition import HivePartitionSensor
|
||||
61 61 |
|
||||
62 62 | HivePartitionSensor()
|
||||
63 63 |
|
||||
57 |
|
||||
58 | S3ToHiveTransfer()
|
||||
59 |
|
||||
- from airflow.sensors.hive_partition_sensor import HivePartitionSensor
|
||||
60 + from airflow.providers.apache.hive.sensors.hive_partition import HivePartitionSensor
|
||||
61 |
|
||||
62 | HivePartitionSensor()
|
||||
63 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.sensors.metastore_partition_sensor.MetastorePartitionSensor` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:66:1
|
||||
@@ -441,16 +423,15 @@ AIR302 [*] `airflow.sensors.metastore_partition_sensor.MetastorePartitionSensor`
|
||||
68 | from airflow.sensors.named_hive_partition_sensor import NamedHivePartitionSensor
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `MetastorePartitionSensor` from `airflow.providers.apache.hive.sensors.metastore_partition` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
61 61 |
|
||||
62 62 | HivePartitionSensor()
|
||||
63 63 |
|
||||
64 |-from airflow.sensors.metastore_partition_sensor import MetastorePartitionSensor
|
||||
64 |+from airflow.providers.apache.hive.sensors.metastore_partition import MetastorePartitionSensor
|
||||
65 65 |
|
||||
66 66 | MetastorePartitionSensor()
|
||||
67 67 |
|
||||
61 |
|
||||
62 | HivePartitionSensor()
|
||||
63 |
|
||||
- from airflow.sensors.metastore_partition_sensor import MetastorePartitionSensor
|
||||
64 + from airflow.providers.apache.hive.sensors.metastore_partition import MetastorePartitionSensor
|
||||
65 |
|
||||
66 | MetastorePartitionSensor()
|
||||
67 |
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.sensors.named_hive_partition_sensor.NamedHivePartitionSensor` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:70:1
|
||||
@@ -461,12 +442,11 @@ AIR302 [*] `airflow.sensors.named_hive_partition_sensor.NamedHivePartitionSensor
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `NamedHivePartitionSensor` from `airflow.providers.apache.hive.sensors.named_hive_partition` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
65 65 |
|
||||
66 66 | MetastorePartitionSensor()
|
||||
67 67 |
|
||||
68 |-from airflow.sensors.named_hive_partition_sensor import NamedHivePartitionSensor
|
||||
68 |+from airflow.providers.apache.hive.sensors.named_hive_partition import NamedHivePartitionSensor
|
||||
69 69 |
|
||||
70 70 | NamedHivePartitionSensor()
|
||||
65 |
|
||||
66 | MetastorePartitionSensor()
|
||||
67 |
|
||||
- from airflow.sensors.named_hive_partition_sensor import NamedHivePartitionSensor
|
||||
68 + from airflow.providers.apache.hive.sensors.named_hive_partition import NamedHivePartitionSensor
|
||||
69 |
|
||||
70 | NamedHivePartitionSensor()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
@@ -12,17 +12,16 @@ AIR302 [*] `airflow.hooks.http_hook.HttpHook` is moved into `http` provider in A
|
||||
9 | HttpSensor()
|
||||
|
|
||||
help: Install `apache-airflow-providers-http>=1.0.0` and use `HttpHook` from `airflow.providers.http.hooks.http` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 |-from airflow.hooks.http_hook import HttpHook
|
||||
4 3 | from airflow.operators.http_operator import SimpleHttpOperator
|
||||
5 4 | from airflow.sensors.http_sensor import HttpSensor
|
||||
5 |+from airflow.providers.http.hooks.http import HttpHook
|
||||
6 6 |
|
||||
7 7 | HttpHook()
|
||||
8 8 | SimpleHttpOperator()
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
- from airflow.hooks.http_hook import HttpHook
|
||||
3 | from airflow.operators.http_operator import SimpleHttpOperator
|
||||
4 | from airflow.sensors.http_sensor import HttpSensor
|
||||
5 + from airflow.providers.http.hooks.http import HttpHook
|
||||
6 |
|
||||
7 | HttpHook()
|
||||
8 | SimpleHttpOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.http_operator.SimpleHttpOperator` is moved into `http` provider in Airflow 3.0;
|
||||
--> AIR302_http.py:8:1
|
||||
@@ -33,17 +32,15 @@ AIR302 [*] `airflow.operators.http_operator.SimpleHttpOperator` is moved into `h
|
||||
9 | HttpSensor()
|
||||
|
|
||||
help: Install `apache-airflow-providers-http>=5.0.0` and use `HttpOperator` from `airflow.providers.http.operators.http` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
3 3 | from airflow.hooks.http_hook import HttpHook
|
||||
4 4 | from airflow.operators.http_operator import SimpleHttpOperator
|
||||
5 5 | from airflow.sensors.http_sensor import HttpSensor
|
||||
6 |+from airflow.providers.http.operators.http import HttpOperator
|
||||
6 7 |
|
||||
7 8 | HttpHook()
|
||||
8 |-SimpleHttpOperator()
|
||||
9 |+HttpOperator()
|
||||
9 10 | HttpSensor()
|
||||
3 | from airflow.hooks.http_hook import HttpHook
|
||||
4 | from airflow.operators.http_operator import SimpleHttpOperator
|
||||
5 | from airflow.sensors.http_sensor import HttpSensor
|
||||
6 + from airflow.providers.http.operators.http import HttpOperator
|
||||
7 |
|
||||
8 | HttpHook()
|
||||
- SimpleHttpOperator()
|
||||
9 + HttpOperator()
|
||||
10 | HttpSensor()
|
||||
|
||||
AIR302 [*] `airflow.sensors.http_sensor.HttpSensor` is moved into `http` provider in Airflow 3.0;
|
||||
--> AIR302_http.py:9:1
|
||||
@@ -54,13 +51,12 @@ AIR302 [*] `airflow.sensors.http_sensor.HttpSensor` is moved into `http` provide
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-http>=1.0.0` and use `HttpSensor` from `airflow.providers.http.sensors.http` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
3 3 | from airflow.hooks.http_hook import HttpHook
|
||||
4 4 | from airflow.operators.http_operator import SimpleHttpOperator
|
||||
5 |-from airflow.sensors.http_sensor import HttpSensor
|
||||
5 |+from airflow.providers.http.sensors.http import HttpSensor
|
||||
6 6 |
|
||||
7 7 | HttpHook()
|
||||
8 8 | SimpleHttpOperator()
|
||||
2 |
|
||||
3 | from airflow.hooks.http_hook import HttpHook
|
||||
4 | from airflow.operators.http_operator import SimpleHttpOperator
|
||||
- from airflow.sensors.http_sensor import HttpSensor
|
||||
5 + from airflow.providers.http.sensors.http import HttpSensor
|
||||
6 |
|
||||
7 | HttpHook()
|
||||
8 | SimpleHttpOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
@@ -11,18 +11,17 @@ AIR302 [*] `airflow.hooks.jdbc_hook.JdbcHook` is moved into `jdbc` provider in A
|
||||
9 | jaydebeapi()
|
||||
|
|
||||
help: Install `apache-airflow-providers-jdbc>=1.0.0` and use `JdbcHook` from `airflow.providers.jdbc.hooks.jdbc` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 3 | from airflow.hooks.jdbc_hook import (
|
||||
4 |- JdbcHook,
|
||||
5 4 | jaydebeapi,
|
||||
6 5 | )
|
||||
6 |+from airflow.providers.jdbc.hooks.jdbc import JdbcHook
|
||||
7 7 |
|
||||
8 8 | JdbcHook()
|
||||
9 9 | jaydebeapi()
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
3 | from airflow.hooks.jdbc_hook import (
|
||||
- JdbcHook,
|
||||
4 | jaydebeapi,
|
||||
5 | )
|
||||
6 + from airflow.providers.jdbc.hooks.jdbc import JdbcHook
|
||||
7 |
|
||||
8 | JdbcHook()
|
||||
9 | jaydebeapi()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.hooks.jdbc_hook.jaydebeapi` is moved into `jdbc` provider in Airflow 3.0;
|
||||
--> AIR302_jdbc.py:9:1
|
||||
@@ -32,14 +31,13 @@ AIR302 [*] `airflow.hooks.jdbc_hook.jaydebeapi` is moved into `jdbc` provider in
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-jdbc>=1.0.0` and use `jaydebeapi` from `airflow.providers.jdbc.hooks.jdbc` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
3 3 | from airflow.hooks.jdbc_hook import (
|
||||
4 4 | JdbcHook,
|
||||
5 |- jaydebeapi,
|
||||
6 5 | )
|
||||
6 |+from airflow.providers.jdbc.hooks.jdbc import jaydebeapi
|
||||
7 7 |
|
||||
8 8 | JdbcHook()
|
||||
9 9 | jaydebeapi()
|
||||
2 |
|
||||
3 | from airflow.hooks.jdbc_hook import (
|
||||
4 | JdbcHook,
|
||||
- jaydebeapi,
|
||||
5 | )
|
||||
6 + from airflow.providers.jdbc.hooks.jdbc import jaydebeapi
|
||||
7 |
|
||||
8 | JdbcHook()
|
||||
9 | jaydebeapi()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -12,19 +12,18 @@ AIR302 [*] `airflow.hooks.mysql_hook.MySqlHook` is moved into `mysql` provider i
|
||||
11 | PrestoToMySqlTransfer()
|
||||
|
|
||||
help: Install `apache-airflow-providers-mysql>=1.0.0` and use `MySqlHook` from `airflow.providers.mysql.hooks.mysql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 |-from airflow.hooks.mysql_hook import MySqlHook
|
||||
4 3 | from airflow.operators.presto_to_mysql import (
|
||||
5 4 | PrestoToMySqlOperator,
|
||||
6 5 | PrestoToMySqlTransfer,
|
||||
7 6 | )
|
||||
7 |+from airflow.providers.mysql.hooks.mysql import MySqlHook
|
||||
8 8 |
|
||||
9 9 | MySqlHook()
|
||||
10 10 | PrestoToMySqlOperator()
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
- from airflow.hooks.mysql_hook import MySqlHook
|
||||
3 | from airflow.operators.presto_to_mysql import (
|
||||
4 | PrestoToMySqlOperator,
|
||||
5 | PrestoToMySqlTransfer,
|
||||
6 | )
|
||||
7 + from airflow.providers.mysql.hooks.mysql import MySqlHook
|
||||
8 |
|
||||
9 | MySqlHook()
|
||||
10 | PrestoToMySqlOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.presto_to_mysql.PrestoToMySqlOperator` is moved into `mysql` provider in Airflow 3.0;
|
||||
--> AIR302_mysql.py:10:1
|
||||
@@ -35,18 +34,17 @@ AIR302 [*] `airflow.operators.presto_to_mysql.PrestoToMySqlOperator` is moved in
|
||||
11 | PrestoToMySqlTransfer()
|
||||
|
|
||||
help: Install `apache-airflow-providers-mysql>=1.0.0` and use `PrestoToMySqlOperator` from `airflow.providers.mysql.transfers.presto_to_mysql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
3 3 | from airflow.hooks.mysql_hook import MySqlHook
|
||||
4 4 | from airflow.operators.presto_to_mysql import (
|
||||
5 |- PrestoToMySqlOperator,
|
||||
6 5 | PrestoToMySqlTransfer,
|
||||
7 6 | )
|
||||
7 |+from airflow.providers.mysql.transfers.presto_to_mysql import PrestoToMySqlOperator
|
||||
8 8 |
|
||||
9 9 | MySqlHook()
|
||||
10 10 | PrestoToMySqlOperator()
|
||||
2 |
|
||||
3 | from airflow.hooks.mysql_hook import MySqlHook
|
||||
4 | from airflow.operators.presto_to_mysql import (
|
||||
- PrestoToMySqlOperator,
|
||||
5 | PrestoToMySqlTransfer,
|
||||
6 | )
|
||||
7 + from airflow.providers.mysql.transfers.presto_to_mysql import PrestoToMySqlOperator
|
||||
8 |
|
||||
9 | MySqlHook()
|
||||
10 | PrestoToMySqlOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.presto_to_mysql.PrestoToMySqlTransfer` is moved into `mysql` provider in Airflow 3.0;
|
||||
--> AIR302_mysql.py:11:1
|
||||
@@ -57,15 +55,14 @@ AIR302 [*] `airflow.operators.presto_to_mysql.PrestoToMySqlTransfer` is moved in
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-mysql>=1.0.0` and use `PrestoToMySqlOperator` from `airflow.providers.mysql.transfers.presto_to_mysql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
3 3 | from airflow.hooks.mysql_hook import MySqlHook
|
||||
4 4 | from airflow.operators.presto_to_mysql import (
|
||||
5 |- PrestoToMySqlOperator,
|
||||
6 5 | PrestoToMySqlTransfer,
|
||||
7 6 | )
|
||||
7 |+from airflow.providers.mysql.transfers.presto_to_mysql import PrestoToMySqlOperator
|
||||
8 8 |
|
||||
9 9 | MySqlHook()
|
||||
10 10 | PrestoToMySqlOperator()
|
||||
2 |
|
||||
3 | from airflow.hooks.mysql_hook import MySqlHook
|
||||
4 | from airflow.operators.presto_to_mysql import (
|
||||
- PrestoToMySqlOperator,
|
||||
5 | PrestoToMySqlTransfer,
|
||||
6 | )
|
||||
7 + from airflow.providers.mysql.transfers.presto_to_mysql import PrestoToMySqlOperator
|
||||
8 |
|
||||
9 | MySqlHook()
|
||||
10 | PrestoToMySqlOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
@@ -10,11 +10,10 @@ AIR302 [*] `airflow.hooks.oracle_hook.OracleHook` is moved into `oracle` provide
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-oracle>=1.0.0` and use `OracleHook` from `airflow.providers.oracle.hooks.oracle` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 |-from airflow.hooks.oracle_hook import OracleHook
|
||||
3 |+from airflow.providers.oracle.hooks.oracle import OracleHook
|
||||
4 4 |
|
||||
5 5 | OracleHook()
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
- from airflow.hooks.oracle_hook import OracleHook
|
||||
3 + from airflow.providers.oracle.hooks.oracle import OracleHook
|
||||
4 |
|
||||
5 | OracleHook()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
@@ -10,11 +10,10 @@ AIR302 [*] `airflow.operators.papermill_operator.PapermillOperator` is moved int
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-papermill>=1.0.0` and use `PapermillOperator` from `airflow.providers.papermill.operators.papermill` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 |-from airflow.operators.papermill_operator import PapermillOperator
|
||||
3 |+from airflow.providers.papermill.operators.papermill import PapermillOperator
|
||||
4 4 |
|
||||
5 5 | PapermillOperator()
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
- from airflow.operators.papermill_operator import PapermillOperator
|
||||
3 + from airflow.providers.papermill.operators.papermill import PapermillOperator
|
||||
4 |
|
||||
5 | PapermillOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
@@ -11,16 +11,15 @@ AIR302 [*] `airflow.hooks.pig_hook.PigCliHook` is moved into `apache-pig` provid
|
||||
7 | PigOperator()
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-pig>=1.0.0` and use `PigCliHook` from `airflow.providers.apache.pig.hooks.pig` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 |-from airflow.hooks.pig_hook import PigCliHook
|
||||
4 3 | from airflow.operators.pig_operator import PigOperator
|
||||
4 |+from airflow.providers.apache.pig.hooks.pig import PigCliHook
|
||||
5 5 |
|
||||
6 6 | PigCliHook()
|
||||
7 7 | PigOperator()
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
- from airflow.hooks.pig_hook import PigCliHook
|
||||
3 | from airflow.operators.pig_operator import PigOperator
|
||||
4 + from airflow.providers.apache.pig.hooks.pig import PigCliHook
|
||||
5 |
|
||||
6 | PigCliHook()
|
||||
7 | PigOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 [*] `airflow.operators.pig_operator.PigOperator` is moved into `apache-pig` provider in Airflow 3.0;
|
||||
--> AIR302_pig.py:7:1
|
||||
@@ -30,13 +29,12 @@ AIR302 [*] `airflow.operators.pig_operator.PigOperator` is moved into `apache-pi
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
help: Install `apache-airflow-providers-apache-pig>=1.0.0` and use `PigOperator` from `airflow.providers.apache.pig.operators.pig` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 3 | from airflow.hooks.pig_hook import PigCliHook
|
||||
4 |-from airflow.operators.pig_operator import PigOperator
|
||||
4 |+from airflow.providers.apache.pig.operators.pig import PigOperator
|
||||
5 5 |
|
||||
6 6 | PigCliHook()
|
||||
7 7 | PigOperator()
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
3 | from airflow.hooks.pig_hook import PigCliHook
|
||||
- from airflow.operators.pig_operator import PigOperator
|
||||
4 + from airflow.providers.apache.pig.operators.pig import PigOperator
|
||||
5 |
|
||||
6 | PigCliHook()
|
||||
7 | PigOperator()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
@@ -11,16 +11,15 @@ AIR302 [*] `airflow.hooks.postgres_hook.PostgresHook` is moved into `postgres` p
|
||||
7 | Mapping()
|
||||
|
|
||||
help: Install `apache-airflow-providers-postgres>=1.0.0` and use `PostgresHook` from `airflow.providers.postgres.hooks.postgres` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
2 2 |
|
||||
3 |-from airflow.hooks.postgres_hook import PostgresHook
|
||||
4 3 | from airflow.operators.postgres_operator import Mapping
|
||||
4 |+from airflow.providers.postgres.hooks.postgres import PostgresHook
|
||||
5 5 |
|
||||
6 6 | PostgresHook()
|
||||
7 7 | Mapping()
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
- from airflow.hooks.postgres_hook import PostgresHook
|
||||
3 | from airflow.operators.postgres_operator import Mapping
|
||||
4 + from airflow.providers.postgres.hooks.postgres import PostgresHook
|
||||
5 |
|
||||
6 | PostgresHook()
|
||||
7 | Mapping()
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
|
||||
AIR302 `airflow.operators.postgres_operator.Mapping` is removed in Airflow 3.0
|
||||
--> AIR302_postgres.py:7:1
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user