Compare commits
17 Commits
0.12.12
...
jack/new_t
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49942f656c | ||
|
|
e5ca03e1c7 | ||
|
|
2be369f299 | ||
|
|
5d9a8af775 | ||
|
|
5191691d01 | ||
|
|
a88517f13b | ||
|
|
83e3e67cd7 | ||
|
|
d7376bc9ef | ||
|
|
fe8bd215bf | ||
|
|
8368c28ba7 | ||
|
|
e7b093a371 | ||
|
|
5bbeb56feb | ||
|
|
fd181bf986 | ||
|
|
6b81418bdb | ||
|
|
1dbecd3634 | ||
|
|
e59f0b2211 | ||
|
|
790cce4628 |
28
.github/workflows/ci.yaml
vendored
28
.github/workflows/ci.yaml
vendored
@@ -250,7 +250,7 @@ jobs:
|
||||
- name: "Install Rust toolchain"
|
||||
run: rustup show
|
||||
- name: "Install mold"
|
||||
uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
|
||||
uses: rui314/setup-mold@7344740a9418dcdcb481c7df83d9fbd1d5072d7d # 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@725a8794d15fc7563f59595bd9556495c0564878 # v1
|
||||
uses: rui314/setup-mold@7344740a9418dcdcb481c7df83d9fbd1d5072d7d # 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@725a8794d15fc7563f59595bd9556495c0564878 # v1
|
||||
uses: rui314/setup-mold@7344740a9418dcdcb481c7df83d9fbd1d5072d7d # 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@725a8794d15fc7563f59595bd9556495c0564878 # v1
|
||||
uses: rui314/setup-mold@7344740a9418dcdcb481c7df83d9fbd1d5072d7d # 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@2bb61346d075e720d4c3da92f23b6d612d5a7543 # v1.15.3
|
||||
uses: cargo-bins/cargo-binstall@79e4beb1e02f733a26129a6bf26c37dab4ab3307 # v1.14.4
|
||||
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@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- 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@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- 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@2bb61346d075e720d4c3da92f23b6d612d5a7543 # v1.15.3
|
||||
- uses: cargo-bins/cargo-binstall@79e4beb1e02f733a26129a6bf26c37dab4ab3307 # v1.14.4
|
||||
- run: cargo binstall --no-confirm cargo-shear
|
||||
- run: cargo shear
|
||||
|
||||
@@ -734,7 +734,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- 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@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- 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@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
|
||||
- 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@76578c2a7ddd928664caa737f0e962e3085d4e7c # v3.8.1
|
||||
uses: CodSpeedHQ/action@0b6e7a3d96c9d2a6057e7bcea6b45aaf2f7ce60b # v3.8.0
|
||||
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@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
|
||||
- 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@76578c2a7ddd928664caa737f0e962e3085d4e7c # v3.8.1
|
||||
uses: CodSpeedHQ/action@0b6e7a3d96c9d2a6057e7bcea6b45aaf2f7ce60b # v3.8.0
|
||||
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@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- name: "Install Rust toolchain"
|
||||
run: rustup show
|
||||
- name: "Install mold"
|
||||
uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1
|
||||
uses: rui314/setup-mold@7344740a9418dcdcb481c7df83d9fbd1d5072d7d # v1
|
||||
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
|
||||
- name: Build ruff
|
||||
# A debug build means the script runs slower once it gets started,
|
||||
|
||||
4
.github/workflows/mypy_primer.yaml
vendored
4
.github/workflows/mypy_primer.yaml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
|
||||
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
|
||||
with:
|
||||
@@ -82,7 +82,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
|
||||
- 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@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- 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@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
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@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
persist-credentials: false
|
||||
submodules: recursive
|
||||
@@ -175,7 +175,7 @@ jobs:
|
||||
outputs:
|
||||
val: ${{ steps.host.outputs.manifest }}
|
||||
steps:
|
||||
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
persist-credentials: false
|
||||
submodules: recursive
|
||||
@@ -251,7 +251,7 @@ jobs:
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
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@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- 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@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- 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@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
- uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
- name: Setup git
|
||||
run: |
|
||||
git config --global user.name typeshedbot
|
||||
|
||||
5
.github/workflows/ty-ecosystem-analyzer.yaml
vendored
5
.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@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
|
||||
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
|
||||
with:
|
||||
@@ -64,12 +64,11 @@ jobs:
|
||||
|
||||
cd ..
|
||||
|
||||
uv tool install "git+https://github.com/astral-sh/ecosystem-analyzer@1f560d07d672effae250e3d271da53d96c5260ff"
|
||||
uv tool install "git+https://github.com/astral-sh/ecosystem-analyzer@27dd66d9e397d986ef9c631119ee09556eab8af9"
|
||||
|
||||
ecosystem-analyzer \
|
||||
--repository ruff \
|
||||
diff \
|
||||
--profile=release \
|
||||
--projects-old ruff/projects_old.txt \
|
||||
--projects-new ruff/projects_new.txt \
|
||||
--old old_commit \
|
||||
|
||||
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@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
||||
|
||||
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
|
||||
with:
|
||||
|
||||
79
CHANGELOG.md
79
CHANGELOG.md
@@ -1,84 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## 0.12.12
|
||||
|
||||
### Preview features
|
||||
|
||||
- Show fixes by default ([#19919](https://github.com/astral-sh/ruff/pull/19919))
|
||||
- \[`airflow`\] Convert `DatasetOrTimeSchedule(datasets=...)` to `AssetOrTimeSchedule(assets=...)` (`AIR311`) ([#20202](https://github.com/astral-sh/ruff/pull/20202))
|
||||
- \[`airflow`\] Improve the `AIR002` error message ([#20173](https://github.com/astral-sh/ruff/pull/20173))
|
||||
- \[`airflow`\] Move `airflow.operators.postgres_operator.Mapping` from `AIR302` to `AIR301` ([#20172](https://github.com/astral-sh/ruff/pull/20172))
|
||||
- \[`flake8-async`\] Implement `blocking-input` rule (`ASYNC250`) ([#20122](https://github.com/astral-sh/ruff/pull/20122))
|
||||
- \[`flake8-use-pathlib`\] Make `PTH119` and `PTH120` fixes unsafe because they can change behavior ([#20118](https://github.com/astral-sh/ruff/pull/20118))
|
||||
- \[`pylint`\] Add U+061C to `PLE2502` ([#20106](https://github.com/astral-sh/ruff/pull/20106))
|
||||
- \[`ruff`\] Fix false negative for empty f-strings in `deque` calls (`RUF037`) ([#20109](https://github.com/astral-sh/ruff/pull/20109))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- Less confidently mark f-strings as empty when inferring truthiness ([#20152](https://github.com/astral-sh/ruff/pull/20152))
|
||||
- \[`fastapi`\] Fix false positive for paths with spaces around parameters (`FAST003`) ([#20077](https://github.com/astral-sh/ruff/pull/20077))
|
||||
- \[`flake8-comprehensions`\] Skip `C417` when lambda contains `yield`/`yield from` ([#20201](https://github.com/astral-sh/ruff/pull/20201))
|
||||
- \[`perflint`\] Handle tuples in dictionary comprehensions (`PERF403`) ([#19934](https://github.com/astral-sh/ruff/pull/19934))
|
||||
|
||||
### Rule changes
|
||||
|
||||
- \[`pycodestyle`\] Preserve return type annotation for `ParamSpec` (`E731`) ([#20108](https://github.com/astral-sh/ruff/pull/20108))
|
||||
|
||||
### Documentation
|
||||
|
||||
- Add fix safety sections to docs ([#17490](https://github.com/astral-sh/ruff/pull/17490),[#17499](https://github.com/astral-sh/ruff/pull/17499))
|
||||
|
||||
## 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
|
||||
|
||||
275
Cargo.lock
generated
275
Cargo.lock
generated
@@ -257,9 +257,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "2.9.3"
|
||||
version = "2.9.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34efbcccd345379ca2868b2b2c9d3782e9cc58ba87bc7d79d5b53d9c9ae6f25d"
|
||||
checksum = "6a65b545ab31d687cff52899d4890855fec459eb6afe0da6417b8a18da87aa29"
|
||||
|
||||
[[package]]
|
||||
name = "bitvec"
|
||||
@@ -295,7 +295,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"regex-automata",
|
||||
"regex-automata 0.4.9",
|
||||
"serde",
|
||||
]
|
||||
|
||||
@@ -322,9 +322,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "camino"
|
||||
version = "1.1.12"
|
||||
version = "1.1.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd0b03af37dad7a14518b7691d81acb0f8222604ad3d1b02f6b4bed5188c0cd5"
|
||||
checksum = "5d07aa9a93b00c76f71bc35d598bed923f6d4f3a9ca5c24b7737ae1a292841c0"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
@@ -408,9 +408,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.46"
|
||||
version = "4.5.45"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2c5e4fcf9c21d2e544ca1ee9d8552de13019a42aa7dbf32747fa7aaf1df76e57"
|
||||
checksum = "1fc0e74a703892159f5ae7d3aac52c8e6c392f5ae5f359c70b5881d60aaac318"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
"clap_derive",
|
||||
@@ -418,9 +418,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.5.46"
|
||||
version = "4.5.44"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fecb53a0e6fcfb055f686001bc2e2592fa527efaf38dbe81a6a9563562e57d41"
|
||||
checksum = "b3e7f4214277f3c7aa526a59dd3fbe306a370daee1f8b7b8c987069cd8e888a8"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
@@ -485,7 +485,7 @@ checksum = "85a8ab73a1c02b0c15597b22e09c7dc36e63b2f601f9d1e83ac0c3decd38b1ae"
|
||||
dependencies = [
|
||||
"nix 0.29.0",
|
||||
"terminfo",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
"which",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
@@ -1084,14 +1084,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "filetime"
|
||||
version = "0.2.26"
|
||||
version = "0.2.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed"
|
||||
checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"libredox",
|
||||
"windows-sys 0.60.2",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1118,9 +1118,9 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
|
||||
|
||||
[[package]]
|
||||
name = "form_urlencoded"
|
||||
version = "1.2.2"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
|
||||
checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
|
||||
dependencies = [
|
||||
"percent-encoding",
|
||||
]
|
||||
@@ -1218,9 +1218,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "glob"
|
||||
version = "0.3.3"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
|
||||
checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
|
||||
|
||||
[[package]]
|
||||
name = "globset"
|
||||
@@ -1231,8 +1231,8 @@ dependencies = [
|
||||
"aho-corasick",
|
||||
"bstr",
|
||||
"log",
|
||||
"regex-automata",
|
||||
"regex-syntax",
|
||||
"regex-automata 0.4.9",
|
||||
"regex-syntax 0.8.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1241,7 +1241,7 @@ version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757"
|
||||
dependencies = [
|
||||
"bitflags 2.9.3",
|
||||
"bitflags 2.9.2",
|
||||
"ignore",
|
||||
"walkdir",
|
||||
]
|
||||
@@ -1430,9 +1430,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
||||
|
||||
[[package]]
|
||||
name = "idna"
|
||||
version = "1.1.0"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
|
||||
checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e"
|
||||
dependencies = [
|
||||
"idna_adapter",
|
||||
"smallvec",
|
||||
@@ -1459,7 +1459,7 @@ dependencies = [
|
||||
"globset",
|
||||
"log",
|
||||
"memchr",
|
||||
"regex-automata",
|
||||
"regex-automata 0.4.9",
|
||||
"same-file",
|
||||
"walkdir",
|
||||
"winapi-util",
|
||||
@@ -1486,9 +1486,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.11.0"
|
||||
version = "2.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9"
|
||||
checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661"
|
||||
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.3",
|
||||
"bitflags 2.9.2",
|
||||
"inotify-sys",
|
||||
"libc",
|
||||
]
|
||||
@@ -1780,7 +1780,7 @@ dependencies = [
|
||||
"paste",
|
||||
"peg",
|
||||
"regex",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1795,9 +1795,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libmimalloc-sys"
|
||||
version = "0.1.44"
|
||||
version = "0.1.43"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "667f4fec20f29dfc6bc7357c582d91796c169ad7e2fce709468aefeb2c099870"
|
||||
checksum = "bf88cd67e9de251c1781dbe2f641a1a3ad66eaae831b8a2c38fbdc5ddae16d4d"
|
||||
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.3",
|
||||
"bitflags 2.9.2",
|
||||
"libc",
|
||||
"redox_syscall",
|
||||
]
|
||||
@@ -1913,11 +1913,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "matchers"
|
||||
version = "0.2.0"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9"
|
||||
checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
|
||||
dependencies = [
|
||||
"regex-automata",
|
||||
"regex-automata 0.1.10",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1949,9 +1949,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "mimalloc"
|
||||
version = "0.1.48"
|
||||
version = "0.1.47"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e1ee66a4b64c74f4ef288bcbb9192ad9c3feaad75193129ac8509af543894fd8"
|
||||
checksum = "b1791cbe101e95af5764f06f20f6760521f7158f69dbf9d6baf941ee1bf6bc40"
|
||||
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.3",
|
||||
"bitflags 2.9.2",
|
||||
"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.3",
|
||||
"bitflags 2.9.2",
|
||||
"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.3",
|
||||
"bitflags 2.9.2",
|
||||
"fsevent-sys",
|
||||
"inotify",
|
||||
"kqueue",
|
||||
@@ -2074,11 +2074,12 @@ checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d"
|
||||
|
||||
[[package]]
|
||||
name = "nu-ansi-term"
|
||||
version = "0.50.1"
|
||||
version = "0.46.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399"
|
||||
checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
|
||||
dependencies = [
|
||||
"windows-sys 0.52.0",
|
||||
"overload",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2126,9 +2127,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
|
||||
|
||||
[[package]]
|
||||
name = "ordermap"
|
||||
version = "0.5.9"
|
||||
version = "0.5.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2fd6fedcd996c8c97932075cc3811d83f53280f48d5620e4e3cab7f6a12678c4"
|
||||
checksum = "6d6bff06e4a5dc6416bead102d3e63c480dd852ffbb278bf8cfeb4966b329609"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"serde",
|
||||
@@ -2153,6 +2154,12 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "overload"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot"
|
||||
version = "0.12.4"
|
||||
@@ -2276,9 +2283,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "percent-encoding"
|
||||
version = "2.3.2"
|
||||
version = "2.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
|
||||
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
|
||||
|
||||
[[package]]
|
||||
name = "pest"
|
||||
@@ -2287,7 +2294,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
"ucd-trie",
|
||||
]
|
||||
|
||||
@@ -2466,9 +2473,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.101"
|
||||
version = "1.0.96"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
|
||||
checksum = "beef09f85ae72cea1ef96ba6870c51e6382ebfa4f0e85b643459331f3daa5be0"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
@@ -2483,7 +2490,7 @@ dependencies = [
|
||||
"pep440_rs",
|
||||
"pep508_rs",
|
||||
"serde",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
"toml 0.8.23",
|
||||
]
|
||||
|
||||
@@ -2498,7 +2505,7 @@ dependencies = [
|
||||
"newtype-uuid",
|
||||
"quick-xml",
|
||||
"strip-ansi-escapes",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
@@ -2659,7 +2666,7 @@ version = "0.5.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77"
|
||||
dependencies = [
|
||||
"bitflags 2.9.3",
|
||||
"bitflags 2.9.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2670,30 +2677,39 @@ checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
|
||||
dependencies = [
|
||||
"getrandom 0.2.16",
|
||||
"libredox",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.11.2"
|
||||
version = "1.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912"
|
||||
checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-automata",
|
||||
"regex-syntax",
|
||||
"regex-automata 0.4.9",
|
||||
"regex-syntax 0.8.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.4.10"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6"
|
||||
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
|
||||
dependencies = [
|
||||
"regex-syntax 0.6.29",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.4.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-syntax",
|
||||
"regex-syntax 0.8.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2702,6 +2718,12 @@ version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a"
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.29"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.8.5"
|
||||
@@ -2721,13 +2743,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ruff"
|
||||
version = "0.12.12"
|
||||
version = "0.12.9"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"argfile",
|
||||
"assert_fs",
|
||||
"bincode 2.0.1",
|
||||
"bitflags 2.9.3",
|
||||
"bitflags 2.9.2",
|
||||
"cachedir",
|
||||
"clap",
|
||||
"clap_complete_command",
|
||||
@@ -2771,7 +2793,7 @@ dependencies = [
|
||||
"strum",
|
||||
"tempfile",
|
||||
"test-case",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
"tikv-jemallocator",
|
||||
"toml 0.9.5",
|
||||
"tracing",
|
||||
@@ -2848,7 +2870,6 @@ dependencies = [
|
||||
"insta",
|
||||
"matchit",
|
||||
"path-slash",
|
||||
"pathdiff",
|
||||
"quick-junit",
|
||||
"ruff_annotate_snippets",
|
||||
"ruff_cache",
|
||||
@@ -2865,9 +2886,8 @@ dependencies = [
|
||||
"schemars",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"similar",
|
||||
"tempfile",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"ty_static",
|
||||
@@ -2914,7 +2934,6 @@ dependencies = [
|
||||
"tracing-subscriber",
|
||||
"ty",
|
||||
"ty_project",
|
||||
"ty_python_semantic",
|
||||
"ty_static",
|
||||
"url",
|
||||
]
|
||||
@@ -2977,11 +2996,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ruff_linter"
|
||||
version = "0.12.12"
|
||||
version = "0.12.9"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"anyhow",
|
||||
"bitflags 2.9.3",
|
||||
"bitflags 2.9.2",
|
||||
"clap",
|
||||
"colored 3.0.0",
|
||||
"fern",
|
||||
@@ -2999,6 +3018,7 @@ dependencies = [
|
||||
"memchr",
|
||||
"natord",
|
||||
"path-absolutize",
|
||||
"pathdiff",
|
||||
"pep440_rs",
|
||||
"pyproject-toml",
|
||||
"regex",
|
||||
@@ -3027,7 +3047,7 @@ dependencies = [
|
||||
"strum_macros",
|
||||
"tempfile",
|
||||
"test-case",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
"toml 0.9.5",
|
||||
"typed-arena",
|
||||
"unicode-normalization",
|
||||
@@ -3070,7 +3090,7 @@ dependencies = [
|
||||
"serde_json",
|
||||
"serde_with",
|
||||
"test-case",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
@@ -3086,7 +3106,7 @@ name = "ruff_python_ast"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"bitflags 2.9.3",
|
||||
"bitflags 2.9.2",
|
||||
"compact_str",
|
||||
"get-size2",
|
||||
"is-macro",
|
||||
@@ -3101,7 +3121,7 @@ dependencies = [
|
||||
"salsa",
|
||||
"schemars",
|
||||
"serde",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3155,7 +3175,7 @@ dependencies = [
|
||||
"similar",
|
||||
"smallvec",
|
||||
"static_assertions",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
@@ -3174,7 +3194,7 @@ dependencies = [
|
||||
name = "ruff_python_literal"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"bitflags 2.9.3",
|
||||
"bitflags 2.9.2",
|
||||
"itertools 0.14.0",
|
||||
"ruff_python_ast",
|
||||
"unic-ucd-category",
|
||||
@@ -3185,7 +3205,7 @@ name = "ruff_python_parser"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.9.3",
|
||||
"bitflags 2.9.2",
|
||||
"bstr",
|
||||
"compact_str",
|
||||
"get-size2",
|
||||
@@ -3210,7 +3230,7 @@ dependencies = [
|
||||
name = "ruff_python_semantic"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"bitflags 2.9.3",
|
||||
"bitflags 2.9.2",
|
||||
"insta",
|
||||
"is-macro",
|
||||
"ruff_cache",
|
||||
@@ -3231,7 +3251,7 @@ dependencies = [
|
||||
name = "ruff_python_stdlib"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"bitflags 2.9.3",
|
||||
"bitflags 2.9.2",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
@@ -3285,7 +3305,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"shellexpand",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
"toml 0.9.5",
|
||||
"tracing",
|
||||
"tracing-log",
|
||||
@@ -3315,7 +3335,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ruff_wasm"
|
||||
version = "0.12.12"
|
||||
version = "0.12.9"
|
||||
dependencies = [
|
||||
"console_error_panic_hook",
|
||||
"console_log",
|
||||
@@ -3408,7 +3428,7 @@ version = "1.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8"
|
||||
dependencies = [
|
||||
"bitflags 2.9.3",
|
||||
"bitflags 2.9.2",
|
||||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
@@ -3430,7 +3450,7 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
|
||||
[[package]]
|
||||
name = "salsa"
|
||||
version = "0.23.0"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=a3ffa22cb26756473d56f867aedec3fd907c4dd9#a3ffa22cb26756473d56f867aedec3fd907c4dd9"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=918d35d873b2b73a0237536144ef4d22e8d57f27#918d35d873b2b73a0237536144ef4d22e8d57f27"
|
||||
dependencies = [
|
||||
"boxcar",
|
||||
"compact_str",
|
||||
@@ -3454,12 +3474,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "salsa-macro-rules"
|
||||
version = "0.23.0"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=a3ffa22cb26756473d56f867aedec3fd907c4dd9#a3ffa22cb26756473d56f867aedec3fd907c4dd9"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=918d35d873b2b73a0237536144ef4d22e8d57f27#918d35d873b2b73a0237536144ef4d22e8d57f27"
|
||||
|
||||
[[package]]
|
||||
name = "salsa-macros"
|
||||
version = "0.23.0"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=a3ffa22cb26756473d56f867aedec3fd907c4dd9#a3ffa22cb26756473d56f867aedec3fd907c4dd9"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=918d35d873b2b73a0237536144ef4d22e8d57f27#918d35d873b2b73a0237536144ef4d22e8d57f27"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -3556,9 +3576,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.143"
|
||||
version = "1.0.142"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a"
|
||||
checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"memchr",
|
||||
@@ -3769,9 +3789,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.106"
|
||||
version = "2.0.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
|
||||
checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -3895,11 +3915,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "2.0.16"
|
||||
version = "2.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0"
|
||||
checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
|
||||
dependencies = [
|
||||
"thiserror-impl 2.0.16",
|
||||
"thiserror-impl 2.0.12",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3915,9 +3935,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "2.0.16"
|
||||
version = "2.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960"
|
||||
checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -4116,9 +4136,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tracing-indicatif"
|
||||
version = "0.3.13"
|
||||
version = "0.3.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "04d4e11e0e27acef25a47f27e9435355fecdc488867fa2bc90e75b0700d2823d"
|
||||
checksum = "e1983afead46ff13a3c93581e0cec31d20b29efdd22cbdaa8b9f850eccf2c352"
|
||||
dependencies = [
|
||||
"indicatif",
|
||||
"tracing",
|
||||
@@ -4139,15 +4159,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tracing-subscriber"
|
||||
version = "0.3.20"
|
||||
version = "0.3.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5"
|
||||
checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"matchers",
|
||||
"nu-ansi-term",
|
||||
"once_cell",
|
||||
"regex-automata",
|
||||
"regex",
|
||||
"sharded-slab",
|
||||
"smallvec",
|
||||
"thread_local",
|
||||
@@ -4218,23 +4238,17 @@ dependencies = [
|
||||
name = "ty_ide"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"bitflags 2.9.3",
|
||||
"camino",
|
||||
"get-size2",
|
||||
"bitflags 2.9.2",
|
||||
"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",
|
||||
@@ -4257,7 +4271,7 @@ dependencies = [
|
||||
"pep440_rs",
|
||||
"rayon",
|
||||
"regex",
|
||||
"regex-automata",
|
||||
"regex-automata 0.4.9",
|
||||
"ruff_cache",
|
||||
"ruff_db",
|
||||
"ruff_macros",
|
||||
@@ -4270,7 +4284,7 @@ dependencies = [
|
||||
"salsa",
|
||||
"schemars",
|
||||
"serde",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
"toml 0.9.5",
|
||||
"tracing",
|
||||
"ty_combine",
|
||||
@@ -4283,7 +4297,7 @@ name = "ty_python_semantic"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.9.3",
|
||||
"bitflags 2.9.2",
|
||||
"bitvec",
|
||||
"camino",
|
||||
"colored 3.0.0",
|
||||
@@ -4323,7 +4337,7 @@ dependencies = [
|
||||
"strum_macros",
|
||||
"tempfile",
|
||||
"test-case",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
"tracing",
|
||||
"ty_python_semantic",
|
||||
"ty_static",
|
||||
@@ -4336,7 +4350,7 @@ name = "ty_server"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.9.3",
|
||||
"bitflags 2.9.2",
|
||||
"crossbeam",
|
||||
"dunce",
|
||||
"insta",
|
||||
@@ -4357,7 +4371,7 @@ dependencies = [
|
||||
"serde_json",
|
||||
"shellexpand",
|
||||
"tempfile",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"ty_combine",
|
||||
@@ -4379,7 +4393,7 @@ name = "ty_test"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.9.3",
|
||||
"bitflags 2.9.2",
|
||||
"camino",
|
||||
"colored 3.0.0",
|
||||
"insta",
|
||||
@@ -4398,7 +4412,7 @@ dependencies = [
|
||||
"serde",
|
||||
"smallvec",
|
||||
"tempfile",
|
||||
"thiserror 2.0.16",
|
||||
"thiserror 2.0.12",
|
||||
"toml 0.9.5",
|
||||
"tracing",
|
||||
"ty_python_semantic",
|
||||
@@ -4575,9 +4589,9 @@ checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae"
|
||||
|
||||
[[package]]
|
||||
name = "url"
|
||||
version = "2.5.7"
|
||||
version = "2.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b"
|
||||
checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60"
|
||||
dependencies = [
|
||||
"form_urlencoded",
|
||||
"idna",
|
||||
@@ -4871,6 +4885,22 @@ dependencies = [
|
||||
"glob",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu",
|
||||
"winapi-x86_64-pc-windows-gnu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-util"
|
||||
version = "0.1.9"
|
||||
@@ -4880,6 +4910,12 @@ dependencies = [
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
||||
[[package]]
|
||||
name = "windows-core"
|
||||
version = "0.61.2"
|
||||
@@ -4939,15 +4975,6 @@ dependencies = [
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
|
||||
dependencies = [
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.59.0"
|
||||
@@ -5116,7 +5143,7 @@ version = "0.39.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1"
|
||||
dependencies = [
|
||||
"bitflags 2.9.3",
|
||||
"bitflags 2.9.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -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 = "a3ffa22cb26756473d56f867aedec3fd907c4dd9", default-features = false, features = [
|
||||
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "918d35d873b2b73a0237536144ef4d22e8d57f27", default-features = false, features = [
|
||||
"compact_str",
|
||||
"macros",
|
||||
"salsa_unstable",
|
||||
@@ -215,8 +215,6 @@ 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"
|
||||
@@ -255,7 +253,6 @@ 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.12/install.sh | sh
|
||||
powershell -c "irm https://astral.sh/ruff/0.12.12/install.ps1 | iex"
|
||||
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"
|
||||
```
|
||||
|
||||
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.12
|
||||
rev: v0.12.9
|
||||
hooks:
|
||||
# Run the linter.
|
||||
- id: ruff-check
|
||||
|
||||
17
clippy.toml
17
clippy.toml
@@ -24,20 +24,3 @@ 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.12"
|
||||
version = "0.12.9"
|
||||
publish = true
|
||||
authors = { workspace = true }
|
||||
edition = { workspace = true }
|
||||
|
||||
@@ -15,7 +15,8 @@ use ruff_db::diagnostic::{
|
||||
use ruff_linter::fs::relativize_path;
|
||||
use ruff_linter::logging::LogLevel;
|
||||
use ruff_linter::message::{
|
||||
Emitter, EmitterContext, GithubEmitter, GroupedEmitter, SarifEmitter, TextEmitter,
|
||||
Emitter, EmitterContext, GithubEmitter, GitlabEmitter, GroupedEmitter, SarifEmitter,
|
||||
TextEmitter,
|
||||
};
|
||||
use ruff_linter::notify_user;
|
||||
use ruff_linter::settings::flags::{self};
|
||||
@@ -30,6 +31,8 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,9 +261,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.format == OutputFormat::Full && preview)
|
||||
.with_show_fix_diff(self.flags.intersects(Flags::SHOW_FIX_DIFF))
|
||||
.with_show_source(self.format == OutputFormat::Full)
|
||||
.with_fix_applicability(self.unsafe_fixes.required_applicability())
|
||||
.with_unsafe_fixes(self.unsafe_fixes)
|
||||
.with_preview(preview)
|
||||
.emit(writer, &diagnostics.inner, &context)?;
|
||||
|
||||
@@ -293,11 +296,7 @@ impl Printer {
|
||||
GithubEmitter.emit(writer, &diagnostics.inner, &context)?;
|
||||
}
|
||||
OutputFormat::Gitlab => {
|
||||
let config = DisplayDiagnosticConfig::default()
|
||||
.format(DiagnosticFormat::Gitlab)
|
||||
.preview(preview);
|
||||
let value = DisplayDiagnostics::new(&context, &config, &diagnostics.inner);
|
||||
write!(writer, "{value}")?;
|
||||
GitlabEmitter::default().emit(writer, &diagnostics.inner, &context)?;
|
||||
}
|
||||
OutputFormat::Pylint => {
|
||||
let config = DisplayDiagnosticConfig::default()
|
||||
@@ -462,7 +461,7 @@ impl Printer {
|
||||
TextEmitter::default()
|
||||
.with_show_fix_status(show_fix_status(self.fix_mode, fixables.as_ref()))
|
||||
.with_show_source(preview)
|
||||
.with_fix_applicability(self.unsafe_fixes.required_applicability())
|
||||
.with_unsafe_fixes(self.unsafe_fixes)
|
||||
.emit(writer, &diagnostics.inner, &context)?;
|
||||
}
|
||||
writer.flush()?;
|
||||
|
||||
@@ -5801,62 +5801,3 @@ 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": {
|
||||
"line": 1,
|
||||
"column": 8
|
||||
"column": 8,
|
||||
"line": 1
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
"column": 10,
|
||||
"line": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"severity": "major"
|
||||
},
|
||||
{
|
||||
"check_name": "F821",
|
||||
"description": "F821: Undefined name `y`",
|
||||
"severity": "major",
|
||||
"fingerprint": "7af59862a085230",
|
||||
"location": {
|
||||
"path": "input.py",
|
||||
"positions": {
|
||||
"begin": {
|
||||
"line": 2,
|
||||
"column": 5
|
||||
"column": 5,
|
||||
"line": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 6
|
||||
"column": 6,
|
||||
"line": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"line": 3,
|
||||
"column": 1
|
||||
"column": 1,
|
||||
"line": 3
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 6
|
||||
"column": 6,
|
||||
"line": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"severity": "major"
|
||||
}
|
||||
]
|
||||
----- stderr -----
|
||||
|
||||
@@ -450,6 +450,9 @@ 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
|
||||
|
||||
@@ -463,56 +466,6 @@ 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)
|
||||
"#,
|
||||
)
|
||||
},
|
||||
@@ -715,7 +668,6 @@ 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,14 +34,12 @@ 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 }
|
||||
@@ -54,7 +52,7 @@ web-time = { version = "1.1.0" }
|
||||
etcetera = { workspace = true, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
insta = { workspace = true, features = ["filters"] }
|
||||
insta = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
|
||||
[features]
|
||||
|
||||
@@ -325,11 +325,6 @@ 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!(
|
||||
@@ -349,13 +344,6 @@ 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.
|
||||
@@ -1306,10 +1294,6 @@ 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,
|
||||
}
|
||||
@@ -1357,14 +1341,6 @@ 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
|
||||
@@ -1388,7 +1364,6 @@ impl Default for DisplayDiagnosticConfig {
|
||||
preview: false,
|
||||
hide_severity: false,
|
||||
show_fix_status: false,
|
||||
show_fix_diff: false,
|
||||
fix_applicability: Applicability::Safe,
|
||||
}
|
||||
}
|
||||
@@ -1442,11 +1417,6 @@ 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/ci/testing/code_quality/#code-quality-report-format
|
||||
#[cfg(feature = "serde")]
|
||||
Gitlab,
|
||||
}
|
||||
|
||||
/// A representation of the kinds of messages inside a diagnostic.
|
||||
|
||||
@@ -31,8 +31,6 @@ mod azure;
|
||||
mod concise;
|
||||
mod full;
|
||||
#[cfg(feature = "serde")]
|
||||
mod gitlab;
|
||||
#[cfg(feature = "serde")]
|
||||
mod json;
|
||||
#[cfg(feature = "serde")]
|
||||
mod json_lines;
|
||||
@@ -138,10 +136,6 @@ 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(())
|
||||
@@ -254,7 +248,9 @@ impl<'a> ResolvedDiagnostic<'a> {
|
||||
id,
|
||||
message: diag.inner.message.as_str().to_string(),
|
||||
annotations,
|
||||
is_fixable: diag.has_applicable_fix(config),
|
||||
is_fixable: diag
|
||||
.fix()
|
||||
.is_some_and(|fix| fix.applies(config.fix_applicability)),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2626,13 +2622,6 @@ 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,9 +77,11 @@ impl<'a> ConciseRenderer<'a> {
|
||||
)?;
|
||||
}
|
||||
if self.config.show_fix_status {
|
||||
// Do not display an indicator for inapplicable fixes
|
||||
if diag.has_applicable_fix(self.config) {
|
||||
write!(f, "[{fix}] ", fix = fmt_styled("*", stylesheet.separator))?;
|
||||
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))?;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
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::stylesheet::{DiagnosticStylesheet, fmt_styled};
|
||||
use crate::diagnostic::{Diagnostic, DiagnosticSource, DisplayDiagnosticConfig};
|
||||
use crate::diagnostic::{Diagnostic, DisplayDiagnosticConfig, stylesheet::DiagnosticStylesheet};
|
||||
|
||||
pub(super) struct FullRenderer<'a> {
|
||||
resolver: &'a dyn FileResolver,
|
||||
@@ -57,13 +47,6 @@ 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)?;
|
||||
}
|
||||
|
||||
@@ -71,227 +54,9 @@ 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, Edit, Fix};
|
||||
use ruff_diagnostics::Applicability;
|
||||
use ruff_text_size::{TextLen, TextRange, TextSize};
|
||||
|
||||
use crate::diagnostic::{
|
||||
@@ -692,104 +457,6 @@ 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]
|
||||
@@ -892,74 +559,4 @@ 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
|
||||
");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,205 +0,0 @@
|
||||
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));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -43,10 +43,6 @@ 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 {
|
||||
@@ -70,10 +66,6 @@ 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),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,10 +81,6 @@ 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,8 +1,3 @@
|
||||
#![warn(
|
||||
clippy::disallowed_methods,
|
||||
reason = "Prefer System trait methods over std methods"
|
||||
)]
|
||||
|
||||
use crate::files::Files;
|
||||
use crate::system::System;
|
||||
use crate::vendored::VendoredFileSystem;
|
||||
@@ -70,10 +65,6 @@ 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 the pointer address of this [`ParsedModule`].
|
||||
/// Returns a pointer for this [`ParsedModule`].
|
||||
///
|
||||
/// The pointer uniquely identifies the module within the current Salsa revision,
|
||||
/// regardless of whether particular [`ParsedModuleRef`] instances are garbage collected.
|
||||
pub fn addr(&self) -> usize {
|
||||
pub fn as_ptr(&self) -> *const () {
|
||||
// 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).addr()
|
||||
Arc::as_ptr(&self.inner).cast()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,13 +202,9 @@ 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()]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +220,7 @@ mod indexed {
|
||||
T: HasNodeIndex + std::fmt::Debug,
|
||||
AnyRootNodeRef<'a>: From<&'a T>,
|
||||
{
|
||||
node.node_index().set(NodeIndex::from(self.index));
|
||||
node.node_index().set(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 + Sync + Send {
|
||||
pub trait System: Debug {
|
||||
/// Reads the metadata of the file or directory at `path`.
|
||||
///
|
||||
/// This function will traverse symbolic links to query information about the destination file.
|
||||
@@ -197,8 +197,6 @@ pub trait System: Debug + Sync + Send {
|
||||
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,5 +1,3 @@
|
||||
#![allow(clippy::disallowed_methods)]
|
||||
|
||||
use super::walk_directory::{
|
||||
self, DirectoryWalker, WalkDirectoryBuilder, WalkDirectoryConfiguration,
|
||||
WalkDirectoryVisitorBuilder, WalkState,
|
||||
@@ -257,10 +255,6 @@ 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,10 +146,6 @@ 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 {
|
||||
@@ -398,13 +394,6 @@ 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,7 +13,6 @@ 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_python_semantic::default_lint_registry();
|
||||
let registry = &*ty_project::DEFAULT_LINT_REGISTRY;
|
||||
|
||||
let mut output = String::new();
|
||||
|
||||
|
||||
@@ -14,11 +14,8 @@ license = { workspace = true }
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
ruff_text_size = { workspace = true, features = ["get-size"] }
|
||||
ruff_text_size = { workspace = true }
|
||||
|
||||
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.12"
|
||||
version = "0.12.9"
|
||||
publish = false
|
||||
authors = { workspace = true }
|
||||
edition = { workspace = true }
|
||||
@@ -51,6 +51,7 @@ 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 }
|
||||
|
||||
@@ -12,7 +12,6 @@ from airflow import (
|
||||
from airflow.api_connexion.security import requires_access
|
||||
from airflow.contrib.aws_athena_hook import AWSAthenaHook
|
||||
from airflow.datasets import DatasetAliasEvent
|
||||
from airflow.operators.postgres_operator import Mapping
|
||||
from airflow.operators.subdag import SubDagOperator
|
||||
from airflow.secrets.cache import SecretCache
|
||||
from airflow.secrets.local_filesystem import LocalFilesystemBackend
|
||||
@@ -53,8 +52,6 @@ DatasetAliasEvent()
|
||||
# airflow.operators.subdag.*
|
||||
SubDagOperator()
|
||||
|
||||
# airflow.operators.postgres_operator
|
||||
Mapping()
|
||||
|
||||
# airflow.secrets
|
||||
# get_connection
|
||||
|
||||
@@ -34,7 +34,7 @@ task_group()
|
||||
setup()
|
||||
from airflow.decorators import teardown
|
||||
from airflow.io.path import ObjectStoragePath
|
||||
from airflow.io.store import attach
|
||||
from airflow.io.storage import attach
|
||||
from airflow.models import DAG as DAGFromModel
|
||||
from airflow.models import (
|
||||
Connection,
|
||||
@@ -70,40 +70,7 @@ from airflow.timetables.datasets import DatasetOrTimeSchedule
|
||||
from airflow.utils.dag_parsing_context import get_parsing_context
|
||||
|
||||
# airflow.timetables.datasets
|
||||
DatasetOrTimeSchedule(datasets=[])
|
||||
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,6 +9,7 @@ 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()
|
||||
@@ -21,6 +22,7 @@ EmptyOperator()
|
||||
|
||||
LatestOnlyOperator()
|
||||
BranchDayOfWeekOperator()
|
||||
DateTimeSensor()
|
||||
|
||||
from airflow.operators.python import (
|
||||
BranchPythonOperator,
|
||||
@@ -28,23 +30,16 @@ 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()
|
||||
@@ -54,13 +49,6 @@ DateTimeSensorAsync()
|
||||
ExternalTaskMarker()
|
||||
ExternalTaskSensor()
|
||||
FileSensor()
|
||||
PythonSensor()
|
||||
|
||||
from airflow.sensors.time_sensor import (
|
||||
TimeSensor,
|
||||
TimeSensorAsync,
|
||||
)
|
||||
|
||||
TimeSensor()
|
||||
TimeSensorAsync()
|
||||
|
||||
|
||||
@@ -213,17 +213,3 @@ 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}
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
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
|
||||
@@ -1,22 +0,0 @@
|
||||
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
|
||||
@@ -75,7 +75,3 @@ list(map(lambda x, y: x, [(1, 2), (3, 4)]))
|
||||
_ = t"{set(map(lambda x: x % 2 == 0, nums))}"
|
||||
_ = t"{dict(map(lambda v: (v, v**2), nums))}"
|
||||
|
||||
|
||||
# See https://github.com/astral-sh/ruff/issues/20198
|
||||
# No error: lambda contains `yield`, so map() should not be rewritten
|
||||
map(lambda x: (yield x), [1, 2, 3])
|
||||
|
||||
@@ -17,50 +17,3 @@ 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)
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
"""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,11 +23,3 @@ 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}"
|
||||
|
||||
@@ -13,11 +13,3 @@ 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,22 +106,4 @@ os.replace("src", "dst", src_dir_fd=1)
|
||||
os.replace("src", "dst", dst_dir_fd=2)
|
||||
|
||||
os.getcwd()
|
||||
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)
|
||||
os.getcwdb()
|
||||
@@ -192,24 +192,3 @@ 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,12 +190,3 @@ 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)
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
"""
|
||||
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,39 +151,3 @@ 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,9 +4,6 @@ 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,8 +44,3 @@ def f():
|
||||
def g():
|
||||
nonlocal x
|
||||
x = 2
|
||||
|
||||
# OK
|
||||
class A:
|
||||
def method(self):
|
||||
nonlocal __class__
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
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,10 +69,3 @@ 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,10 +118,3 @@ 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,19 +124,3 @@ 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,17 +102,3 @@ 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 +0,0 @@
|
||||
async def f(): yield from x # error
|
||||
@@ -1,11 +1,10 @@
|
||||
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, pyupgrade, ruff,
|
||||
pyflakes, pylint, ruff,
|
||||
};
|
||||
|
||||
/// Run lint rules over all deferred scopes in the [`SemanticModel`].
|
||||
@@ -46,7 +45,6 @@ pub(crate) fn deferred_scopes(checker: &Checker) {
|
||||
Rule::UnusedStaticMethodArgument,
|
||||
Rule::UnusedUnpackedVariable,
|
||||
Rule::UnusedVariable,
|
||||
Rule::UnnecessaryFutureImport,
|
||||
]) {
|
||||
return;
|
||||
}
|
||||
@@ -226,11 +224,6 @@ 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,9 +660,6 @@ 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);
|
||||
}
|
||||
@@ -673,9 +670,6 @@ 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);
|
||||
}
|
||||
@@ -1045,6 +1039,8 @@ 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,
|
||||
@@ -1052,6 +1048,7 @@ 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);
|
||||
}
|
||||
@@ -1123,15 +1120,6 @@ 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,
|
||||
@@ -1319,10 +1307,13 @@ pub(crate) fn expression(expr: &Expr, checker: &Checker) {
|
||||
pylint::rules::yield_in_init(checker, expr);
|
||||
}
|
||||
}
|
||||
Expr::YieldFrom(_) => {
|
||||
Expr::YieldFrom(yield_from) => {
|
||||
if checker.is_rule_enabled(Rule::YieldInInit) {
|
||||
pylint::rules::yield_in_init(checker, expr);
|
||||
}
|
||||
if checker.is_rule_enabled(Rule::YieldFromInAsyncFunction) {
|
||||
pylint::rules::yield_from_in_async_function(checker, yield_from);
|
||||
}
|
||||
}
|
||||
Expr::FString(f_string_expr @ ast::ExprFString { value, .. }) => {
|
||||
if checker.is_rule_enabled(Rule::FStringMissingPlaceholders) {
|
||||
|
||||
@@ -728,6 +728,13 @@ 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);
|
||||
}
|
||||
|
||||
@@ -71,9 +71,7 @@ use crate::registry::Rule;
|
||||
use crate::rules::pyflakes::rules::{
|
||||
LateFutureImport, ReturnOutsideFunction, YieldOutsideFunction,
|
||||
};
|
||||
use crate::rules::pylint::rules::{
|
||||
AwaitOutsideAsync, LoadBeforeGlobalDeclaration, YieldFromInAsyncFunction,
|
||||
};
|
||||
use crate::rules::pylint::rules::{AwaitOutsideAsync, LoadBeforeGlobalDeclaration};
|
||||
use crate::rules::{flake8_pyi, flake8_type_checking, pyflakes, pyupgrade};
|
||||
use crate::settings::rule_table::RuleTable;
|
||||
use crate::settings::{LinterSettings, TargetVersion, flags};
|
||||
@@ -670,12 +668,6 @@ impl SemanticSyntaxContext for Checker<'_> {
|
||||
self.report_diagnostic(AwaitOutsideAsync, error.range);
|
||||
}
|
||||
}
|
||||
SemanticSyntaxErrorKind::YieldFromInAsyncFunction => {
|
||||
// PLE1700
|
||||
if self.is_rule_enabled(Rule::YieldFromInAsyncFunction) {
|
||||
self.report_diagnostic(YieldFromInAsyncFunction, error.range);
|
||||
}
|
||||
}
|
||||
SemanticSyntaxErrorKind::ReboundComprehensionVariable
|
||||
| SemanticSyntaxErrorKind::DuplicateTypeParameter
|
||||
| SemanticSyntaxErrorKind::MultipleCaseAssignment(_)
|
||||
@@ -711,10 +703,7 @@ 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::DunderClassCell => {}
|
||||
ScopeKind::Generator { .. } | ScopeKind::Module | ScopeKind::Type => {}
|
||||
}
|
||||
}
|
||||
false
|
||||
@@ -725,10 +714,7 @@ impl SemanticSyntaxContext for Checker<'_> {
|
||||
match scope.kind {
|
||||
ScopeKind::Class(_) => return false,
|
||||
ScopeKind::Function(_) | ScopeKind::Lambda(_) => return true,
|
||||
ScopeKind::Generator { .. }
|
||||
| ScopeKind::Module
|
||||
| ScopeKind::Type
|
||||
| ScopeKind::DunderClassCell => {}
|
||||
ScopeKind::Generator { .. } | ScopeKind::Module | ScopeKind::Type => {}
|
||||
}
|
||||
}
|
||||
false
|
||||
@@ -739,7 +725,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::DunderClassCell => {}
|
||||
ScopeKind::Module | ScopeKind::Type => {}
|
||||
}
|
||||
}
|
||||
false
|
||||
@@ -1106,24 +1092,6 @@ 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 {
|
||||
@@ -1187,9 +1155,6 @@ 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,12 +336,10 @@ 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
|
||||
@@ -923,8 +921,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::rules::OsMkdir),
|
||||
(Flake8UsePathlib, "103") => (RuleGroup::Stable, rules::flake8_use_pathlib::rules::OsMakedirs),
|
||||
(Flake8UsePathlib, "102") => (RuleGroup::Stable, rules::flake8_use_pathlib::violations::OsMkdir),
|
||||
(Flake8UsePathlib, "103") => (RuleGroup::Stable, rules::flake8_use_pathlib::violations::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),
|
||||
@@ -956,7 +954,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::rules::OsSymlink),
|
||||
(Flake8UsePathlib, "211") => (RuleGroup::Preview, rules::flake8_use_pathlib::violations::OsSymlink),
|
||||
|
||||
// flake8-logging-format
|
||||
(Flake8LoggingFormat, "001") => (RuleGroup::Stable, rules::flake8_logging_format::violations::LoggingStringFormat),
|
||||
|
||||
@@ -58,3 +58,13 @@ 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()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1231,10 +1231,6 @@ mod tests {
|
||||
)]
|
||||
#[test_case(Rule::AwaitOutsideAsync, Path::new("await_outside_async_function.py"))]
|
||||
#[test_case(Rule::AwaitOutsideAsync, Path::new("async_comprehension.py"))]
|
||||
#[test_case(
|
||||
Rule::YieldFromInAsyncFunction,
|
||||
Path::new("yield_from_in_async_function.py")
|
||||
)]
|
||||
fn test_syntax_errors(rule: Rule, path: &Path) -> Result<()> {
|
||||
let snapshot = path.to_string_lossy().to_string();
|
||||
let path = Path::new("resources/test/fixtures/syntax_errors").join(path);
|
||||
|
||||
202
crates/ruff_linter/src/message/diff.rs
Normal file
202
crates/ruff_linter/src/message/diff.rs
Normal file
@@ -0,0 +1,202 @@
|
||||
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
|
||||
}
|
||||
174
crates/ruff_linter/src/message/gitlab.rs
Normal file
174
crates/ruff_linter/src/message/gitlab.rs
Normal file
@@ -0,0 +1,174 @@
|
||||
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,6 +10,7 @@ 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;
|
||||
|
||||
@@ -52,8 +53,8 @@ impl Emitter for GroupedEmitter {
|
||||
max_column_length = max_column_length.max(message.start_location.column);
|
||||
}
|
||||
|
||||
let row_length = max_row_length.digits();
|
||||
let column_length = max_column_length.digits();
|
||||
let row_length = calculate_print_width(max_row_length);
|
||||
let column_length = calculate_print_width(max_column_length);
|
||||
|
||||
// Print the filename.
|
||||
writeln!(writer, "{}:", relativize_path(&*filename).underline())?;
|
||||
@@ -130,7 +131,8 @@ impl Display for DisplayGroupedMessage<'_> {
|
||||
write!(
|
||||
f,
|
||||
" {row_padding}",
|
||||
row_padding = " ".repeat(self.row_length.get() - start_location.line.digits().get())
|
||||
row_padding = " "
|
||||
.repeat(self.row_length.get() - calculate_print_width(start_location.line).get())
|
||||
)?;
|
||||
|
||||
// Check if we're working on a jupyter notebook and translate positions with cell accordingly
|
||||
@@ -157,8 +159,9 @@ impl Display for DisplayGroupedMessage<'_> {
|
||||
f,
|
||||
"{row}{sep}{col}{col_padding} {code_and_body}",
|
||||
sep = ":".cyan(),
|
||||
col_padding =
|
||||
" ".repeat(self.column_length.get() - start_location.column.digits().get()),
|
||||
col_padding = " ".repeat(
|
||||
self.column_length.get() - calculate_print_width(start_location.column).get()
|
||||
),
|
||||
code_and_body = RuleCodeAndBody {
|
||||
message,
|
||||
show_fix_status: self.show_fix_status,
|
||||
|
||||
@@ -10,6 +10,7 @@ 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;
|
||||
@@ -20,7 +21,9 @@ pub use text::TextEmitter;
|
||||
use crate::Fix;
|
||||
use crate::registry::Rule;
|
||||
|
||||
mod diff;
|
||||
mod github;
|
||||
mod gitlab;
|
||||
mod grouped;
|
||||
mod sarif;
|
||||
mod text;
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
---
|
||||
source: crates/ruff_db/src/diagnostic/render/gitlab.rs
|
||||
expression: env.render_diagnostics(&diagnostics)
|
||||
source: crates/ruff_linter/src/message/gitlab.rs
|
||||
expression: redact_fingerprint(&content)
|
||||
---
|
||||
[
|
||||
{
|
||||
"check_name": "F401",
|
||||
"description": "F401: `os` imported but unused",
|
||||
"severity": "major",
|
||||
"fingerprint": "<redacted>",
|
||||
"location": {
|
||||
"path": "fib.py",
|
||||
"positions": {
|
||||
"begin": {
|
||||
"line": 1,
|
||||
"column": 8
|
||||
"column": 8,
|
||||
"line": 1
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
"column": 10,
|
||||
"line": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"line": 6,
|
||||
"column": 5
|
||||
"column": 5,
|
||||
"line": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 6
|
||||
"column": 6,
|
||||
"line": 6
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"severity": "major"
|
||||
},
|
||||
{
|
||||
"check_name": "F821",
|
||||
"description": "F821: Undefined name `a`",
|
||||
"severity": "major",
|
||||
"fingerprint": "<redacted>",
|
||||
"location": {
|
||||
"path": "undef.py",
|
||||
"positions": {
|
||||
"begin": {
|
||||
"line": 1,
|
||||
"column": 4
|
||||
"column": 4,
|
||||
"line": 1
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
"column": 5,
|
||||
"line": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"severity": "major"
|
||||
}
|
||||
]
|
||||
@@ -1,44 +1,44 @@
|
||||
---
|
||||
source: crates/ruff_db/src/diagnostic/render/gitlab.rs
|
||||
expression: env.render_diagnostics(&diagnostics)
|
||||
source: crates/ruff_linter/src/message/gitlab.rs
|
||||
expression: redact_fingerprint(&content)
|
||||
---
|
||||
[
|
||||
{
|
||||
"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": {
|
||||
"line": 1,
|
||||
"column": 15
|
||||
"column": 15,
|
||||
"line": 1
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 1
|
||||
"column": 1,
|
||||
"line": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"severity": "major"
|
||||
},
|
||||
{
|
||||
"check_name": "invalid-syntax",
|
||||
"description": "invalid-syntax: Expected ')', found newline",
|
||||
"severity": "major",
|
||||
"fingerprint": "<redacted>",
|
||||
"location": {
|
||||
"path": "syntax_errors.py",
|
||||
"positions": {
|
||||
"begin": {
|
||||
"line": 3,
|
||||
"column": 12
|
||||
"column": 12,
|
||||
"line": 3
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
"column": 1,
|
||||
"line": 4
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"severity": "major"
|
||||
}
|
||||
]
|
||||
@@ -1,19 +1,23 @@
|
||||
use std::io::Write;
|
||||
|
||||
use ruff_db::diagnostic::{
|
||||
Diagnostic, DiagnosticFormat, DisplayDiagnosticConfig, DisplayDiagnostics,
|
||||
};
|
||||
use ruff_diagnostics::Applicability;
|
||||
use ruff_db::diagnostic::{Diagnostic, DiagnosticFormat, DisplayDiagnosticConfig};
|
||||
|
||||
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)
|
||||
@@ -31,7 +35,7 @@ impl TextEmitter {
|
||||
|
||||
#[must_use]
|
||||
pub fn with_show_fix_diff(mut self, show_fix_diff: bool) -> Self {
|
||||
self.config = self.config.show_fix_diff(show_fix_diff);
|
||||
self.show_fix_diff = show_fix_diff;
|
||||
self
|
||||
}
|
||||
|
||||
@@ -46,8 +50,10 @@ impl TextEmitter {
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn with_fix_applicability(mut self, applicability: Applicability) -> Self {
|
||||
self.config = self.config.fix_applicability(applicability);
|
||||
pub fn with_unsafe_fixes(mut self, unsafe_fixes: UnsafeFixes) -> Self {
|
||||
self.config = self
|
||||
.config
|
||||
.fix_applicability(unsafe_fixes.required_applicability());
|
||||
self
|
||||
}
|
||||
|
||||
@@ -71,11 +77,15 @@ impl Emitter for TextEmitter {
|
||||
diagnostics: &[Diagnostic],
|
||||
context: &EmitterContext,
|
||||
) -> anyhow::Result<()> {
|
||||
write!(
|
||||
writer,
|
||||
"{}",
|
||||
DisplayDiagnostics::new(context, &self.config, diagnostics)
|
||||
)?;
|
||||
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}")?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -84,13 +94,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() {
|
||||
@@ -115,7 +125,7 @@ mod tests {
|
||||
let mut emitter = TextEmitter::default()
|
||||
.with_show_fix_status(true)
|
||||
.with_show_source(true)
|
||||
.with_fix_applicability(Applicability::Unsafe);
|
||||
.with_unsafe_fixes(UnsafeFixes::Enabled);
|
||||
let content = capture_emitter_output(&mut emitter, &create_diagnostics());
|
||||
|
||||
assert_snapshot!(content);
|
||||
@@ -126,7 +136,7 @@ mod tests {
|
||||
let mut emitter = TextEmitter::default()
|
||||
.with_show_fix_status(true)
|
||||
.with_show_source(true)
|
||||
.with_fix_applicability(Applicability::Unsafe);
|
||||
.with_unsafe_fixes(UnsafeFixes::Enabled);
|
||||
let (messages, notebook_indexes) = create_notebook_diagnostics();
|
||||
let content = capture_emitter_notebook_output(&mut emitter, &messages, ¬ebook_indexes);
|
||||
|
||||
|
||||
@@ -40,11 +40,6 @@ 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()
|
||||
@@ -164,21 +159,6 @@ 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 {
|
||||
@@ -255,8 +235,3 @@ pub(crate) const fn is_trailing_comma_type_params_enabled(settings: &LinterSetti
|
||||
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,10 +354,7 @@ impl Renamer {
|
||||
))
|
||||
}
|
||||
// Avoid renaming builtins and other "special" bindings.
|
||||
BindingKind::FutureImport
|
||||
| BindingKind::Builtin
|
||||
| BindingKind::Export(_)
|
||||
| BindingKind::DunderClassCell => None,
|
||||
BindingKind::FutureImport | BindingKind::Builtin | BindingKind::Export(_) => None,
|
||||
// By default, replace the binding's name with the target name.
|
||||
BindingKind::Annotation
|
||||
| BindingKind::Argument
|
||||
|
||||
@@ -37,6 +37,7 @@ pub(crate) enum Replacement {
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub(crate) enum ProviderReplacement {
|
||||
None,
|
||||
AutoImport {
|
||||
module: &'static str,
|
||||
name: &'static str,
|
||||
|
||||
@@ -46,7 +46,7 @@ pub(crate) struct AirflowDagNoScheduleArgument;
|
||||
impl Violation for AirflowDagNoScheduleArgument {
|
||||
#[derive_message_formats]
|
||||
fn message(&self) -> String {
|
||||
"`DAG` or `@dag` should have an explicit `schedule` argument".to_string()
|
||||
"DAG should have an explicit `schedule` argument".to_string()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,9 @@ impl Violation for Airflow3MovedToProvider<'_> {
|
||||
replacement,
|
||||
} = self;
|
||||
match replacement {
|
||||
ProviderReplacement::None => {
|
||||
format!("`{deprecated}` is removed in Airflow 3.0")
|
||||
}
|
||||
ProviderReplacement::AutoImport {
|
||||
name: _,
|
||||
module: _,
|
||||
@@ -82,6 +85,7 @@ impl Violation for Airflow3MovedToProvider<'_> {
|
||||
provider,
|
||||
version,
|
||||
} => Some((module, name.as_str(), provider, version)),
|
||||
ProviderReplacement::None => None,
|
||||
} {
|
||||
Some(format!(
|
||||
"Install `apache-airflow-providers-{provider}>={version}` and use `{name}` from `{module}` instead."
|
||||
@@ -1016,6 +1020,7 @@ fn check_names_moved_to_provider(checker: &Checker, expr: &Expr, ranged: TextRan
|
||||
provider: "postgres",
|
||||
version: "1.0.0",
|
||||
},
|
||||
["airflow", "operators", "postgres_operator", "Mapping"] => ProviderReplacement::None,
|
||||
|
||||
// apache-airflow-providers-presto
|
||||
["airflow", "hooks", "presto_hook", "PrestoHook"] => ProviderReplacement::AutoImport {
|
||||
@@ -1204,6 +1209,16 @@ fn check_names_moved_to_provider(checker: &Checker, expr: &Expr, ranged: TextRan
|
||||
ProviderReplacement::SourceModuleMovedToProvider { module, name, .. } => {
|
||||
(module, name.as_str())
|
||||
}
|
||||
ProviderReplacement::None => {
|
||||
checker.report_diagnostic(
|
||||
Airflow3MovedToProvider {
|
||||
deprecated: qualified_name,
|
||||
replacement,
|
||||
},
|
||||
ranged,
|
||||
);
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
if is_guarded_by_try_except(expr, module, name, checker.semantic()) {
|
||||
|
||||
@@ -704,7 +704,6 @@ fn check_name(checker: &Checker, expr: &Expr, range: TextRange) {
|
||||
["airflow", "operators", "subdag", ..] => {
|
||||
Replacement::Message("The whole `airflow.subdag` module has been removed.")
|
||||
}
|
||||
["airflow", "operators", "postgres_operator", "Mapping"] => Replacement::None,
|
||||
["airflow", "operators", "python", "get_current_context"] => Replacement::AutoImport {
|
||||
module: "airflow.sdk",
|
||||
name: "get_current_context",
|
||||
|
||||
@@ -65,6 +65,9 @@ impl Violation for Airflow3SuggestedToMoveToProvider<'_> {
|
||||
replacement,
|
||||
} = self;
|
||||
match replacement {
|
||||
ProviderReplacement::None => {
|
||||
format!("`{deprecated}` is removed in Airflow 3.0")
|
||||
}
|
||||
ProviderReplacement::AutoImport {
|
||||
name: _,
|
||||
module: _,
|
||||
@@ -88,6 +91,7 @@ impl Violation for Airflow3SuggestedToMoveToProvider<'_> {
|
||||
fn fix_title(&self) -> Option<String> {
|
||||
let Airflow3SuggestedToMoveToProvider { replacement, .. } = self;
|
||||
match replacement {
|
||||
ProviderReplacement::None => None,
|
||||
ProviderReplacement::AutoImport {
|
||||
module,
|
||||
name,
|
||||
@@ -211,12 +215,6 @@ 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",
|
||||
@@ -245,12 +243,6 @@ 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",
|
||||
@@ -315,6 +307,16 @@ fn check_names_moved_to_provider(checker: &Checker, expr: &Expr, ranged: TextRan
|
||||
ProviderReplacement::SourceModuleMovedToProvider { module, name, .. } => {
|
||||
(module, name.as_str())
|
||||
}
|
||||
ProviderReplacement::None => {
|
||||
checker.report_diagnostic(
|
||||
Airflow3SuggestedToMoveToProvider {
|
||||
deprecated: qualified_name,
|
||||
replacement: replacement.clone(),
|
||||
},
|
||||
ranged.range(),
|
||||
);
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
if is_guarded_by_try_except(expr, module, name, checker.semantic()) {
|
||||
|
||||
@@ -157,9 +157,6 @@ fn check_call_arguments(checker: &Checker, qualified_name: &QualifiedName, argum
|
||||
["airflow", .., "DAG" | "dag"] => {
|
||||
diagnostic_for_argument(checker, arguments, "sla_miss_callback", None);
|
||||
}
|
||||
["airflow", "timetables", "datasets", "DatasetOrTimeSchedule"] => {
|
||||
diagnostic_for_argument(checker, arguments, "datasets", Some("assets"));
|
||||
}
|
||||
segments => {
|
||||
if is_airflow_builtin_or_provider(segments, "operators", "Operator") {
|
||||
diagnostic_for_argument(checker, arguments, "sla", None);
|
||||
@@ -230,26 +227,13 @@ 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", "store", "attach"] => Replacement::SourceModuleMoved {
|
||||
["airflow", "io", "storage", "attach"] => Replacement::SourceModuleMoved {
|
||||
module: "airflow.sdk.io",
|
||||
name: "attach".to_string(),
|
||||
},
|
||||
@@ -261,10 +245,6 @@ 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
|
||||
[
|
||||
@@ -280,30 +260,16 @@ 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",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR002 `DAG` or `@dag` should have an explicit `schedule` argument
|
||||
AIR002 DAG should have an explicit `schedule` argument
|
||||
--> AIR002.py:4:1
|
||||
|
|
||||
2 | from airflow.timetables.simple import NullTimetable
|
||||
@@ -12,7 +12,7 @@ AIR002 `DAG` or `@dag` should have an explicit `schedule` argument
|
||||
6 | DAG(dag_id="class_schedule", schedule="@hourly")
|
||||
|
|
||||
|
||||
AIR002 `DAG` or `@dag` should have an explicit `schedule` argument
|
||||
AIR002 DAG should have an explicit `schedule` argument
|
||||
--> AIR002.py:13:2
|
||||
|
|
||||
13 | @dag()
|
||||
|
||||
@@ -12,14 +12,16 @@ AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
23 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
|
|
||||
help: Use `schedule` instead
|
||||
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 |
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:23:31
|
||||
@@ -30,14 +32,16 @@ AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
help: Use `schedule` instead
|
||||
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)
|
||||
|
||||
ℹ Safe fix
|
||||
20 20 |
|
||||
21 21 | DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
|
||||
22 22 |
|
||||
23 |-DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
23 |+DAG(dag_id="class_timetable", schedule=NullTimetable())
|
||||
24 24 |
|
||||
25 25 |
|
||||
26 26 | DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
|
||||
AIR301 [*] `fail_stop` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:26:31
|
||||
@@ -48,14 +52,16 @@ 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
|
||||
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 |
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR301 `default_view` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:28:34
|
||||
@@ -88,14 +94,16 @@ AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
43 | pass
|
||||
|
|
||||
help: Use `schedule` instead
|
||||
38 | pass
|
||||
39 |
|
||||
40 |
|
||||
- @dag(schedule_interval="0 * * * *")
|
||||
41 + @dag(schedule="0 * * * *")
|
||||
42 | def decorator_schedule_interval():
|
||||
43 | pass
|
||||
44 |
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:46:6
|
||||
@@ -106,14 +114,16 @@ AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
48 | pass
|
||||
|
|
||||
help: Use `schedule` instead
|
||||
43 | pass
|
||||
44 |
|
||||
45 |
|
||||
- @dag(timetable=NullTimetable())
|
||||
46 + @dag(schedule=NullTimetable())
|
||||
47 | def decorator_timetable():
|
||||
48 | pass
|
||||
49 |
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:54:62
|
||||
@@ -126,14 +136,16 @@ AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
56 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
|
|
||||
help: Use `logical_date` instead
|
||||
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"
|
||||
|
||||
ℹ 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"
|
||||
|
||||
AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:57:62
|
||||
@@ -145,14 +157,16 @@ AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
58 | )
|
||||
|
|
||||
help: Use `logical_date` instead
|
||||
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(
|
||||
|
||||
ℹ 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(
|
||||
|
||||
AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:61:33
|
||||
@@ -164,14 +178,16 @@ AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
|
|
||||
help: Use `use_task_logical_date` instead
|
||||
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",
|
||||
|
||||
ℹ 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",
|
||||
|
||||
AIR301 [*] `task_concurrency` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:61:62
|
||||
@@ -183,14 +199,16 @@ AIR301 [*] `task_concurrency` is removed in Airflow 3.0
|
||||
63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
|
|
||||
help: Use `max_active_tis_per_dag` instead
|
||||
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",
|
||||
|
||||
ℹ 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",
|
||||
|
||||
AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:65:9
|
||||
@@ -203,14 +221,16 @@ AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
67 | )
|
||||
|
|
||||
help: Use `use_task_logical_date` instead
|
||||
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 |
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:92:9
|
||||
@@ -222,14 +242,16 @@ AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
93 | )
|
||||
|
|
||||
help: Use `use_task_logical_date` instead
|
||||
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
|
||||
|
||||
ℹ Safe fix
|
||||
89 89 | follow_task_ids_if_false=None,
|
||||
90 90 | follow_task_ids_if_true=None,
|
||||
91 91 | week_day=1,
|
||||
92 |- use_task_execution_day=True,
|
||||
92 |+ use_task_logical_date=True,
|
||||
93 93 | )
|
||||
94 94 |
|
||||
95 95 | trigger_dagrun_op >> trigger_dagrun_op2
|
||||
|
||||
AIR301 `filename_template` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:102:15
|
||||
|
||||
@@ -11,14 +11,16 @@ AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
26 | dataset_from_root.iter_dataset_aliases()
|
||||
|
|
||||
help: Use `iter_assets` instead
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:26:19
|
||||
@@ -31,14 +33,16 @@ AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
28 | # airflow.datasets
|
||||
|
|
||||
help: Use `iter_asset_aliases` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:30:29
|
||||
@@ -50,14 +54,16 @@ AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
31 | dataset_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
||||
help: Use `iter_assets` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:31:29
|
||||
@@ -70,14 +76,16 @@ AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
33 | alias_to_test_method_call = DatasetAlias()
|
||||
|
|
||||
help: Use `iter_asset_aliases` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:34:27
|
||||
@@ -88,14 +96,16 @@ AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
35 | alias_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
||||
help: Use `iter_assets` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:35:27
|
||||
@@ -108,14 +118,16 @@ AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
37 | any_to_test_method_call = DatasetAny()
|
||||
|
|
||||
help: Use `iter_asset_aliases` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:38:25
|
||||
@@ -126,14 +138,16 @@ AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
39 | any_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
||||
help: Use `iter_assets` instead
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:39:25
|
||||
@@ -146,14 +160,16 @@ AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
41 | # airflow.datasets.manager
|
||||
|
|
||||
help: Use `iter_asset_aliases` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `airflow.datasets.manager.DatasetManager` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:42:6
|
||||
@@ -165,22 +181,24 @@ AIR301 [*] `airflow.datasets.manager.DatasetManager` is removed in Airflow 3.0
|
||||
44 | dm.create_datasets()
|
||||
|
|
||||
help: Use `AssetManager` from `airflow.assets.manager` instead.
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
--------------------------------------------------------------------------------
|
||||
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()
|
||||
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()
|
||||
|
||||
AIR301 [*] `register_dataset_change` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:43:4
|
||||
@@ -193,14 +211,16 @@ AIR301 [*] `register_dataset_change` is removed in Airflow 3.0
|
||||
45 | dm.notify_dataset_created()
|
||||
|
|
||||
help: Use `register_asset_change` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `create_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:44:4
|
||||
@@ -213,14 +233,16 @@ AIR301 [*] `create_datasets` is removed in Airflow 3.0
|
||||
46 | dm.notify_dataset_changed()
|
||||
|
|
||||
help: Use `create_assets` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `notify_dataset_created` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:45:4
|
||||
@@ -233,14 +255,16 @@ AIR301 [*] `notify_dataset_created` is removed in Airflow 3.0
|
||||
47 | dm.notify_dataset_alias_created()
|
||||
|
|
||||
help: Use `notify_asset_created` instead
|
||||
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 |
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR301 [*] `notify_dataset_changed` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:46:4
|
||||
@@ -252,14 +276,16 @@ AIR301 [*] `notify_dataset_changed` is removed in Airflow 3.0
|
||||
47 | dm.notify_dataset_alias_created()
|
||||
|
|
||||
help: Use `notify_asset_changed` instead
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
AIR301 [*] `notify_dataset_alias_created` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:47:4
|
||||
@@ -272,14 +298,16 @@ AIR301 [*] `notify_dataset_alias_created` is removed in Airflow 3.0
|
||||
49 | # airflow.lineage.hook
|
||||
|
|
||||
help: Use `notify_asset_alias_created` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `airflow.lineage.hook.DatasetLineageInfo` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:50:11
|
||||
@@ -290,23 +318,25 @@ AIR301 [*] `airflow.lineage.hook.DatasetLineageInfo` is removed in Airflow 3.0
|
||||
51 | dl_info.dataset
|
||||
|
|
||||
help: Use `AssetLineageInfo` from `airflow.lineage.hook` instead.
|
||||
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 (
|
||||
|
||||
ℹ 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 (
|
||||
--------------------------------------------------------------------------------
|
||||
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()
|
||||
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()
|
||||
|
||||
AIR301 [*] `dataset` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:51:9
|
||||
@@ -319,14 +349,16 @@ AIR301 [*] `dataset` is removed in Airflow 3.0
|
||||
53 | hlc = HookLineageCollector()
|
||||
|
|
||||
help: Use `asset` instead
|
||||
48 |
|
||||
49 | # airflow.lineage.hook
|
||||
50 | dl_info = DatasetLineageInfo()
|
||||
- dl_info.dataset
|
||||
51 + dl_info.asset
|
||||
52 |
|
||||
53 | hlc = HookLineageCollector()
|
||||
54 | hlc.create_dataset()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `create_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:54:5
|
||||
@@ -338,14 +370,16 @@ AIR301 [*] `create_dataset` is removed in Airflow 3.0
|
||||
56 | hlc.add_output_dataset()
|
||||
|
|
||||
help: Use `create_asset` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `add_input_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:55:5
|
||||
@@ -358,14 +392,16 @@ AIR301 [*] `add_input_dataset` is removed in Airflow 3.0
|
||||
57 | hlc.collected_datasets()
|
||||
|
|
||||
help: Use `add_input_asset` instead
|
||||
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 |
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR301 [*] `add_output_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:56:5
|
||||
@@ -377,14 +413,16 @@ AIR301 [*] `add_output_dataset` is removed in Airflow 3.0
|
||||
57 | hlc.collected_datasets()
|
||||
|
|
||||
help: Use `add_output_asset` instead
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
AIR301 [*] `collected_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:57:5
|
||||
@@ -397,14 +435,16 @@ AIR301 [*] `collected_datasets` is removed in Airflow 3.0
|
||||
59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
|
|
||||
help: Use `collected_assets` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `is_authorized_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:61:5
|
||||
@@ -417,14 +457,16 @@ AIR301 [*] `is_authorized_dataset` is removed in Airflow 3.0
|
||||
63 | # airflow.providers.apache.beam.hooks
|
||||
|
|
||||
help: Use `is_authorized_asset` instead
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:73:13
|
||||
@@ -436,14 +478,16 @@ AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
74 | csm_backend.get_connections()
|
||||
|
|
||||
help: Use `get_conn_value` instead
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:74:13
|
||||
@@ -456,14 +500,16 @@ AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
76 | # airflow.providers.hashicorp.secrets.vault
|
||||
|
|
||||
help: Use `get_connection` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:78:15
|
||||
@@ -475,14 +521,16 @@ AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
79 | vault_backend.get_connections()
|
||||
|
|
||||
help: Use `get_conn_value` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:79:15
|
||||
@@ -495,14 +543,16 @@ AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
81 | not_an_error = NotAir302SecretError()
|
||||
|
|
||||
help: Use `get_connection` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `initialize_providers_dataset_uri_resources` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:86:4
|
||||
@@ -515,14 +565,16 @@ AIR301 [*] `initialize_providers_dataset_uri_resources` is removed in Airflow 3.
|
||||
88 | pm.dataset_uri_handlers
|
||||
|
|
||||
help: Use `initialize_providers_asset_uri_resources` instead
|
||||
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
|
||||
|
||||
ℹ Safe fix
|
||||
83 83 |
|
||||
84 84 | # airflow.providers_manager
|
||||
85 85 | pm = ProvidersManager()
|
||||
86 |-pm.initialize_providers_dataset_uri_resources()
|
||||
86 |+pm.initialize_providers_asset_uri_resources()
|
||||
87 87 | pm.dataset_factories
|
||||
88 88 | pm.dataset_uri_handlers
|
||||
89 89 | pm.dataset_to_openlineage_converters
|
||||
|
||||
AIR301 [*] `dataset_factories` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:87:4
|
||||
@@ -535,14 +587,16 @@ AIR301 [*] `dataset_factories` is removed in Airflow 3.0
|
||||
89 | pm.dataset_to_openlineage_converters
|
||||
|
|
||||
help: Use `asset_factories` instead
|
||||
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 |
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR301 [*] `dataset_uri_handlers` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:88:4
|
||||
@@ -554,14 +608,16 @@ AIR301 [*] `dataset_uri_handlers` is removed in Airflow 3.0
|
||||
89 | pm.dataset_to_openlineage_converters
|
||||
|
|
||||
help: Use `asset_uri_handlers` instead
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
AIR301 [*] `dataset_to_openlineage_converters` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:89:4
|
||||
@@ -574,14 +630,16 @@ AIR301 [*] `dataset_to_openlineage_converters` is removed in Airflow 3.0
|
||||
91 | # airflow.secrets.base_secrets
|
||||
|
|
||||
help: Use `asset_to_openlineage_converters` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:93:21
|
||||
@@ -593,14 +651,16 @@ AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
94 | base_secret_backend.get_connections()
|
||||
|
|
||||
help: Use `get_conn_value` instead
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:94:21
|
||||
@@ -613,14 +673,16 @@ AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
96 | # airflow.secrets.local_filesystem
|
||||
|
|
||||
help: Use `get_connection` instead
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:98:5
|
||||
@@ -631,8 +693,10 @@ AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Use `get_connection` instead
|
||||
95 |
|
||||
96 | # airflow.secrets.local_filesystem
|
||||
97 | lfb = LocalFilesystemBackend()
|
||||
- lfb.get_connections()
|
||||
98 + lfb.get_connection()
|
||||
|
||||
ℹ Safe fix
|
||||
95 95 |
|
||||
96 96 | # airflow.secrets.local_filesystem
|
||||
97 97 | lfb = LocalFilesystemBackend()
|
||||
98 |-lfb.get_connections()
|
||||
98 |+lfb.get_connection()
|
||||
|
||||
@@ -337,14 +337,16 @@ AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
113 | template_searchpath=["/templates"],
|
||||
|
|
||||
help: Use `schedule` instead
|
||||
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:
|
||||
|
||||
ℹ 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:
|
||||
|
||||
AIR301 `next_ds` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:135:23
|
||||
|
||||
@@ -2,362 +2,351 @@
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR301 `airflow.PY36` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:40:1
|
||||
--> AIR301_names.py:39:1
|
||||
|
|
||||
39 | # airflow root
|
||||
40 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
38 | # airflow root
|
||||
39 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
| ^^^^
|
||||
41 |
|
||||
42 | # airflow.api_connexion.security
|
||||
40 |
|
||||
41 | # airflow.api_connexion.security
|
||||
|
|
||||
help: Use `sys.version_info` instead
|
||||
|
||||
AIR301 `airflow.PY37` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:40:7
|
||||
--> AIR301_names.py:39:7
|
||||
|
|
||||
39 | # airflow root
|
||||
40 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
38 | # airflow root
|
||||
39 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
| ^^^^
|
||||
41 |
|
||||
42 | # airflow.api_connexion.security
|
||||
40 |
|
||||
41 | # airflow.api_connexion.security
|
||||
|
|
||||
help: Use `sys.version_info` instead
|
||||
|
||||
AIR301 `airflow.PY38` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:40:13
|
||||
--> AIR301_names.py:39:13
|
||||
|
|
||||
39 | # airflow root
|
||||
40 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
38 | # airflow root
|
||||
39 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
| ^^^^
|
||||
41 |
|
||||
42 | # airflow.api_connexion.security
|
||||
40 |
|
||||
41 | # airflow.api_connexion.security
|
||||
|
|
||||
help: Use `sys.version_info` instead
|
||||
|
||||
AIR301 `airflow.PY39` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:40:19
|
||||
--> AIR301_names.py:39:19
|
||||
|
|
||||
39 | # airflow root
|
||||
40 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
38 | # airflow root
|
||||
39 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
| ^^^^
|
||||
41 |
|
||||
42 | # airflow.api_connexion.security
|
||||
40 |
|
||||
41 | # airflow.api_connexion.security
|
||||
|
|
||||
help: Use `sys.version_info` instead
|
||||
|
||||
AIR301 `airflow.PY310` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:40:25
|
||||
--> AIR301_names.py:39:25
|
||||
|
|
||||
39 | # airflow root
|
||||
40 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
38 | # airflow root
|
||||
39 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
| ^^^^^
|
||||
41 |
|
||||
42 | # airflow.api_connexion.security
|
||||
40 |
|
||||
41 | # airflow.api_connexion.security
|
||||
|
|
||||
help: Use `sys.version_info` instead
|
||||
|
||||
AIR301 `airflow.PY311` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:40:32
|
||||
--> AIR301_names.py:39:32
|
||||
|
|
||||
39 | # airflow root
|
||||
40 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
38 | # airflow root
|
||||
39 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
| ^^^^^
|
||||
41 |
|
||||
42 | # airflow.api_connexion.security
|
||||
40 |
|
||||
41 | # airflow.api_connexion.security
|
||||
|
|
||||
help: Use `sys.version_info` instead
|
||||
|
||||
AIR301 `airflow.PY312` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:40:39
|
||||
--> AIR301_names.py:39:39
|
||||
|
|
||||
39 | # airflow root
|
||||
40 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
38 | # airflow root
|
||||
39 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
| ^^^^^
|
||||
41 |
|
||||
42 | # airflow.api_connexion.security
|
||||
40 |
|
||||
41 | # airflow.api_connexion.security
|
||||
|
|
||||
help: Use `sys.version_info` instead
|
||||
|
||||
AIR301 `airflow.api_connexion.security.requires_access` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:43:1
|
||||
--> AIR301_names.py:42:1
|
||||
|
|
||||
42 | # airflow.api_connexion.security
|
||||
43 | requires_access
|
||||
41 | # airflow.api_connexion.security
|
||||
42 | requires_access
|
||||
| ^^^^^^^^^^^^^^^
|
||||
44 |
|
||||
45 | # airflow.contrib.*
|
||||
43 |
|
||||
44 | # airflow.contrib.*
|
||||
|
|
||||
help: Use `airflow.api_fastapi.core_api.security.requires_access_*` instead
|
||||
|
||||
AIR301 `airflow.contrib.aws_athena_hook.AWSAthenaHook` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:46:1
|
||||
--> AIR301_names.py:45:1
|
||||
|
|
||||
45 | # airflow.contrib.*
|
||||
46 | AWSAthenaHook()
|
||||
44 | # airflow.contrib.*
|
||||
45 | AWSAthenaHook()
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
help: The whole `airflow.contrib` module has been removed.
|
||||
|
||||
AIR301 `airflow.datasets.DatasetAliasEvent` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:50:1
|
||||
--> AIR301_names.py:49:1
|
||||
|
|
||||
49 | # airflow.datasets
|
||||
50 | DatasetAliasEvent()
|
||||
48 | # airflow.datasets
|
||||
49 | DatasetAliasEvent()
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
AIR301 `airflow.operators.subdag.SubDagOperator` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:54:1
|
||||
--> AIR301_names.py:53:1
|
||||
|
|
||||
53 | # airflow.operators.subdag.*
|
||||
54 | SubDagOperator()
|
||||
52 | # airflow.operators.subdag.*
|
||||
53 | SubDagOperator()
|
||||
| ^^^^^^^^^^^^^^
|
||||
55 |
|
||||
56 | # airflow.operators.postgres_operator
|
||||
|
|
||||
help: The whole `airflow.subdag` module has been removed.
|
||||
|
||||
AIR301 `airflow.operators.postgres_operator.Mapping` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:57:1
|
||||
|
|
||||
56 | # airflow.operators.postgres_operator
|
||||
57 | Mapping()
|
||||
| ^^^^^^^
|
||||
58 |
|
||||
59 | # airflow.secrets
|
||||
|
|
||||
|
||||
AIR301 [*] `airflow.secrets.cache.SecretCache` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:64:1
|
||||
--> AIR301_names.py:61:1
|
||||
|
|
||||
63 | # airflow.secrets.cache
|
||||
64 | SecretCache()
|
||||
60 | # airflow.secrets.cache
|
||||
61 | SecretCache()
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
help: Use `SecretCache` from `airflow.sdk` instead.
|
||||
14 | from airflow.datasets import DatasetAliasEvent
|
||||
15 | from airflow.operators.postgres_operator import Mapping
|
||||
16 | from airflow.operators.subdag import SubDagOperator
|
||||
- from airflow.secrets.cache import SecretCache
|
||||
17 | from airflow.secrets.local_filesystem import LocalFilesystemBackend
|
||||
18 | from airflow.triggers.external_task import TaskStateTrigger
|
||||
19 | from airflow.utils import dates
|
||||
|
||||
ℹ 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
|
||||
--------------------------------------------------------------------------------
|
||||
34 | from airflow.utils.trigger_rule import TriggerRule
|
||||
35 | from airflow.www.auth import has_access, has_access_dataset
|
||||
36 | from airflow.www.utils import get_sensitive_variables_fields, should_hide_value_for_key
|
||||
37 + from airflow.sdk import SecretCache
|
||||
38 |
|
||||
39 | # airflow root
|
||||
40 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
note: This is an unsafe fix and may change runtime behavior
|
||||
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
|
||||
|
||||
AIR301 `airflow.triggers.external_task.TaskStateTrigger` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:65:1
|
||||
|
|
||||
64 | # airflow.triggers.external_task
|
||||
65 | TaskStateTrigger()
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
66 |
|
||||
67 | # airflow.utils.date
|
||||
|
|
||||
|
||||
AIR301 `airflow.utils.dates.date_range` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:68:1
|
||||
|
|
||||
67 | # airflow.triggers.external_task
|
||||
68 | TaskStateTrigger()
|
||||
67 | # airflow.utils.date
|
||||
68 | dates.date_range
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
69 |
|
||||
70 | # airflow.utils.date
|
||||
69 | dates.days_ago
|
||||
|
|
||||
|
||||
AIR301 `airflow.utils.dates.days_ago` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:69:1
|
||||
|
|
||||
67 | # airflow.utils.date
|
||||
68 | dates.date_range
|
||||
69 | dates.days_ago
|
||||
| ^^^^^^^^^^^^^^
|
||||
70 |
|
||||
71 | date_range
|
||||
|
|
||||
help: Use `pendulum.today('UTC').add(days=-N, ...)` instead
|
||||
|
||||
AIR301 `airflow.utils.dates.date_range` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:71:1
|
||||
|
|
||||
70 | # airflow.utils.date
|
||||
71 | dates.date_range
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
72 | dates.days_ago
|
||||
69 | dates.days_ago
|
||||
70 |
|
||||
71 | date_range
|
||||
| ^^^^^^^^^^
|
||||
72 | days_ago
|
||||
73 | infer_time_unit
|
||||
|
|
||||
|
||||
AIR301 `airflow.utils.dates.days_ago` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:72:1
|
||||
|
|
||||
70 | # airflow.utils.date
|
||||
71 | dates.date_range
|
||||
72 | dates.days_ago
|
||||
| ^^^^^^^^^^^^^^
|
||||
73 |
|
||||
74 | date_range
|
||||
|
|
||||
help: Use `pendulum.today('UTC').add(days=-N, ...)` instead
|
||||
|
||||
AIR301 `airflow.utils.dates.date_range` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:74:1
|
||||
|
|
||||
72 | dates.days_ago
|
||||
73 |
|
||||
74 | date_range
|
||||
| ^^^^^^^^^^
|
||||
75 | days_ago
|
||||
76 | infer_time_unit
|
||||
|
|
||||
|
||||
AIR301 `airflow.utils.dates.days_ago` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:75:1
|
||||
|
|
||||
74 | date_range
|
||||
75 | days_ago
|
||||
71 | date_range
|
||||
72 | days_ago
|
||||
| ^^^^^^^^
|
||||
76 | infer_time_unit
|
||||
77 | parse_execution_date
|
||||
73 | infer_time_unit
|
||||
74 | parse_execution_date
|
||||
|
|
||||
help: Use `pendulum.today('UTC').add(days=-N, ...)` instead
|
||||
|
||||
AIR301 `airflow.utils.dates.infer_time_unit` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:76:1
|
||||
--> AIR301_names.py:73:1
|
||||
|
|
||||
74 | date_range
|
||||
75 | days_ago
|
||||
76 | infer_time_unit
|
||||
71 | date_range
|
||||
72 | days_ago
|
||||
73 | infer_time_unit
|
||||
| ^^^^^^^^^^^^^^^
|
||||
77 | parse_execution_date
|
||||
78 | round_time
|
||||
74 | parse_execution_date
|
||||
75 | round_time
|
||||
|
|
||||
|
||||
AIR301 `airflow.utils.dates.parse_execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:77:1
|
||||
--> AIR301_names.py:74:1
|
||||
|
|
||||
75 | days_ago
|
||||
76 | infer_time_unit
|
||||
77 | parse_execution_date
|
||||
72 | days_ago
|
||||
73 | infer_time_unit
|
||||
74 | parse_execution_date
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
78 | round_time
|
||||
79 | scale_time_units
|
||||
75 | round_time
|
||||
76 | scale_time_units
|
||||
|
|
||||
|
||||
AIR301 `airflow.utils.dates.round_time` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:78:1
|
||||
--> AIR301_names.py:75:1
|
||||
|
|
||||
76 | infer_time_unit
|
||||
77 | parse_execution_date
|
||||
78 | round_time
|
||||
73 | infer_time_unit
|
||||
74 | parse_execution_date
|
||||
75 | round_time
|
||||
| ^^^^^^^^^^
|
||||
79 | scale_time_units
|
||||
76 | scale_time_units
|
||||
|
|
||||
|
||||
AIR301 `airflow.utils.dates.scale_time_units` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:79:1
|
||||
--> AIR301_names.py:76:1
|
||||
|
|
||||
77 | parse_execution_date
|
||||
78 | round_time
|
||||
79 | scale_time_units
|
||||
74 | parse_execution_date
|
||||
75 | round_time
|
||||
76 | scale_time_units
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
80 |
|
||||
81 | # This one was not deprecated.
|
||||
77 |
|
||||
78 | # This one was not deprecated.
|
||||
|
|
||||
|
||||
AIR301 `airflow.utils.dag_cycle_tester.test_cycle` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:86:1
|
||||
--> AIR301_names.py:83:1
|
||||
|
|
||||
85 | # airflow.utils.dag_cycle_tester
|
||||
86 | test_cycle
|
||||
82 | # airflow.utils.dag_cycle_tester
|
||||
83 | test_cycle
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
|
||||
AIR301 `airflow.utils.db.create_session` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:90:1
|
||||
--> AIR301_names.py:87:1
|
||||
|
|
||||
89 | # airflow.utils.db
|
||||
90 | create_session
|
||||
86 | # airflow.utils.db
|
||||
87 | create_session
|
||||
| ^^^^^^^^^^^^^^
|
||||
91 |
|
||||
92 | # airflow.utils.decorators
|
||||
88 |
|
||||
89 | # airflow.utils.decorators
|
||||
|
|
||||
|
||||
AIR301 `airflow.utils.decorators.apply_defaults` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:93:1
|
||||
--> AIR301_names.py:90:1
|
||||
|
|
||||
92 | # airflow.utils.decorators
|
||||
93 | apply_defaults
|
||||
89 | # airflow.utils.decorators
|
||||
90 | apply_defaults
|
||||
| ^^^^^^^^^^^^^^
|
||||
94 |
|
||||
95 | # airflow.utils.file
|
||||
91 |
|
||||
92 | # airflow.utils.file
|
||||
|
|
||||
help: `apply_defaults` is now unconditionally done and can be safely removed.
|
||||
|
||||
AIR301 `airflow.utils.file.mkdirs` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:96:1
|
||||
--> AIR301_names.py:93:1
|
||||
|
|
||||
95 | # airflow.utils.file
|
||||
96 | mkdirs
|
||||
92 | # airflow.utils.file
|
||||
93 | mkdirs
|
||||
| ^^^^^^
|
||||
|
|
||||
help: Use `pathlib.Path({path}).mkdir` instead
|
||||
|
||||
AIR301 `airflow.utils.state.SHUTDOWN` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:100:1
|
||||
|
|
||||
99 | # airflow.utils.state
|
||||
100 | SHUTDOWN
|
||||
| ^^^^^^^^
|
||||
101 | terminating_states
|
||||
|
|
||||
--> AIR301_names.py:97:1
|
||||
|
|
||||
96 | # airflow.utils.state
|
||||
97 | SHUTDOWN
|
||||
| ^^^^^^^^
|
||||
98 | terminating_states
|
||||
|
|
||||
|
||||
AIR301 `airflow.utils.state.terminating_states` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:101:1
|
||||
--> AIR301_names.py:98:1
|
||||
|
|
||||
99 | # airflow.utils.state
|
||||
100 | SHUTDOWN
|
||||
101 | terminating_states
|
||||
96 | # airflow.utils.state
|
||||
97 | SHUTDOWN
|
||||
98 | terminating_states
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
102 |
|
||||
103 | # airflow.utils.trigger_rule
|
||||
99 |
|
||||
100 | # airflow.utils.trigger_rule
|
||||
|
|
||||
|
||||
AIR301 `airflow.utils.trigger_rule.TriggerRule.DUMMY` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:104:1
|
||||
--> AIR301_names.py:101:1
|
||||
|
|
||||
103 | # airflow.utils.trigger_rule
|
||||
104 | TriggerRule.DUMMY
|
||||
100 | # airflow.utils.trigger_rule
|
||||
101 | TriggerRule.DUMMY
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
105 | TriggerRule.NONE_FAILED_OR_SKIPPED
|
||||
102 | TriggerRule.NONE_FAILED_OR_SKIPPED
|
||||
|
|
||||
|
||||
AIR301 `airflow.utils.trigger_rule.TriggerRule.NONE_FAILED_OR_SKIPPED` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:105:1
|
||||
--> AIR301_names.py:102:1
|
||||
|
|
||||
103 | # airflow.utils.trigger_rule
|
||||
104 | TriggerRule.DUMMY
|
||||
105 | TriggerRule.NONE_FAILED_OR_SKIPPED
|
||||
100 | # airflow.utils.trigger_rule
|
||||
101 | TriggerRule.DUMMY
|
||||
102 | TriggerRule.NONE_FAILED_OR_SKIPPED
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
AIR301 `airflow.www.auth.has_access` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:109:1
|
||||
--> AIR301_names.py:106:1
|
||||
|
|
||||
108 | # airflow.www.auth
|
||||
109 | has_access
|
||||
105 | # airflow.www.auth
|
||||
106 | has_access
|
||||
| ^^^^^^^^^^
|
||||
110 | has_access_dataset
|
||||
107 | has_access_dataset
|
||||
|
|
||||
|
||||
AIR301 `airflow.www.auth.has_access_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:110:1
|
||||
--> AIR301_names.py:107:1
|
||||
|
|
||||
108 | # airflow.www.auth
|
||||
109 | has_access
|
||||
110 | has_access_dataset
|
||||
105 | # airflow.www.auth
|
||||
106 | has_access
|
||||
107 | has_access_dataset
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
111 |
|
||||
112 | # airflow.www.utils
|
||||
108 |
|
||||
109 | # airflow.www.utils
|
||||
|
|
||||
|
||||
AIR301 `airflow.www.utils.get_sensitive_variables_fields` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:113:1
|
||||
--> AIR301_names.py:110:1
|
||||
|
|
||||
112 | # airflow.www.utils
|
||||
113 | get_sensitive_variables_fields
|
||||
109 | # airflow.www.utils
|
||||
110 | get_sensitive_variables_fields
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
114 | should_hide_value_for_key
|
||||
111 | should_hide_value_for_key
|
||||
|
|
||||
|
||||
AIR301 `airflow.www.utils.should_hide_value_for_key` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:114:1
|
||||
--> AIR301_names.py:111:1
|
||||
|
|
||||
112 | # airflow.www.utils
|
||||
113 | get_sensitive_variables_fields
|
||||
114 | should_hide_value_for_key
|
||||
109 | # airflow.www.utils
|
||||
110 | get_sensitive_variables_fields
|
||||
111 | should_hide_value_for_key
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -12,14 +12,16 @@ 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.
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `airflow.providers.openlineage.utils.utils.DatasetInfo` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:14:1
|
||||
@@ -30,22 +32,24 @@ AIR301 [*] `airflow.providers.openlineage.utils.utils.DatasetInfo` is removed in
|
||||
15 | translate_airflow_dataset()
|
||||
|
|
||||
help: Use `AssetInfo` from `airflow.providers.openlineage.utils.utils` instead.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
--------------------------------------------------------------------------------
|
||||
12 | AvpEntities.DATASET
|
||||
13 |
|
||||
14 | # airflow.providers.openlineage.utils.utils
|
||||
- DatasetInfo()
|
||||
15 + AssetInfo()
|
||||
16 | translate_airflow_dataset()
|
||||
17 |
|
||||
18 | # airflow.secrets.local_filesystem
|
||||
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
|
||||
|
||||
AIR301 [*] `airflow.providers.openlineage.utils.utils.translate_airflow_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:15:1
|
||||
@@ -58,22 +62,24 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
--------------------------------------------------------------------------------
|
||||
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()
|
||||
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()
|
||||
|
||||
AIR301 [*] `airflow.secrets.local_filesystem.load_connections` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:18:1
|
||||
@@ -85,23 +91,25 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
--------------------------------------------------------------------------------
|
||||
15 | translate_airflow_dataset()
|
||||
16 |
|
||||
17 | # airflow.secrets.local_filesystem
|
||||
- load_connections()
|
||||
18 + load_connections_dict()
|
||||
19 |
|
||||
20 | # airflow.security.permissions
|
||||
21 | RESOURCE_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
|
||||
|
||||
AIR301 [*] `airflow.security.permissions.RESOURCE_DATASET` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:21:1
|
||||
@@ -113,23 +121,25 @@ 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.
|
||||
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 |
|
||||
|
||||
ℹ 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 |
|
||||
--------------------------------------------------------------------------------
|
||||
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,
|
||||
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,
|
||||
|
||||
AIR301 [*] `airflow.providers.amazon.aws.datasets.s3.create_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:28:1
|
||||
@@ -141,16 +151,18 @@ 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.
|
||||
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 (
|
||||
|
||||
ℹ 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 (
|
||||
|
||||
AIR301 [*] `airflow.providers.amazon.aws.datasets.s3.convert_dataset_to_openlineage` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:29:1
|
||||
@@ -162,17 +174,19 @@ 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.
|
||||
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,
|
||||
|
||||
ℹ 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,
|
||||
|
||||
AIR301 [*] `airflow.providers.google.datasets.bigquery.create_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:45:1
|
||||
@@ -185,16 +199,18 @@ 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.
|
||||
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 (
|
||||
|
||||
ℹ 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 (
|
||||
|
||||
AIR301 [*] `airflow.providers.google.datasets.gcs.create_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:53:1
|
||||
@@ -206,14 +222,16 @@ 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.
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR301 [*] `airflow.providers.google.datasets.gcs.convert_dataset_to_openlineage` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:54:1
|
||||
@@ -223,11 +241,13 @@ AIR301 [*] `airflow.providers.google.datasets.gcs.convert_dataset_to_openlineage
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: Use `convert_asset_to_openlineage` from `airflow.providers.google.assets.gcs` instead.
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
@@ -11,22 +11,23 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
--------------------------------------------------------------------------------
|
||||
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
|
||||
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()
|
||||
|
||||
AIR302 [*] `airflow.hooks.S3_hook.provide_bucket_name` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:15:1
|
||||
@@ -38,22 +39,23 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
--------------------------------------------------------------------------------
|
||||
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
|
||||
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()
|
||||
|
||||
AIR302 [*] `airflow.operators.gcs_to_s3.GCSToS3Operator` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:17:1
|
||||
@@ -66,20 +68,21 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.google_api_to_s3_transfer.GoogleApiToS3Operator` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:18:1
|
||||
@@ -91,19 +94,20 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.redshift_to_s3_operator.RedshiftToS3Operator` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:19:1
|
||||
@@ -116,18 +120,19 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.s3_file_transform_operator.S3FileTransformOperator` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:20:1
|
||||
@@ -140,17 +145,18 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.s3_to_redshift_operator.S3ToRedshiftOperator` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:21:1
|
||||
@@ -162,16 +168,17 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.sensors.s3_key_sensor.S3KeySensor` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:22:1
|
||||
@@ -184,15 +191,16 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.google_api_to_s3_transfer.GoogleApiToS3Transfer` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:26:1
|
||||
@@ -205,14 +213,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.operators.redshift_to_s3_operator.RedshiftToS3Transfer` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:30:1
|
||||
@@ -225,14 +234,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.operators.s3_to_redshift_operator.S3ToRedshiftTransfer` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:34:1
|
||||
@@ -243,10 +253,11 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
@@ -12,18 +12,19 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.executors.celery_executor.app` is moved into `celery` provider in Airflow 3.0;
|
||||
--> AIR302_celery.py:11:1
|
||||
@@ -35,16 +36,17 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.executors.celery_executor.CeleryExecutor` is moved into `celery` provider in Airflow 3.0;
|
||||
--> AIR302_celery.py:12:1
|
||||
@@ -54,14 +56,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
@@ -11,17 +11,18 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.hooks.dbapi.DbApiHook` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:9:1
|
||||
@@ -33,16 +34,17 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.hooks.dbapi_hook.DbApiHook` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:14:1
|
||||
@@ -54,16 +56,17 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.SQLCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:15:1
|
||||
@@ -73,15 +76,16 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.SQLCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:21:1
|
||||
@@ -93,15 +97,16 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.CheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:22:1
|
||||
@@ -111,14 +116,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.druid_check_operator.CheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:27:1
|
||||
@@ -129,14 +135,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.CheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:32:1
|
||||
@@ -147,14 +154,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.operators.druid_check_operator.DruidCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:42:1
|
||||
@@ -167,14 +175,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.PrestoCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:43:1
|
||||
@@ -186,14 +195,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.IntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:44:1
|
||||
@@ -205,18 +215,19 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.SQLIntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:45:1
|
||||
@@ -227,18 +238,19 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.IntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:54:1
|
||||
@@ -251,14 +263,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.SQLIntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:55:1
|
||||
@@ -269,15 +282,16 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.PrestoIntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:56:1
|
||||
@@ -288,14 +302,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.SQLThresholdCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:64:1
|
||||
@@ -307,17 +322,18 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.ThresholdCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:65:1
|
||||
@@ -327,17 +343,18 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.SQLThresholdCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:70:1
|
||||
@@ -348,15 +365,16 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.SQLValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:78:1
|
||||
@@ -368,17 +386,18 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.check_operator.ValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:79:1
|
||||
@@ -388,17 +407,18 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.SQLValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:88:1
|
||||
@@ -411,15 +431,16 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.ValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:89:1
|
||||
@@ -430,14 +451,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.PrestoValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:90:1
|
||||
@@ -448,14 +470,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.BaseSQLOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:102:1
|
||||
@@ -468,21 +491,22 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.BranchSQLOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:103:1
|
||||
@@ -494,20 +518,21 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.SQLTableCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:104:1
|
||||
@@ -520,18 +545,19 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.SQLColumnCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:105:1
|
||||
@@ -544,19 +570,20 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
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
|
||||
@@ -568,17 +595,18 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.sql.parse_boolean` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:107:1
|
||||
@@ -589,16 +617,17 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.sensors.sql.SqlSensor` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:112:1
|
||||
@@ -609,15 +638,16 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.sensors.sql_sensor.SqlSensor` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:117:1
|
||||
@@ -628,12 +658,13 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
@@ -10,10 +10,11 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
@@ -11,21 +11,22 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.hooks.druid_hook.DruidHook` is moved into `apache-druid` provider in Airflow 3.0;
|
||||
--> AIR302_druid.py:13:1
|
||||
@@ -37,20 +38,21 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.hive_to_druid.HiveToDruidOperator` is moved into `apache-druid` provider in Airflow 3.0;
|
||||
--> AIR302_druid.py:15:1
|
||||
@@ -62,17 +64,18 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.hive_to_druid.HiveToDruidTransfer` is moved into `apache-druid` provider in Airflow 3.0;
|
||||
--> AIR302_druid.py:16:1
|
||||
@@ -82,14 +85,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
@@ -12,19 +12,20 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.basic_auth.init_app` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:11:1
|
||||
@@ -36,17 +37,18 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.basic_auth.auth_current_user` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:12:1
|
||||
@@ -58,18 +60,19 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.basic_auth.requires_authentication` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:13:1
|
||||
@@ -82,16 +85,17 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.kerberos_auth.log` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:23:1
|
||||
@@ -104,17 +108,18 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.kerberos_auth.CLIENT_AUTH` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:24:1
|
||||
@@ -126,20 +131,21 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.kerberos_auth.find_user` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:25:1
|
||||
@@ -152,19 +158,20 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.kerberos_auth.init_app` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:26:1
|
||||
@@ -176,18 +183,19 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
AIR302 [*] `airflow.api.auth.backend.kerberos_auth.requires_authentication` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:27:1
|
||||
@@ -200,16 +208,17 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
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
|
||||
@@ -222,17 +231,18 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
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
|
||||
@@ -244,20 +254,21 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
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
|
||||
@@ -270,19 +281,20 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
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
|
||||
@@ -294,18 +306,19 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
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
|
||||
@@ -318,16 +331,17 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
AIR302 [*] `airflow.auth.managers.fab.fab_auth_manager.FabAuthManager` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:49:1
|
||||
@@ -340,19 +354,20 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
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
|
||||
@@ -363,17 +378,18 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
AIR302 [*] `airflow.auth.managers.fab.security_manager.override.FabAirflowSecurityManagerOverride` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:51:1
|
||||
@@ -386,16 +402,17 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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
|
||||
|
||||
AIR302 [*] `airflow.www.security.FabAirflowSecurityManagerOverride` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:55:1
|
||||
@@ -406,11 +423,12 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
@@ -11,15 +11,16 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.sensors.web_hdfs_sensor.WebHdfsSensor` is moved into `apache-hdfs` provider in Airflow 3.0;
|
||||
--> AIR302_hdfs.py:7:1
|
||||
@@ -29,12 +30,13 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
@@ -12,22 +12,23 @@ 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.
|
||||
1 | from __future__ import annotations
|
||||
2 |
|
||||
3 | from airflow.hooks.hive_hooks import (
|
||||
- HIVE_QUEUE_PRIORITIES,
|
||||
4 | HiveCliHook,
|
||||
5 | HiveMetastoreHook,
|
||||
6 | HiveServer2Hook,
|
||||
|
||||
ℹ 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,
|
||||
--------------------------------------------------------------------------------
|
||||
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
|
||||
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()
|
||||
|
||||
AIR302 [*] `airflow.hooks.hive_hooks.HiveCliHook` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:19:1
|
||||
@@ -39,22 +40,23 @@ 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.
|
||||
2 |
|
||||
3 | from airflow.hooks.hive_hooks import (
|
||||
4 | HIVE_QUEUE_PRIORITIES,
|
||||
- HiveCliHook,
|
||||
5 | HiveMetastoreHook,
|
||||
6 | HiveServer2Hook,
|
||||
7 | )
|
||||
|
||||
ℹ 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 | )
|
||||
--------------------------------------------------------------------------------
|
||||
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
|
||||
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()
|
||||
|
||||
AIR302 [*] `airflow.hooks.hive_hooks.HiveMetastoreHook` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:20:1
|
||||
@@ -66,22 +68,23 @@ 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.
|
||||
3 | from airflow.hooks.hive_hooks import (
|
||||
4 | HIVE_QUEUE_PRIORITIES,
|
||||
5 | HiveCliHook,
|
||||
- HiveMetastoreHook,
|
||||
6 | HiveServer2Hook,
|
||||
7 | )
|
||||
8 | from airflow.macros.hive import (
|
||||
|
||||
ℹ 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 (
|
||||
--------------------------------------------------------------------------------
|
||||
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
|
||||
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()
|
||||
|
||||
AIR302 [*] `airflow.hooks.hive_hooks.HiveServer2Hook` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:21:1
|
||||
@@ -94,22 +97,23 @@ 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.
|
||||
4 | HIVE_QUEUE_PRIORITIES,
|
||||
5 | HiveCliHook,
|
||||
6 | HiveMetastoreHook,
|
||||
- HiveServer2Hook,
|
||||
7 | )
|
||||
8 | from airflow.macros.hive import (
|
||||
9 | closest_ds_partition,
|
||||
|
||||
ℹ 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,
|
||||
--------------------------------------------------------------------------------
|
||||
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
|
||||
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()
|
||||
|
||||
AIR302 [*] `airflow.macros.hive.closest_ds_partition` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:23:1
|
||||
@@ -121,21 +125,22 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.macros.hive.max_partition` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:24:1
|
||||
@@ -147,20 +152,21 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.hive_operator.HiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:26:1
|
||||
@@ -173,18 +179,19 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.hive_stats_operator.HiveStatsCollectionOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:27:1
|
||||
@@ -196,17 +203,18 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.hive_to_mysql.HiveToMySqlOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:28:1
|
||||
@@ -218,16 +226,17 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.hive_to_samba_operator.HiveToSambaOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:29:1
|
||||
@@ -238,15 +247,16 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.hive_to_mysql.HiveToMySqlTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:34:1
|
||||
@@ -259,14 +269,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.operators.mysql_to_hive.MySqlToHiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:38:1
|
||||
@@ -279,15 +290,16 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.operators.mysql_to_hive.MySqlToHiveTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:42:1
|
||||
@@ -300,14 +312,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.operators.mssql_to_hive.MsSqlToHiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:46:1
|
||||
@@ -320,15 +333,16 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.operators.mssql_to_hive.MsSqlToHiveTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:50:1
|
||||
@@ -341,14 +355,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.operators.s3_to_hive_operator.S3ToHiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:54:1
|
||||
@@ -361,15 +376,16 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.operators.s3_to_hive_operator.S3ToHiveTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:58:1
|
||||
@@ -382,14 +398,15 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.sensors.hive_partition_sensor.HivePartitionSensor` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:62:1
|
||||
@@ -402,15 +419,16 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.sensors.metastore_partition_sensor.MetastorePartitionSensor` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:66:1
|
||||
@@ -423,15 +441,16 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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 |
|
||||
|
||||
AIR302 [*] `airflow.sensors.named_hive_partition_sensor.NamedHivePartitionSensor` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:70:1
|
||||
@@ -442,11 +461,12 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
@@ -12,16 +12,17 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.operators.http_operator.SimpleHttpOperator` is moved into `http` provider in Airflow 3.0;
|
||||
--> AIR302_http.py:8:1
|
||||
@@ -32,15 +33,17 @@ 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.
|
||||
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()
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.sensors.http_sensor.HttpSensor` is moved into `http` provider in Airflow 3.0;
|
||||
--> AIR302_http.py:9:1
|
||||
@@ -51,12 +54,13 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
@@ -11,17 +11,18 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
AIR302 [*] `airflow.hooks.jdbc_hook.jaydebeapi` is moved into `jdbc` provider in Airflow 3.0;
|
||||
--> AIR302_jdbc.py:9:1
|
||||
@@ -31,13 +32,14 @@ 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.
|
||||
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
|
||||
|
||||
ℹ 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()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user