You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2023/03/08 14:44:19 UTC

[airflow] 04/20: Fix a few remaining references to flake8 (#28915)

This is an automated email from the ASF dual-hosted git repository.

ephraimanierobi pushed a commit to branch v2-5-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 2b377377e4e2ae08885d206f1b9f4aa0b3958f4a
Author: Ash Berlin-Taylor <as...@apache.org>
AuthorDate: Fri Jan 13 10:09:19 2023 +0000

    Fix a few remaining references to flake8 (#28915)
    
    Some are just docs, others stopped some `breeze` commands from working
    
    (cherry picked from commit 71340fcc4d393484bc47ac4ca73e37b06062f978)
---
 .dockerignore                |  1 -
 .gitattributes               |  1 -
 .github/boring-cyborg.yml    |  2 +-
 CONTRIBUTING.rst             |  2 +-
 CONTRIBUTORS_QUICK_START.rst |  4 ++--
 STATIC_CODE_CHECKS.rst       | 18 +++++++++---------
 6 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/.dockerignore b/.dockerignore
index 045b730630..bf1cd0f3b5 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -45,7 +45,6 @@
 
 !.coveragerc
 !.rat-excludes
-!.flake8
 !.dockerignore
 !pytest.ini
 !RELEASE_NOTES.rst
diff --git a/.gitattributes b/.gitattributes
index 4ee74a9d8a..583924fead 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -30,7 +30,6 @@ CONTRIBUTORS_QUICK_START.rst export-ignore
 .pre-commit-config.yaml export-ignore
 .mailmap export-ignore
 .editorconfig export-ignore
-.flake8 export-ignore
 .inputrc export-ignore
 .codespellignorelines export-ignore
 .gitmodules export-ignore
diff --git a/.github/boring-cyborg.yml b/.github/boring-cyborg.yml
index de8a944d70..a10d8a5bf0 100644
--- a/.github/boring-cyborg.yml
+++ b/.github/boring-cyborg.yml
@@ -213,7 +213,7 @@ firstPRWelcomeComment: >
 
   Here are some useful points:
 
-  - Pay attention to the quality of your code (flake8, mypy and type annotations). Our [pre-commits](
+  - Pay attention to the quality of your code (ruff, mypy and type annotations). Our [pre-commits](
   https://github.com/apache/airflow/blob/main/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks)
   will help you with that.
 
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index a5e00305c1..3a6b7eb29a 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -892,7 +892,7 @@ as described in the static code checks documentation.
 Coding style and best practices
 ===============================
 
-Most of our coding style rules are enforced programmatically by flake8 and mypy (which are run automatically
+Most of our coding style rules are enforced programmatically by ruff and mypy (which are run automatically
 on every pull request), but there are some rules that are not yet automated and are more Airflow specific or
 semantic than style
 
diff --git a/CONTRIBUTORS_QUICK_START.rst b/CONTRIBUTORS_QUICK_START.rst
index bffd4967c8..da37b03da8 100644
--- a/CONTRIBUTORS_QUICK_START.rst
+++ b/CONTRIBUTORS_QUICK_START.rst
@@ -532,8 +532,8 @@ To avoid burden on CI infrastructure and to save time, Pre-commit hooks can be r
 
   $ pre-commit run black --files airflow/decorators.py tests/utils/test_task_group.py
     black...............................................................Passed
-  $ pre-commit run run-flake8 --files airflow/decorators.py tests/utils/test_task_group.py
-    Run flake8..........................................................Passed
+  $ pre-commit run ruff --files airflow/decorators.py tests/utils/test_task_group.py
+    Run ruff............................................................Passed
 
 
 
diff --git a/STATIC_CODE_CHECKS.rst b/STATIC_CODE_CHECKS.rst
index a31a29171e..6d1684acd9 100644
--- a/STATIC_CODE_CHECKS.rst
+++ b/STATIC_CODE_CHECKS.rst
@@ -119,8 +119,8 @@ require Breeze Docker image to be build locally.
   In case you have a problem with running particular ``pre-commit`` check you can still continue using the
   benefits of having ``pre-commit`` installed, with some of the checks disabled. In order to disable
   checks you might need to set ``SKIP`` environment variable to coma-separated list of checks to skip. For example
-  when you want to skip some checks (flake/mypy for example), you should be able to do it by setting
-  ``export SKIP=run-flake8,run-mypy``. You can also add this to your ``.bashrc`` or ``.zshrc`` if you
+  when you want to skip some checks (ruff/mypy for example), you should be able to do it by setting
+  ``export SKIP=ruff,run-mypy``. You can also add this to your ``.bashrc`` or ``.zshrc`` if you
   do not want to set it manually every time you enter the terminal.
 
   In case you do not have breeze image configured locally, you can also disable all checks that require
@@ -386,7 +386,7 @@ code. But you can run pre-commit hooks manually as needed.
 
 .. code-block:: bash
 
-    SKIP=run-mypy,run-flake8 pre-commit run --all-files
+    SKIP=run-mypy,ruff pre-commit run --all-files
 
 
 You can always skip running the tests by providing ``--no-verify`` flag to the
@@ -416,17 +416,17 @@ Run the ``mypy`` check for all files:
 
      breeze static-checks --type run-mypy --all-files
 
-Run the ``flake8`` check for the ``tests.core.py`` file with verbose output:
+Run the ``ruff`` check for the ``tests.core.py`` file with verbose output:
 
 .. code-block:: bash
 
-     breeze static-checks --type run-flake8 --file tests/core.py --verbose
+     breeze static-checks --type ruff --file tests/core.py --verbose
 
-Run the ``flake8`` check for the ``tests.core`` package with verbose output:
+Run the ``ruff for the ``tests.core`` package with verbose output:
 
 .. code-block:: bash
 
-     breeze static-checks --type run-flake8 --file tests/core/* --verbose
+     breeze static-checks --type ruff --file tests/core/* --verbose
 
 Run all checks for the currently staged files:
 
@@ -461,10 +461,10 @@ Printing the commands while executing:
 
 .. code-block:: bash
 
-     VERBOSE="true" pre-commit run --verbose run-flake8
+     VERBOSE="true" pre-commit run --verbose ruff
 
 Just performing dry run:
 
 .. code-block:: bash
 
-     DRY_RUN="true" pre-commit run --verbose run-flake8
+     DRY_RUN="true" pre-commit run --verbose ruff