From 10392f8d8e66e30816f2e53bdd7760cd5d2c6758 Mon Sep 17 00:00:00 2001 From: Marek Materzok Date: Fri, 20 Oct 2023 14:46:23 +0200 Subject: [PATCH] Workaround for types.UnionType weirdness --- coreblocks/utils/_typing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coreblocks/utils/_typing.py b/coreblocks/utils/_typing.py index ff0416a62..5e27a229d 100644 --- a/coreblocks/utils/_typing.py +++ b/coreblocks/utils/_typing.py @@ -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):