Skip to content

Commit

Permalink
Remove deprecated typing.List uses from base_store.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gycsaba96 authored and diegogangl committed Dec 9, 2024
1 parent 04e9d5e commit 4a4498c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions GTG/core/base_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import logging

from lxml.etree import _Element
from typing import Dict, List, Optional, TypeVar, Generic
from typing import Dict, Optional, TypeVar, Generic
from typing_extensions import Self


Expand Down Expand Up @@ -57,9 +57,9 @@ def has_children(self) -> bool:
return len(self.children) > 0


def get_ancestors(self) -> List[Self]:
def get_ancestors(self) -> list[Self]:
"""Return all ancestors of this tag"""
ancestors: List[Self] = []
ancestors: list[Self] = []
here = self
while here.parent:
here = here.parent
Expand All @@ -79,7 +79,7 @@ class BaseStore(GObject.Object,Generic[S]):

def __init__(self) -> None:
self.lookup: Dict[UUID, S] = {}
self.data: List[S] = []
self.data: list[S] = []

super().__init__()

Expand Down Expand Up @@ -274,7 +274,7 @@ def print_list(self) -> None:
def print_tree(self) -> None:
"""Print the all the items as a tree."""

def recursive_print(tree: List, indent: int) -> None:
def recursive_print(tree: list, indent: int) -> None:
"""Inner print function. """

tab = ' ' * indent if indent > 0 else ''
Expand Down

0 comments on commit 4a4498c

Please sign in to comment.