diff --git a/dzgui/app_init.py b/dzgui/app_init.py index 178da23..4903b20 100644 --- a/dzgui/app_init.py +++ b/dzgui/app_init.py @@ -22,7 +22,6 @@ from dzgui.init.migrate import ( copy_state_files, migrate_cols_file, ) -from dzgui.init.flock import lock_acquire from dzgui.init.prereqs import has_flatpak_client, has_steam_client from dzgui.strings import boot @@ -122,8 +121,6 @@ def load_steam_icon() -> None: def build_gui(version: str, is_debug: bool) -> App | None: - lock = lock_acquire() # noqa - set_locale() # NOTE: consider aborting this check if steam deck xdg_paths = get_xdg_paths() diff --git a/dzgui/main.py b/dzgui/main.py index 5e660cf..a32d021 100644 --- a/dzgui/main.py +++ b/dzgui/main.py @@ -43,6 +43,9 @@ def main() -> None: # NOTE: only import ligbirepository modules after the above check from dzgui.app_init import build_gui + from dzgui.init.flock import lock_acquire + + lock = lock_acquire() # noqa app = build_gui(version, args.debug) if app is None: diff --git a/tests/test_paused_downloads.py b/tests/test_paused_downloads.py index 86bbb70..1c45ca2 100644 --- a/tests/test_paused_downloads.py +++ b/tests/test_paused_downloads.py @@ -16,7 +16,7 @@ from dzgui.api.steam import is_dayz_downloading (["state_221100_1111"], False), ], ) -def test_dayz_patch_pending(monkeypatch, file_list, expect) -> None: +def test_dayz_patch_pending(monkeypatch, file_list: list[str], expect: bool) -> None: def mock_get_pending_downloads(steam_path: Path, appid: int) -> None: files = [Path(file) for file in file_list] return files