Hi everyone,
This discussion revolves around the ruff rule that replaces
`"{{ ti.xcom_pull(task_ids='task_1') }}"` -> `task_1.output`
The rule previously approved by the community explicitly excluded the
"mixed-content" (MC) case, e.g.:
`"echo {{ ti.xcom_pull(task_ids='task_1') }}"` -> `"echo {{ task_1.output
}}"`
Ultimately, in the MC case we're replacing a string by another string. This
replacement has a minor benefit in readability, but does not provide the
same IDE and refactoring benefits that the original does. Several questions:
1. Do we even consider the MC case as worthy of replacing, in light of the
minor benefits it brings?
2. If yes, should this be part of AIR201, or a new rule? Are there cases
where users might only want to lint for the "pure" case and not MC?
Will appreciate your views on this matter!
Best,
Dev-iL
1: https://lists.apache.org/thread/1oh64pgco8bcbsxyyyflm7ccg1x3frol
2: https://docs.astral.sh/ruff/rules/airflow-xcom-pull-in-template-string/
3: https://github.com/astral-sh/ruff/pull/24673