You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
394 B
Python

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