WIP Prepare version_repository.py

This commit is contained in:
erik 2023-02-16 16:55:23 +01:00
parent 38c7aa97ca
commit 7eb7a2647a

17
version_repository.py Normal file
View file

@ -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