17 lines
No EOL
394 B
Python
17 lines
No EOL
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
|
|
|
|
|