Description
Refactor the type aliases in shared_types.py to use simpler syntax that displays better in IDEs.
Current Code
THandleOutOfBounds = Union[Literal["Warning"], Literal["Error"]]
TInstructionPhase = Union[Literal["setup"], Literal["plotting"], Literal["teardown"]]
Proposed Changes
HandleOutOfBounds = Literal["Warning", "Error"]
InstructionPhase = Literal["setup", "plotting", "teardown"]
Also add a Bounds TypedDict for the min/max point dictionaries:
class Bounds(TypedDict):
x_min: float
x_max: float
y_min: float
y_max: float
Acceptance Criteria
Description
Refactor the type aliases in
shared_types.pyto use simpler syntax that displays better in IDEs.Current Code
Proposed Changes
Also add a
BoundsTypedDict for the min/max point dictionaries:Acceptance Criteria
Literal["a", "b"]syntax instead ofUnion[Literal["a"], Literal["b"]]Tprefix from type names (useHandleOutOfBoundsnotTHandleOutOfBounds)BoundsTypedDict for structured return types