Commit b04e174
committed
refactor: Clean up DpathExtractor extract_records logic
Apply cleaner logic using 'yield from' consistently:
- When extracted is a list without record_expander, use 'yield from extracted'
- Check 'if not self.record_expander' instead of nested if/else
- Remove unnecessary 'yield from []' for empty case
All 24 tests passing. Suggested by @DanyloGL.
Co-Authored-By: unknown <>1 parent c035138 commit b04e174
File tree
1 file changed
+4
-6
lines changed- airbyte_cdk/sources/declarative/extractors
1 file changed
+4
-6
lines changedLines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
106 | 108 | | |
107 | | - | |
108 | | - | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
0 commit comments