From 6470b8529a96fce8acc26c9505caaeb03acc2d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Csaba=20Gy=C3=B6rgyi?= Date: Tue, 2 Jul 2024 18:07:55 +0200 Subject: [PATCH] Use 'Union' instead of '|' in type hint --- GTG/core/tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]: