Increased codebase consistency is not necessarily an outcome of applying
the expanded rule. I can imagine a codebase that has a lot of xcom
retrievals where many of them do not request the default return. In this
case, instead of a single pattern of a "long jinja string", there will be 3
different pattern: long jonja, short jinja, and non-jinja.

Btw, I should've mentioned that my opinion is aligned with Wei's, and that
MC has already been implemented (PR pending in ruff) - we're simply trying
to determine the community's views on this. I'm playing the devil's
advocate a bit...

On Fri, 24 Apr 2026, 18:23 Przemysław Mirowski, <[email protected]> wrote:

> +1 to Wei comments. Also it will improve consistency of user's codebase
> when we will detect these cases too.
> ________________________________
> From: Wei Lee <[email protected]>
> Sent: 24 April 2026 09:37
> To: [email protected] <[email protected]>
> Subject: Re: [DISCUSS] Extending the AIR201 rule to mixed-content strings
>
> 1. Yes — the work is already done in the PR, so no additional effort is
> needed to land this.
> 2. I think this should fall within the scope of AIR201.
>
> Best,
> Wei
>
> Dev-iL <[email protected]> 於 2026年4月23日週四 下午6:55寫道:
>
> > 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
> >
>

Reply via email to