diff --git a/jrnl/datatypes/NestedDict.py b/jrnl/datatypes/NestedDict.py deleted file mode 100644 index e989fa5f..00000000 --- a/jrnl/datatypes/NestedDict.py +++ /dev/null @@ -1,7 +0,0 @@ -"""https://stackoverflow.com/a/74873621/8740440""" - - -class NestedDict(dict): - def __missing__(self, x): - self[x] = NestedDict() - return self[x] diff --git a/jrnl/datatypes/__init__.py b/jrnl/datatypes/__init__.py deleted file mode 100644 index e9859ff9..00000000 --- a/jrnl/datatypes/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .NestedDict import NestedDict diff --git a/jrnl/plugins/util.py b/jrnl/plugins/util.py index 975c1ddd..56d11906 100644 --- a/jrnl/plugins/util.py +++ b/jrnl/plugins/util.py @@ -4,12 +4,17 @@ from collections import Counter from typing import TYPE_CHECKING -from jrnl.datatypes import NestedDict - if TYPE_CHECKING: from jrnl.journals import Journal +"""https://stackoverflow.com/a/74873621/8740440""" +class NestedDict(dict): + def __missing__(self, x): + self[x] = NestedDict() + return self[x] + + def get_tags_count(journal: "Journal") -> set[tuple[int, str]]: """Returns a set of tuples (count, tag) for all tags present in the journal.""" # Astute reader: should the following line leave you as puzzled as me the first time