From 0467379452c0800fb409b2ad74c0ba222e954b10 Mon Sep 17 00:00:00 2001 From: Jens Scheffler <95105677+jscheffl@users.noreply.github.com> Date: Sun, 26 Oct 2025 17:15:39 +0100 Subject: [PATCH] [v3-1-test] Replace last pylint usage by ruff rule (#57294) (cherry picked from commit 17e9a6db865974403adc385e51c64eec9891a8ed) Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com> --- .pre-commit-config.yaml | 18 ------------------ pyproject.toml | 1 + 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 639b0f8374c73..f4eb511eee1bf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -964,24 +964,6 @@ repos: - "B101,B301,B324,B403,B404,B603" - "--severity-level" - "high" # TODO: remove this line when we fix all the issues - - id: pylint - name: pylint - description: "Pylint is a static code analyser for Python 2 or 3." - entry: pylint - language: python - language_version: python3 - types: [python] - additional_dependencies: ['pylint==3.1.0'] - require_serial: true - files: ^airflow-core/src/airflow/.* - exclude: - airflow/example_dags/.* - args: - # Use pylint only for the specific check, which are not available into the ruff - - "--disable=all" - # W0133: "Exception statement has no effect" - # see: https://github.com/astral-sh/ruff/issues/10145 - - "--enable=W0133" - id: check-no-fab-migrations language: pygrep name: Check no migration is done on FAB related table diff --git a/pyproject.toml b/pyproject.toml index f7fd21e18c050..d0fba5df9a5bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -619,6 +619,7 @@ extend-select = [ "RET506", # Unnecessary {branch} after raise statement "RET507", # Unnecessary {branch} after continue statement "RET508", # Unnecessary {branch} after break statement + "PLW0133", # Missing raise statement on exception ] ignore = [ "D100", # Unwanted; Docstring at the top of every file.