Commit 5b0c0d5
committed
refactor: Simplify expand_record per code review feedback
Changes per Daryna's feedback:
1. Removed isinstance(m, list) filter - now checking inside loop
2. Renamed 'matches' to 'extracted'
3. Removed type casts - using 'extracted: Any' instead
4. Renamed 'nested_array' to 'record' (loop var), using 'parent_record' for original
5. Removed 'if not nested_array:' check (redundant with for loop)
All 29 tests passing. MyPy check passes.
Co-Authored-By: unknown <>1 parent 6afe474 commit 5b0c0d5
File tree
1 file changed
+17
-18
lines changed- airbyte_cdk/sources/declarative/expanders
1 file changed
+17
-18
lines changedLines changed: 17 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
72 | | - | |
73 | 72 | | |
74 | | - | |
75 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
76 | 84 | | |
77 | 85 | | |
78 | | - | |
| 86 | + | |
79 | 87 | | |
80 | 88 | | |
81 | | - | |
82 | | - | |
83 | | - | |
| 89 | + | |
84 | 90 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 91 | + | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
96 | | - | |
| 95 | + | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
0 commit comments