Skip to content

Commit

Permalink
fix: type annotation for UnionConst too restrictive (#509)
Browse files Browse the repository at this point in the history
now matches `Const`
  • Loading branch information
ss2165 committed Jun 17, 2024
1 parent 604dfdb commit b9d218c
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions tierkreis/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,20 +350,7 @@ def Const(
return n[Labels.VALUE]


def UnionConst(
val: Union[
int,
float,
bool,
str,
dict,
TierkreisValue,
TierkreisGraph,
tuple,
list,
"LazyGraph",
],
) -> NodePort:
def UnionConst(val: Any) -> NodePort:
"""Add a constant as a variant value tagged by its type, to be used
with `Union` type annotations.
"""
Expand Down

0 comments on commit b9d218c

Please sign in to comment.