sunank200 commented on code in PR #51153:
URL: https://github.com/apache/airflow/pull/51153#discussion_r2129149465


##########
task-sdk/src/airflow/sdk/__init__.py:
##########
@@ -126,3 +132,8 @@ def __getattr__(name: str):
         globals()[name] = val
         return val
     raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
+
+
+def __dir__() -> list[str]:
+    """Override dir() to expose only the public API names and internal 
attributes."""
+    return sorted(__all__ + ["__getattr__", "__lazy_imports"])

Review Comment:
   Yes—outside of this file, nobody should ever import or rely on getattr or 
lazy_imports; they’re purely internal plumbing. All still drives what `from 
airflow.sdk import *` pulls in, and those two names will never be part of the 
public API.
   
   I have removed `__dir__()` now.



##########
task-sdk/docs/requirements.txt:
##########
@@ -0,0 +1,3 @@
+sphinx>=5.0
+sphinx-autoapi>=1.8
+sphinx-airflow-theme>=0.2.2

Review Comment:
   removed requirements.txt as we have pyproject



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to