From 5c7cc21e5579a1f5937fea778aa059764f6d6265 Mon Sep 17 00:00:00 2001 From: kraanzu Date: Wed, 24 Jul 2024 16:46:34 +0530 Subject: [PATCH] better type hints for layouts --- dooit/ui/api/components.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dooit/ui/api/components.py b/dooit/ui/api/components.py index 7afca140..10f21b40 100644 --- a/dooit/ui/api/components.py +++ b/dooit/ui/api/components.py @@ -1,5 +1,5 @@ from enum import Enum -from typing import List, Tuple, Callable +from typing import List, Tuple, Callable, Union class WorkspaceComponent(Enum): @@ -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]]