diff --git a/src/fixate/core/switching.py b/src/fixate/core/switching.py index 3801c50..c5723bc 100644 --- a/src/fixate/core/switching.py +++ b/src/fixate/core/switching.py @@ -32,7 +32,6 @@ import itertools import time from typing import ( - TYPE_CHECKING, Generic, Optional, Callable, @@ -42,7 +41,6 @@ Union, Collection, Dict, - Any, FrozenSet, Set, ) @@ -55,12 +53,7 @@ PinList = Sequence[Pin] PinSet = FrozenSet[Pin] SignalMap = Dict[Signal, PinSet] - -if TYPE_CHECKING: - # The self reference doesn't work at runtime, by mypy knows what it means. - TreeDef = Sequence[Union[Signal, TreeDef]] -else: - TreeDef = Sequence[Any] +TreeDef = Sequence[Union[Signal, "TreeDef"]] @dataclass(frozen=True)