diff --git a/tagstudio/src/core/settings/libsettings.py b/tagstudio/src/core/settings/libsettings.py index ffad59889..9eb41a318 100644 --- a/tagstudio/src/core/settings/libsettings.py +++ b/tagstudio/src/core/settings/libsettings.py @@ -27,7 +27,7 @@ def open(path_value: Path | str) -> "LibSettings": return LibSettings(**settings_data) # either settings file did not exist or was empty - either way, use default settings - settings = LibSettings(**dict(filename=str(path))) + settings = LibSettings(filename=str(path)) return settings def save(self): diff --git a/tagstudio/src/core/settings/tssettings.py b/tagstudio/src/core/settings/tssettings.py index 074f0c7a5..6bc5497cb 100644 --- a/tagstudio/src/core/settings/tssettings.py +++ b/tagstudio/src/core/settings/tssettings.py @@ -30,7 +30,7 @@ def read_settings(path: Path | str) -> "TSSettings": settings = TSSettings(**settings_data) return settings - return TSSettings(**dict(filename=str(path))) + return TSSettings(filename=str(path)) def save(self, path: Path | str | None = None) -> None: path_value: Path = Path(path) if isinstance(path, str) else Path(self.filename) diff --git a/tagstudio/src/core/tscacheddata.py b/tagstudio/src/core/tscacheddata.py index 23da27378..165d99182 100644 --- a/tagstudio/src/core/tscacheddata.py +++ b/tagstudio/src/core/tscacheddata.py @@ -44,7 +44,7 @@ def open(path_value: Path | str | None = None) -> "TSCachedData": logger.info("opening cache file at ", cache_location=path) return TSCachedData(**cache_data) - return TSCachedData(**dict(path=str(default_cache_location))) + return TSCachedData(path=str(default_cache_location)) def save(self): with open(self.path, "w") as f: diff --git a/tagstudio/src/qt/modals/file_extension.py b/tagstudio/src/qt/modals/file_extension.py index aa7a504a9..79d7e8d51 100644 --- a/tagstudio/src/qt/modals/file_extension.py +++ b/tagstudio/src/qt/modals/file_extension.py @@ -73,7 +73,7 @@ def __init__(self, library: "Library"): lambda text: self.mode_combobox.setItemText(1, text), "ignore_list.mode.exclude" ) - is_exclude_list = int(bool(self.lib.settings.is_exclude_list)) + is_exclude_list = int(self.lib.settings.is_exclude_list) self.mode_combobox.setCurrentIndex(is_exclude_list) self.mode_combobox.currentIndexChanged.connect(lambda i: self.update_list_mode(i))