Would it be a good idea to release the plugins in the sdk instead, and/or under the airflow.sdk namespace? I feel that may be a more consistent interface to users.
TP -- Sent from my iPhone > On 24 Mar 2026, at 05:10, Jens Scheffler <[email protected]> wrote: > > Like it! > > If somebody has time I also think that the standard "**context" parameters > injected by the Task runner in Tasks would benefit from special handling such > that we can prevent to say: > > @task > def my_task(params: ParamsDict | None = None): > ... > > and mypy accepts > > @task > def my_task(params: ParamsDict): > ... > > (or similar) > > Jens > >> On 23.03.26 21:57, Hussein Awala wrote: >> Hi everyone, >> >> I’d like to propose releasing the existing MyPy plugins as a standalone >> package: *apache-airflow-mypy*. >> >> >> *Background* >> >> Apache Airflow currently ships two MyPy plugins (decorators and outputs) >> that improve type checking for DAG authors. >> >> At the moment, these plugins live inside the repository but are not >> published to PyPI. As a result, users who want to benefit from type >> checking need to manually copy these plugin files into their own projects. >> This is what several teams are doing today. >> >> >> *Proposal* >> >> Publish *apache-airflow-mypy* as an independently versioned package on >> PyPI, following SemVer. >> >> The package is small and self-contained (two plugins, ~150 lines of code), >> which should make it straightforward to maintain. >> >> PR: https://github.com/apache/airflow/pull/61422 >> >> It includes: >> >> - A dedicated package under dev/mypy/ with its own pyproject.toml >> - A Breeze release command: prepare-mypy-distributions >> - Release documentation: dev/README_RELEASE_MYPY.md >> - Tests and Towncrier-based release notes >> >> The name *apache-airflow-mypy* has already been reserved on PyPI (thanks >> Jens!). >> >> >> *What the plugins do* >> >> - *outputs plugin* >> Makes operator.output and @task calls return Any instead of XComArg, >> allowing DAGs that pass task outputs between tasks to type-check without >> errors. >> - *decorators plugin* >> Adjusts type signatures for certain Google Cloud decorators (e.g. >> fallback_to_default_project_id, etc.). >> >> >> *Usage* >> >> pip install apache-airflow-mypy >> >> Add to mypy.ini: >> >> [mypy] >> plugins = >> airflow_mypy.plugins.decorators >> airflow_mypy.plugins.outputs >> >> >> I’m happy to take ownership of the release process for this package. >> >> Any thoughts or feedback would be very welcome. >> >> Thanks, >> Hussein >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
