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


##########
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:
   Why is this function needed? I thought with `__all__` defined dir() would 
return that list



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