Commit e2109ba
Fix TypeError in is_literal_or_name on unhashable set literals (#339)
ast.literal_eval raises TypeError (not just SyntaxError/ValueError)
when evaluating set literals containing unhashable types like dicts
or lists. Catch TypeError as well to prevent the crash.
Fixes #325
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 79b86bd commit e2109ba
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
787 | 787 | | |
788 | 788 | | |
789 | 789 | | |
790 | | - | |
| 790 | + | |
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1860 | 1860 | | |
1861 | 1861 | | |
1862 | 1862 | | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
1863 | 1868 | | |
1864 | 1869 | | |
1865 | 1870 | | |
| |||
0 commit comments