jason810496 opened a new pull request, #66519: URL: https://github.com/apache/airflow/pull/66519
- related: #65358 ## Why There are cases where importing `airflow.sdk` modules in airflow-core is intentionally needed, but the `check-sdk-imports` prek hook has no way to suppress individual violations. Mirrors the `# nocheck: core-imports` support added for `check_core_imports_in_sdk` in #65358. ## What - Add `# nocheck: sdk-imports` inline comment marker support to `check_sdk_imports.py`, allowing specific import lines to be excluded from the check. - The marker works on both single-line and multi-line `from airflow.sdk import (...)` statements (on the first line, any middle line, or the closing paren line). - Add tests for the `check_sdk_imports` hook covering both the existing detection behavior and the new nocheck marker. --- ##### Was generative AI tooling used to co-author this PR? - [x] Yes, with help of Claude Opus 4.7 following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
