diff --git a/GTG/core/tasks.py b/GTG/core/tasks.py index 4941cf2ca..536a745c0 100644 --- a/GTG/core/tasks.py +++ b/GTG/core/tasks.py @@ -24,7 +24,7 @@ from uuid import uuid4, UUID import logging -from typing import Callable, Any, List, Optional, Set, Dict, Tuple +from typing import Callable, Any, List, Optional, Set, Dict, Tuple, Union from enum import Enum import re import datetime @@ -1027,7 +1027,7 @@ def unparent(self, item_id: UUID, parent_id: UUID) -> None: parent.notify('has_children') - def filter(self, filter_type: Filter, arg: Tag | List[Tag] | None = None) -> List[Task]: + def filter(self, filter_type: Filter, arg: Union[Tag,List[Tag],None] = None) -> List[Task]: """Filter tasks according to a filter type.""" def filter_tag(tag: Tag) -> List[Task]: