Taragolis commented on code in PR #39430:
URL: https://github.com/apache/airflow/pull/39430#discussion_r1591906454


##########
airflow/__init__.py:
##########
@@ -81,6 +82,12 @@
     # Deprecated lazy imports
     "AirflowException": (".exceptions", "AirflowException", True),
 }
+if TYPE_CHECKING:
+    # This is never executed, but tricks static analyzers (PyDev, PyCharm,)
+    # into knowing the types of these symbols, and what they contain.
+    from airflow.models.dag import DAG  # noqa: TCH004
+    from airflow.models.dataset import Dataset  # noqa: TCH004
+    from airflow.models.xcom_arg import XComArg  # noqa: TCH004

Review Comment:
   There are already in `__all__`, as result ruff complain that it should be 
moved outside of TYPE_CHECKING (TCH004) block because it unable to detect PEP 
562 imports.



-- 
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]

Reply via email to