Programmer-RD-AI opened a new pull request, #56713:
URL: https://github.com/apache/airflow/pull/56713
This PR enhances the `import_string` utility in `airflow.sdk.module_loading`
to support nested attribute resolution, enabling imports like:
```python
import_string("package.module.Class.Inner.attr")
```
#### **Key changes**
* Added recursive attribute resolution after module import.
* Dynamically detects the deepest importable module segment.
#### **Example**
**Before**
```python
import_string("pkg.mod.Class.Inner.attr")
# ImportError: 'Module "pkg.mod" has no attribute "Class.Inner.attr"'
```
**After**
```python
import_string("pkg.mod.Class.Inner.attr")
# Correctly resolves to nested attribute object
```
--
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]