From 81dbed9ca24fecb893ccfa6239cd629e7a339d8b Mon Sep 17 00:00:00 2001 From: Kumi Date: Wed, 6 Sep 2023 13:47:21 +0200 Subject: [PATCH] Refactor Core class to find and include external notifiers and providers The Core class in core.py has been refactored to include a new method find_external_notifiers() which is currently returning an empty list, and find_external_providers() which is also returning an empty list. Both methods are placeholders for future implementation using entry points. The find_notifiers() and find_providers() methods have been updated to include the results of the new methods. --- src/trackbert/classes/core.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/trackbert/classes/core.py b/src/trackbert/classes/core.py index 0af16be..1f6f623 100644 --- a/src/trackbert/classes/core.py +++ b/src/trackbert/classes/core.py @@ -70,8 +70,12 @@ class Core: return notifiers + def find_external_notifiers(self): + # TODO: Implement external notifiers using entry points + return [] + def find_notifiers(self): - return self.find_core_notifiers() + return self.find_core_notifiers() + self.find_external_notifiers() def find_core_providers(self): logging.debug("Finding core tracking providers") @@ -113,8 +117,12 @@ class Core: return providers + def find_external_providers(self): + # TODO: Implement external providers using entry points + return [] + def find_providers(self): - return self.find_core_providers() + return self.find_core_providers() + self.find_external_providers() def query_provider(self, tracking_number: str, carrier: str) -> list: logging.debug(f"Querying provider for {tracking_number} with carrier {carrier}")