From 7f656e514f17165823fda24179cb62c866b40a85 Mon Sep 17 00:00:00 2001 From: kraanzu Date: Sat, 21 Sep 2024 18:04:11 +0530 Subject: [PATCH] clean: remove unused --- dooit/ui/widgets/trees/model_tree.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/dooit/ui/widgets/trees/model_tree.py b/dooit/ui/widgets/trees/model_tree.py index cdd7461e..b96d2b21 100644 --- a/dooit/ui/widgets/trees/model_tree.py +++ b/dooit/ui/widgets/trees/model_tree.py @@ -159,24 +159,6 @@ def _get_parent(self, id: str) -> Optional[ModelType]: def _get_children(self, id: str) -> Iterable[ModelType]: raise NotImplementedError - def _insert_nodes(self, index: int, items: Iterable[Option]) -> None: - if not items: - return - - highlighted = self.highlighted - opts = self._options - opts = opts[:index] + list(items) + opts[index:] - - self.clear_options() - self.add_options(opts) - self.highlighted = highlighted - - def add_nodes(self, *items: Option, index: Optional[int] = None) -> None: - if index is None: - index = self.option_count - - self._insert_nodes(index, items) - @refresh_tree def _expand_node(self, _id: str) -> None: self.expanded_nodes[_id] = True