Skip to content

Commit

Permalink
Workaround for types.UnionType weirdness
Browse files Browse the repository at this point in the history
  • Loading branch information
tilk committed Oct 20, 2023
1 parent 477c619 commit 10392f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coreblocks/utils/_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
ShapeLike: TypeAlias = Shape | ShapeCastable | int | range | type[Enum]
StatementLike: TypeAlias = Statement | Iterable["StatementLike"]
LayoutLike: TypeAlias = (
Layout | Sequence[tuple[str, ShapeLike | "LayoutLike"] | tuple[str, ShapeLike | "LayoutLike", Direction]]
Layout | Sequence[tuple[str, "ShapeLike | LayoutLike"] | tuple[str, "ShapeLike | LayoutLike", Direction]]
)
SwitchKey: TypeAlias = str | int | Enum

# Internal Coreblocks types
SignalBundle: TypeAlias = Signal | Record | View | Iterable["SignalBundle"] | Mapping[str, "SignalBundle"]
LayoutList: TypeAlias = list[tuple[str, ShapeLike | "LayoutList"]]
LayoutList: TypeAlias = list[tuple[str, "ShapeLike | LayoutList"]]


class _ModuleBuilderDomainsLike(Protocol):
Expand Down

0 comments on commit 10392f8

Please sign in to comment.