From 00487547c4aff6bf0c94438768191960a3369365 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 27 Sep 2022 13:42:55 +0200 Subject: [proxy] facilitate manually pruning orphaned packages (including installed ones) --- src/hydrilla/proxy/state.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/hydrilla/proxy/state.py') diff --git a/src/hydrilla/proxy/state.py b/src/hydrilla/proxy/state.py index 7613d54..559a546 100644 --- a/src/hydrilla/proxy/state.py +++ b/src/hydrilla/proxy/state.py @@ -467,6 +467,7 @@ class MappingUseMode(Enum): WHEN_ENABLED = 'W' QUESTION = 'Q' + @dc.dataclass(frozen=True) class HaketiloGlobalSettings: """....""" @@ -481,12 +482,26 @@ class MissingItemError(ValueError): pass +@dc.dataclass(frozen=True) +class OrphanItemsStats: + mappings: int + resources: int + + class HaketiloState(ABC): """....""" @abstractmethod def import_items(self, malcontent_path: Path) -> None: ... + @abstractmethod + def count_orphan_items(self) -> OrphanItemsStats: + ... + + @abstractmethod + def prune_orphan_items(self) -> None: + ... + @abstractmethod def rule_store(self) -> RuleStore: ... -- cgit v1.2.3