ashb commented on code in PR #43076: URL: https://github.com/apache/airflow/pull/43076#discussion_r1804372439
########## task_sdk/src/airflow/sdk/__init__.py: ########## @@ -16,6 +16,32 @@ # under the License. from __future__ import annotations +from typing import TYPE_CHECKING -def hello() -> str: - return "Hello from task-sdk!" +__all__ = ["DAG", "BaseOperator", "TaskGroup"] + +if TYPE_CHECKING: + from airflow.sdk.definitions.baseoperator import BaseOperator as BaseOperator + from airflow.sdk.definitions.dag import DAG as DAG + from airflow.sdk.definitions.edges import EdgeModifier as EdgeModifier + from airflow.sdk.definitions.taskgroup import TaskGroup as TaskGroup Review Comment: The `X as X` is how you signal to ruff et al that this import is designed to "re-export" the item. Without this (I think, i'll check) the import tidy will remove them -- 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]
