Skip to content

Add apache-airflow-mypy to devel-common mypy dependency group#65660

Closed
shahar1 wants to merge 1 commit intoapache:mainfrom
shahar1:fix/devel-common-mypy-plugins-missing
Closed

Add apache-airflow-mypy to devel-common mypy dependency group#65660
shahar1 wants to merge 1 commit intoapache:mainfrom
shahar1:fix/devel-common-mypy-plugins-missing

Conversation

@shahar1
Copy link
Copy Markdown
Contributor

@shahar1 shahar1 commented Apr 22, 2026

PR #61422 (merged Apr 22, 2026) changed the root pyproject.toml mypy plugin references from file-path form to module form:

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

Module-form plugins require the package to be importable in the mypy venv. The mypy hooks for airflow-core, task-sdk, and all other non-provider, non-scripts distributions build their venv by running:

uv sync --frozen --project devel-common --group mypy

But devel-common's mypy dependency group did not include apache-airflow-mypy (which lives in dev/mypy/). As a result, all those mypy hooks fail immediately with:

Error importing plugin "airflow_mypy.plugins.decorators": No module named 'airflow_mypy'

This was discovered during the provider release process (#65614) when rebasing onto today's main after #61422 landed.

Fix: add apache-airflow-mypy to the mypy optional-extra in devel-common/pyproject.toml so it is installed into every affected mypy hook venv.


Was generative AI tooling used to co-author this PR?
  • Yes — GitHub Copilot (Claude Sonnet 4.6)

Generated-by: GitHub Copilot (Claude Sonnet 4.6) following the guidelines

PR apache#61422 (merged Apr 22, 2026) changed the root pyproject.toml mypy
plugin references from file-path form to module form:

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

Module-form plugins require the package to be importable in the mypy
venv. The mypy hooks for airflow-core, task-sdk, and all other
non-provider, non-scripts distributions build their venv by running:

    uv sync --frozen --project devel-common --group mypy

But devel-common's mypy dependency group did not include
apache-airflow-mypy (which lives in dev/mypy/). As a result, all those
mypy hooks failed with:

    Error importing plugin "airflow_mypy.plugins.decorators":
    No module named 'airflow_mypy'

Fix: add apache-airflow-mypy to the mypy optional-extra in
devel-common/pyproject.toml so it is installed into every affected
mypy hook venv.
@shahar1
Copy link
Copy Markdown
Contributor Author

shahar1 commented Apr 22, 2026

Implemented in #65668

@shahar1 shahar1 closed this Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants