feat: create config class to replace use of config file in application
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
from src import database
|
||||
|
||||
from omegaconf import OmegaConf
|
||||
|
||||
config = OmegaConf.load("config.yaml")
|
||||
|
||||
|
||||
def delete_temp_contents():
|
||||
"""
|
||||
delete_temp_contents deletes the contents of the temp directory.
|
||||
"""
|
||||
path = config.database.tempdir
|
||||
path = database.tempdir
|
||||
path = path.replace("~", str(Path.home()))
|
||||
path = Path(path)
|
||||
path = path.resolve()
|
||||
|
||||
Reference in New Issue
Block a user