Skip to content

Commit f84d4d6

Browse files
committed
Catch another use of value.type that doesn't check if it's a string and evaluate.
1 parent 214d55b commit f84d4d6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ducktools/env/_sqlclasses.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,13 @@ def __init_subclass__(
168168
if not value.internal:
169169
valid_fields[name] = value
170170

171-
if value.type == list[str]:
171+
v_type = value.type
172+
if isinstance(v_type, str):
173+
v_type = eval(v_type)
174+
175+
if v_type == list[str]:
172176
split_columns.add(name)
173-
elif value.type is bool:
177+
elif v_type is bool:
174178
bools.add(name)
175179

176180
cls.VALID_FIELDS = valid_fields

0 commit comments

Comments
 (0)