From 11338ebf7c73232bfb7d911ff98bc9d4039d0b20 Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Wed, 17 Jul 2024 22:59:13 +0100 Subject: [PATCH] more tweaking --- examples.py | 2 +- pseudodb/pseudodb.py | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/examples.py b/examples.py index 7dc2842..84d46cb 100644 --- a/examples.py +++ b/examples.py @@ -6,7 +6,7 @@ from utils.misc_utils import immutable_to_list if __name__ == '__main__': db = pseudodb.PseudoDB('pseudodb.default.data') - data_collections = db.data_collections() + data_collections = db.get_collections() print("Collections in Pseudodb: "+str(data_collections)) for collection in data_collections: print("Collection: "+collection) diff --git a/pseudodb/pseudodb.py b/pseudodb/pseudodb.py index 68bdb51..de44ca0 100644 --- a/pseudodb/pseudodb.py +++ b/pseudodb/pseudodb.py @@ -15,7 +15,7 @@ class PseudoDB: print(f"Data module '{module_name}' not found.") return None - def data_collections(self): + def get_collections(self): # Check if default has been successfully loaded if self.data is not None: attr_names = [] @@ -26,12 +26,6 @@ class PseudoDB: else: return [] - def collections(self, attr_name): - if self.data is not None: - return getattr(self.data, attr_name) - else: - return None - def get_keys(self, attr_name): if self.data is not None: collection = getattr(self.data, attr_name)