ruff/crates/ruff_linter
GiGaGon 68f98cfcd8
[Airflow] Make AIR312 example error out-of-the-box (#18989)
## Summary

Part of #18972

This PR makes [airflow3-suggested-to-move-to-provider
(AIR312)](https://docs.astral.sh/ruff/rules/airflow3-suggested-to-move-to-provider/#airflow3-suggested-to-move-to-provider-air312)'s
example error out-of-the-box

[Old example](https://play.ruff.rs/1be0d654-1ed5-4a0b-8791-cc5db73333d5)
```py
from airflow.operators.python import PythonOperator
```

[New example](https://play.ruff.rs/b6260206-fa19-4ab2-8d45-ddd43c46a759)
```py
from airflow.operators.python import PythonOperator


def print_context(ds=None, **kwargs):
    print(kwargs)
    print(ds)


print_the_context = PythonOperator(
    task_id="print_the_context", python_callable=print_context
)
```

## Test Plan

<!-- How was it tested? -->

N/A, no functionality/tests affected
2025-06-28 10:17:11 -05:00
..
resources [flake8-pyi] Expand Optional[A] to A | None (PYI016) (#18572) 2025-06-27 15:43:11 +00:00
src [Airflow] Make AIR312 example error out-of-the-box (#18989) 2025-06-28 10:17:11 -05:00
Cargo.toml Convert OldDiagnostic::noqa_code to an Option<String> (#18946) 2025-06-27 11:36:55 -04:00