Drop all mappings of config object into classes now that tests don't need that

This commit is contained in:
Veronica Berglyd Olsen
2023-05-16 23:00:30 +02:00
parent 7f8ffb228e
commit 324b204eaa
39 changed files with 578 additions and 638 deletions
+4 -4
View File
@@ -776,8 +776,8 @@ class Config:
class RecentProjects:
def __init__(self, mainConf):
self.mainConf = mainConf
def __init__(self, config):
self._conf = config
self._data = {}
return
@@ -786,7 +786,7 @@ class RecentProjects:
"""
self._data = {}
cacheFile = self.mainConf.dataPath(nwFiles.RECENT_FILE)
cacheFile = self._conf.dataPath(nwFiles.RECENT_FILE)
if not cacheFile.is_file():
return True
@@ -809,7 +809,7 @@ class RecentProjects:
def saveCache(self):
"""Save the cache dictionary of recent projects.
"""
cacheFile = self.mainConf.dataPath(nwFiles.RECENT_FILE)
cacheFile = self._conf.dataPath(nwFiles.RECENT_FILE)
cacheTemp = cacheFile.with_suffix(".tmp")
try:
with open(cacheTemp, mode="w+", encoding="utf-8") as outFile: