Skip to content

Commit 1488351

Browse files
committed
fix issue
1 parent 21a596a commit 1488351

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/gt4py/next/type_system/type_translation.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ def from_value(value: Any) -> ts.TypeSpec:
213213
type_ = xtyping.infer_type(value, annotate_callable_kwargs=True)
214214
symbol_type = from_type_hint(type_)
215215

216-
if isinstance(
217-
symbol_type, (ts.DataType, ts.CallableType, ts.OffsetType, ts.DimensionType)
218-
): # TODO!!!
216+
if isinstance(symbol_type, (ts.DataType, ts.OffsetType, ts.DimensionType)) or (
217+
isinstance(symbol_type, ts.CallableType) and isinstance(symbol_type, ts.TypeSpec)
218+
):
219219
return symbol_type
220220
else:
221221
raise ValueError(f"Impossible to map '{value}' value to a 'Symbol'.")

0 commit comments

Comments
 (0)