From 0c8d70daae4c4dfc989edad465db94ffc665416d Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 11 Oct 2022 10:26:55 +0200 Subject: [builder][server] restore compatibility with python 3.7 --- src/hydrilla/pattern_tree.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/hydrilla/pattern_tree.py') diff --git a/src/hydrilla/pattern_tree.py b/src/hydrilla/pattern_tree.py index 00dfc8c..b678fe1 100644 --- a/src/hydrilla/pattern_tree.py +++ b/src/hydrilla/pattern_tree.py @@ -189,17 +189,17 @@ FilterWrappedType = StoredTreeItem[FilterStoredType] def filter_by_trailing_slash( items: t.Iterable[FilterWrappedType], with_slash: bool -) -> frozenset[FilterWrappedType]: +) -> t.FrozenSet[FilterWrappedType]: """....""" return frozenset(wrapped for wrapped in items if with_slash == wrapped.pattern.has_trailing_slash) TreeStoredType = t.TypeVar('TreeStoredType', bound=t.Hashable) -StoredSet = frozenset[StoredTreeItem[TreeStoredType]] +StoredSet = t.FrozenSet[StoredTreeItem[TreeStoredType]] PathBranch = PatternTreeBranch[StoredSet] DomainBranch = PatternTreeBranch[PathBranch] -TreeRoot = Map[tuple[str, t.Optional[int]], DomainBranch] +TreeRoot = Map[t.Tuple[str, t.Optional[int]], DomainBranch] @dc.dataclass(frozen=True) class PatternTree(t.Generic[TreeStoredType]): -- cgit v1.2.3