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
