Skip to content

Commit

Permalink
Use 'Union' instead of '|' in type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
gycsaba96 authored and diegogangl committed Jul 3, 2024
1 parent 6fcbe3a commit 6470b85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GTG/core/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]:
Expand Down

0 comments on commit 6470b85

Please sign in to comment.