Skip to content

Commit

Permalink
better type hints for layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Jul 24, 2024
1 parent 3031baf commit 5c7cc21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dooit/ui/api/components.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from enum import Enum
from typing import List, Tuple, Callable
from typing import List, Tuple, Callable, Union


class WorkspaceComponent(Enum):
Expand All @@ -15,5 +15,5 @@ class TodoComponent(Enum):
effort = "effort"


WorkspaceLayout = List[Tuple[WorkspaceComponent, Callable]]
TodoLayout = List[Tuple[TodoComponent, Callable]]
WorkspaceLayout = List[Union[Tuple[WorkspaceComponent, Callable], WorkspaceComponent]]
TodoLayout = List[Union[Tuple[TodoComponent, Callable], TodoComponent]]

0 comments on commit 5c7cc21

Please sign in to comment.