Added collections
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from dataclasses import dataclass
|
||||
from dataclasses_json import dataclass_json
|
||||
from typing import List
|
||||
|
||||
|
||||
@dataclass_json
|
||||
@@ -20,3 +21,4 @@ class ConfigModel:
|
||||
class PathsModel:
|
||||
first_browser_path: str
|
||||
second_browser_path: str
|
||||
collections_list: List[str]
|
||||
|
||||
@@ -8,7 +8,8 @@ class PathsConfig:
|
||||
def default():
|
||||
return {
|
||||
"first_browser_path": "",
|
||||
"second_browser_path": ""
|
||||
"second_browser_path": "",
|
||||
"collections_list": list()
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
@@ -31,7 +32,7 @@ class PathsConfig:
|
||||
return PathsConfig.get()
|
||||
|
||||
@staticmethod
|
||||
def update(key: str, value: str | None) -> dict:
|
||||
def update(key: str, value: str | list | None) -> dict:
|
||||
with open("data/config.path", "r") as file:
|
||||
settings = json.load(file)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user