tree: 09d4dc2c0a45a8721cbfe7d5767039a6dd199b4e
  1. newsfragments/
  2. src/
  3. tests/
  4. .gitignore
  5. .pre-commit-config.yaml
  6. LICENSE
  7. NOTICE
  8. pyproject.toml
  9. README.md
  10. RELEASE_NOTES.rst
dev/mypy/README.md

Apache Airflow Mypy Plugins

This package provides Mypy plugins for Apache Airflow to enhance type checking capabilities.

Installation

pip install apache-airflow-mypy

Usage

Add the plugins to your mypy.ini or pyproject.toml configuration:

Using mypy.ini

[mypy]
plugins = airflow_mypy.plugins.decorators, airflow_mypy.plugins.outputs

Using pyproject.toml

[tool.mypy]
plugins = ["airflow_mypy.plugins.decorators", "airflow_mypy.plugins.outputs"]

Available Plugins

decorators Plugin

Provides type checking support for Airflow decorators that modify function signatures.

outputs Plugin

Handles type checking for operator outputs and XComArg types, allowing proper type inference when passing task outputs between tasks.