Fix mypy plugin loading after airflow_mypy distribution migration#65668
Merged
potiuk merged 1 commit intoapache:mainfrom Apr 22, 2026
Merged
Fix mypy plugin loading after airflow_mypy distribution migration#65668potiuk merged 1 commit intoapache:mainfrom
potiuk merged 1 commit intoapache:mainfrom
Conversation
Two unrelated post-migration breakages in the mypy hooks introduced by "Make Mypy plugins installable" (apache#61422): * devel-common's [mypy] extra did not depend on apache-airflow-mypy, so any hook that pulls apache-airflow-devel-common[mypy] (mypy-airflow-core, mypy-task-sdk, mypy-devel-common, etc.) failed to import the plugin from the dedicated mypy virtualenv: pyproject.toml:1: error: Error importing plugin "airflow_mypy.plugins.decorators": No module named 'airflow_mypy' * dev/pyproject.toml referenced the plugins by file path with the wrong subpackage name ("airflow_mypy/plugin/decorators.py" — singular, and path-style instead of module-style), so mypy-dev failed with: dev/pyproject.toml:1: error: Can't find plugin "dev/airflow_mypy/plugin/decorators.py" Switching to the module-style names that already work in the root pyproject.toml fixes mypy-dev.
Lee-W
approved these changes
Apr 22, 2026
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Contributor
Backport failed to create: v3-2-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker c43c778 v3-2-testThis should apply the commit to the v3-2-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After #61422 ("Make Mypy plugins installable") two mypy hooks broke
because the plugin references were not migrated consistently:
devel-common'smypyextra did not depend onapache-airflow-mypy,so any hook that pulls
apache-airflow-devel-common[mypy](
mypy-airflow-core,mypy-task-sdk,mypy-devel-common, …) failedwith
Error importing plugin "airflow_mypy.plugins.decorators": No module named 'airflow_mypy'.dev/pyproject.tomlreferenced the plugins by file path with thewrong subpackage name (
airflow_mypy/plugin/decorators.py— singular,path-style), so
mypy-devfailed withCan't find plugin "dev/airflow_mypy/plugin/decorators.py".Adding
apache-airflow-mypytodevel-common'smypyextra andswitching
dev/pyproject.tomlto the module-style plugin names thatalready work in the root
pyproject.tomlfixes both.Verified locally:
prek run mypy-devel-common --all-files— Passedprek run mypy-dev --all-files— Passedprek run mypy-airflow-core(one file) — PassedWas generative AI tooling used to co-author this PR?
Generated-by: Claude Opus 4.7 (1M context) following the guidelines