airflow3-incompatible-function-signature (AIR303)
Preview (since 0.14.11) · Related issues · View source
Derived from the Airflow linter.
This rule is unstable and in preview. The --preview flag is required for use.
What it does
Checks for Airflow function calls that will raise a runtime error in Airflow 3.0 due to function signature changes, such as functions that changed to accept only keyword arguments, parameter reordering, or parameter type changes.
Why is this bad?
Airflow 3.0 introduces changes to function signatures. Code that worked in Airflow 2.x will raise a runtime error if not updated in Airflow 3.0.
Example
from airflow.lineage.hook import HookLineageCollector
collector = HookLineageCollector()
# Passing positional arguments will raise a runtime error in Airflow 3.0
collector.create_asset("s3://bucket/key")
Use instead: