Added collections

This commit is contained in:
BarsTiger
2022-12-22 21:42:26 +02:00
parent 144705d1c3
commit b90410f15f
9 changed files with 246 additions and 25 deletions

View File

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

View File

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