Support inline ignore marker for check-sdk-imports hook#66519
Merged
jason810496 merged 2 commits intoapache:mainfrom May 7, 2026
Merged
Conversation
amoghrajesh
approved these changes
May 7, 2026
Contributor
amoghrajesh
left a comment
There was a problem hiding this comment.
Some nits, otherwise LGTM
Lee-W
approved these changes
May 7, 2026
Contributor
Backport successfully created: v3-2-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
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.
Why
There are cases where importing
airflow.sdkmodules in airflow-core is intentionally needed, but thecheck-sdk-importsprek hook has no way to suppress individual violations. Mirrors the# nocheck: core-importssupport added forcheck_core_imports_in_sdkin #65358.What
# nocheck: sdk-importsinline comment marker support tocheck_sdk_imports.py, allowing specific import lines to be excluded from the check.from airflow.sdk import (...)statements (on the first line, any middle line, or the closing paren line).check_sdk_importshook covering both the existing detection behavior and the new nocheck marker.Was generative AI tooling used to co-author this PR?