This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new d4d4cce8d29 Add note about ruff rules and preview flag (#53331)
d4d4cce8d29 is described below
commit d4d4cce8d290fd5b4b51bdf217419c5b6ab889cc
Author: Elad Kalif <[email protected]>
AuthorDate: Mon Jul 14 10:52:03 2025 +0300
Add note about ruff rules and preview flag (#53331)
---
airflow-core/docs/installation/upgrading_to_airflow3.rst | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/airflow-core/docs/installation/upgrading_to_airflow3.rst
b/airflow-core/docs/installation/upgrading_to_airflow3.rst
index f50220f33b7..390f8249e21 100644
--- a/airflow-core/docs/installation/upgrading_to_airflow3.rst
+++ b/airflow-core/docs/installation/upgrading_to_airflow3.rst
@@ -116,13 +116,18 @@ To trigger these fixes, run the following command:
ruff check dags/ --select AIR301 --fix --unsafe-fixes --preview
+.. note::
+ Ruff has strict policy about when a rule becomes stable. Till it does you
must use --preview flag.
+ The progress of Airflow Ruff rule become stable can be tracked in
https://github.com/astral-sh/ruff/issues/17749
+ That said, from Airflow side the rules are perfectly fine to be used.
+
.. note::
In AIR rules, unsafe fixes involve changing import paths while keeping the
name of the imported member the same. For instance, changing the import from
``from airflow.sensors.base_sensor_operator import BaseSensorOperator`` to
``from airflow.sdk.bases.sensor import BaseSensorOperator`` requires ruff to
remove the original import before adding the new one. In contrast, safe fixes
include changes to both the member name and the import path, such as changing
``from airflow.datasets impo [...]
You can also configure these flags through configuration files. See
`Configuring Ruff <https://docs.astral.sh/ruff/configuration/>`_ for details.
-Step 4: Install the Standard Providers
+Step 4: Install the Standard Provider
--------------------------------------
- Some of the commonly used Operators which were bundled as part of the
``airflow-core`` package (for example ``BashOperator`` and ``PythonOperator``)