Skip to content

Commit 9d3aece

Browse files
authored
fix(typing): remove unnecessary generics in ibis.struct() typing (#11070)
Small tweak. the function isn't generic, so we don't need to be use TypeVars. Also add in the `Any` so that its consistent with being able to pass in python literals.
1 parent ff4d8c1 commit 9d3aece

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ibis/expr/types/structs.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import collections
44
from keyword import iskeyword
5-
from typing import TYPE_CHECKING
5+
from typing import TYPE_CHECKING, Any
66

77
from public import public
88

@@ -17,13 +17,12 @@
1717

1818
import ibis.expr.datatypes as dt
1919
import ibis.expr.types as ir
20-
from ibis.expr.types.typing import V
2120

2221

2322
@public
2423
@deferrable
2524
def struct(
26-
value: Iterable[tuple[str, V]] | Mapping[str, V],
25+
value: Iterable[tuple[str, Value | Any]] | Mapping[str, Value | Any],
2726
*,
2827
type: str | dt.DataType | None = None,
2928
) -> StructValue:

0 commit comments

Comments
 (0)