Commit b13ad62
fix(cdk): Handle TypeError in _literal_eval for nested set literals
When ast.literal_eval() encounters a string like "{{'\''web'\''}, {'\''discover'\''}}"
that resembles nested Python set literals, it raises TypeError: unhashable
type: '\''set'\'' because sets cannot contain other sets. The existing except
clause only caught (ValueError, SyntaxError) but not TypeError.
This fix adds TypeError to the except clause so the string is returned
as-is, matching the existing behavior for other unparseable literals.
Resolves airbytehq/oncall#11543
Co-Authored-By: bot_apk <apk@cognition.ai>1 parent 6136336 commit b13ad62
2 files changed
Lines changed: 11 additions & 1 deletion
File tree
- airbyte_cdk/sources/declarative/interpolation
- unit_tests/sources/declarative/interpolation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
348 | 358 | | |
349 | 359 | | |
350 | 360 | | |
| |||
0 commit comments