From 38515e9b4230964fd0e3a669890778e9b2ed5ecb Mon Sep 17 00:00:00 2001 From: Andre Senna <“andre.senna@gmail.com”> Date: Wed, 11 Sep 2024 12:32:08 -0300 Subject: [PATCH] Added type alias for atom handle --- CHANGELOG | 2 +- hyperon_das_atomdb/database.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 8b137891..eb5c4f5a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1 +1 @@ - +[#214] Added type alias for atom handle diff --git a/hyperon_das_atomdb/database.py b/hyperon_das_atomdb/database.py index d1269d40..8dccdcd8 100644 --- a/hyperon_das_atomdb/database.py +++ b/hyperon_das_atomdb/database.py @@ -35,6 +35,8 @@ # pylint: disable=invalid-name +HandleT: TypeAlias = str + AtomT: TypeAlias = dict[str, Any] NodeT: TypeAlias = AtomT @@ -49,7 +51,7 @@ MatchedTargetsListT: TypeAlias = list[tuple[str, tuple[str, ...]]] -HandlesListT: TypeAlias = list[str] +HandlesListT: TypeAlias = list[HandleT] MatchedLinksResultT: TypeAlias = tuple[int | None, HandlesListT | MatchedTargetsListT]