Skip to content

Commit 5ae3eaf

Browse files
prdaiProgrammer-RD-AI
andauthored
chore(module-loading): remove outdated TODO and clarify import_string docstring (#56713)
* feat(module-loading): add nested attribute support to import_string * chore: update docstrings * chore(module-loading): remove outdated TODO and clarify import_string docstring * chore: remove unrequired file * chore(module-loading): remove unrequired logic --------- Co-authored-by: Programmer-RD-AI <[email protected]>
1 parent d58da15 commit 5ae3eaf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

task-sdk/src/airflow/sdk/module_loading.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ def import_string(dotted_path: str):
2525
"""
2626
Import a dotted module path and return the attribute/class designated by the last name in the path.
2727
28+
Note: Only supports top-level attributes or classes.
29+
2830
Raise ImportError if the import failed.
2931
"""
30-
# TODO: Add support for nested classes. Currently, it only works for top-level classes.
3132
try:
3233
module_path, class_name = dotted_path.rsplit(".", 1)
3334
except ValueError:

0 commit comments

Comments
 (0)