This is a command line program that rewrites Airflow DAG files to be compatible with Airflow 3, so users can upgrade more smoothly.
Example usage:
$ airflow2to3 --select AIR301 -- path/to/dag.py
The --select
flag takes a comma-separated codes for the tool to fix. The
codes are from Ruff's Airflow rules with the AIR
prefix removed.
We only implement 2-to-3 rules with code 3xx.