From 7eb7a2647a59d782899e2ba2dcf02bb943a83ab0 Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 16 Feb 2023 16:55:23 +0100 Subject: [PATCH] WIP Prepare version_repository.py --- version_repository.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 version_repository.py diff --git a/version_repository.py b/version_repository.py new file mode 100644 index 0000000..57c362d --- /dev/null +++ b/version_repository.py @@ -0,0 +1,17 @@ +from file_handlers import FileHandler + +class VersionRepository(): + + def __init__(self, file): + self.file = file + + @classmethod + def load_file(cls, file): + file_handler = FileHandler.from_file_path(file) + version, is_snapshot = file_handler.parse() + inst = cls(version, is_snapshot) + inst.file_handler = file_handler + + return inst + + \ No newline at end of file