Skip to content

Commit 2cb920a

Browse files
Apply suggestions from code review
Co-authored-by: VasigaranAndAngel <[email protected]>
1 parent d49d95e commit 2cb920a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

tagstudio/src/core/settings/libsettings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def open(path_value: Path | str) -> "LibSettings":
2727
return LibSettings(**settings_data)
2828

2929
# either settings file did not exist or was empty - either way, use default settings
30-
settings = LibSettings(**dict(filename=str(path)))
30+
settings = LibSettings(filename=str(path))
3131
return settings
3232

3333
def save(self):

tagstudio/src/core/settings/tssettings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def read_settings(path: Path | str) -> "TSSettings":
3030
settings = TSSettings(**settings_data)
3131
return settings
3232

33-
return TSSettings(**dict(filename=str(path)))
33+
return TSSettings(filename=str(path))
3434

3535
def save(self, path: Path | str | None = None) -> None:
3636
path_value: Path = Path(path) if isinstance(path, str) else Path(self.filename)

tagstudio/src/core/tscacheddata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def open(path_value: Path | str | None = None) -> "TSCachedData":
4444
logger.info("opening cache file at ", cache_location=path)
4545
return TSCachedData(**cache_data)
4646

47-
return TSCachedData(**dict(path=str(default_cache_location)))
47+
return TSCachedData(path=str(default_cache_location))
4848

4949
def save(self):
5050
with open(self.path, "w") as f:

tagstudio/src/qt/modals/file_extension.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def __init__(self, library: "Library"):
7373
lambda text: self.mode_combobox.setItemText(1, text), "ignore_list.mode.exclude"
7474
)
7575

76-
is_exclude_list = int(bool(self.lib.settings.is_exclude_list))
76+
is_exclude_list = int(self.lib.settings.is_exclude_list)
7777

7878
self.mode_combobox.setCurrentIndex(is_exclude_list)
7979
self.mode_combobox.currentIndexChanged.connect(lambda i: self.update_list_mode(i))

0 commit comments

Comments
 (0)