-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
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: floatAcceptance Criteria
- Type aliases use
Literal["a", "b"]syntax instead ofUnion[Literal["a"], Literal["b"]] - Remove the
Tprefix from type names (useHandleOutOfBoundsnotTHandleOutOfBounds) - Add
BoundsTypedDict for structured return types - Update all imports throughout the codebase to use new names
- All existing tests pass
- mypy passes with no new errors
Metadata
Metadata
Assignees
Labels
No labels