Compare commits

...
Author SHA1 Message Date
aclist 1a4bc40cf6 drop: unused comment 2026-11-23 20:24:23 +09:00
aclist 4487833d99 chore: add debug logging 2026-11-23 20:23:55 +09:00
aclist e528580350 fix: f-string 2026-11-23 20:23:39 +09:00
aclist e5d94a8c52 chore: update log levels 2026-11-23 20:19:02 +09:00
aclist 29c2765732 docs: update DEVELOPERS.md 2026-11-23 20:08:59 +09:00
aclist 0d946de881 drop: unused import 2026-11-23 20:07:19 +09:00
aclist abf68b0962 Merge pull request #550 from aclist/chore/audit-strings
chore: audit strings (2)
2026-11-23 20:06:13 +09:00
aclist 47168cd0bf Merge pull request #547 from aclist/chore/audit-strings
chore: audit strings
2026-11-23 20:05:02 +09:00
aclist db2ddca9a5 Merge pull request #549 from aclist/chore/import-untyped
Mirror to Codeberg / mirror-to-codeberg (push) Canceled after 0s
chore: clear typehinting errors
2026-11-22 14:00:05 +09:00
aclist 5c81f228b0 chore: clear typehinting errors 2026-11-22 13:59:22 +09:00
9 changed files with 19 additions and 11 deletions

No files matched your search

+5
View File
@@ -29,3 +29,8 @@ sphinx-build -M html source build -a
2. Set up the build target: `rustup target add x86_64-unknown-linux-musl` 2. Set up the build target: `rustup target add x86_64-unknown-linux-musl`
3. Run `python3 scripts/release.py` 3. Run `python3 scripts/release.py`
4. Generate a release and tag against the resulting tarfile generated in `dist` 4. Generate a release and tag against the resulting tarfile generated in `dist`
### Running tests
Some tests are environment specific and require real configuration files.
For a generally environment-agnostic test suite, invoke `pytest -m "not realconfig, not flatpak"`
+3 -1
View File
@@ -2,7 +2,7 @@ import binascii
import ctypes import ctypes
import logging import logging
import shutil import shutil
import vdf # type: ignore import vdf # type: ignore[import-untyped]
from dataclasses import dataclass from dataclasses import dataclass
from importlib import resources from importlib import resources
@@ -114,6 +114,7 @@ class Shortcuts:
make_parents(dest) make_parents(dest)
b = images.joinpath(img).with_suffix(".png").read_bytes() b = images.joinpath(img).with_suffix(".png").read_bytes()
dest.write_bytes(b) dest.write_bytes(b)
logger.debug(f"Wrote grid image to '{dest}'")
# NOTE: legacy Big Picture header # NOTE: legacy Big Picture header
b = images.joinpath("_hero.png").read_bytes() b = images.joinpath("_hero.png").read_bytes()
@@ -127,6 +128,7 @@ class Shortcuts:
except Exception: except Exception:
n = 0 n = 0
self.shortcuts["shortcuts"][str(n)] = entry self.shortcuts["shortcuts"][str(n)] = entry
logger.debug(f"Added shortcut at index {n}")
@classmethod @classmethod
def _create_entry(cls, meta: ShortcutMetadata) -> dict[str, Any]: def _create_entry(cls, meta: ShortcutMetadata) -> dict[str, Any]:
+1 -1
View File
@@ -4,7 +4,7 @@ import psutil
import re import re
import requests import requests
import subprocess import subprocess
import vdf # type: ignore import vdf # type: ignore[import-untyped]
from pathlib import Path from pathlib import Path
from requests.exceptions import HTTPError from requests.exceptions import HTTPError
+1 -1
View File
@@ -66,7 +66,7 @@ def copy_state_files(state_path: Path) -> None:
".month", ".month",
] ]
if state_path == legacy: if state_path == legacy:
# TODO: log this logger.debug(f"Legacy state path '{legacy}' is identical to current")
return return
for file in legacy.iterdir(): for file in legacy.iterdir():
if file.name in to_copy: if file.name in to_copy:
-1
View File
@@ -13,7 +13,6 @@ from dzgui.api.probe import test_steam_api
from dzgui.const.enum import Preferences from dzgui.const.enum import Preferences
from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager
from dzgui.views.dialogs.generic import ExceptionDialog from dzgui.views.dialogs.generic import ExceptionDialog
from dzgui.strings import dialogs
from dzgui.util._json import read_json, write_json from dzgui.util._json import read_json, write_json
if TYPE_CHECKING: if TYPE_CHECKING:
+1 -1
View File
@@ -147,7 +147,7 @@ class ConnectionManager:
self.missing_mods = missing_mods self.missing_mods = missing_mods
self.remote_mod_ids = [mod[1] for mod in remote_mods] self.remote_mod_ids = [mod[1] for mod in remote_mods]
except Exception as e: except Exception as e:
logger.warning(e) logger.critical(e)
self.thread_man.set_cleanup_func(failure_func, destroy_first=True) self.thread_man.set_cleanup_func(failure_func, destroy_first=True)
return return
+1 -1
View File
@@ -50,7 +50,7 @@ class UpdateManager:
except Exception as e: except Exception as e:
func = StoredFunc(self._on_update_failure, str(e)) func = StoredFunc(self._on_update_failure, str(e))
self.thread_man.set_cleanup_func(func, destroy_first=True) self.thread_man.set_cleanup_func(func, destroy_first=True)
logger.warning(e) logger.critical(e)
def _on_update_success(self) -> None: def _on_update_success(self) -> None:
msg = dialogs.update_success msg = dialogs.update_success
+3 -3
View File
@@ -205,7 +205,7 @@ class ServerModelManager:
res = Servers.query_by_ip(addr) res = Servers.query_by_ip(addr)
self._parse_single_record(res) self._parse_single_record(res)
except Exception as e: except Exception as e:
logger.warning(e) logger.critical(e)
self.thread_man.set_cleanup_func( self.thread_man.set_cleanup_func(
StoredFunc(self._cleanup_on_failure), destroy_first=True StoredFunc(self._cleanup_on_failure), destroy_first=True
) )
@@ -219,7 +219,7 @@ class ServerModelManager:
res = Servers.query_by_record(record) res = Servers.query_by_record(record)
self._parse_single_record(res) self._parse_single_record(res)
except Exception as e: except Exception as e:
logger.warning(e) logger.critical(e)
self.thread_man.set_cleanup_func( self.thread_man.set_cleanup_func(
StoredFunc(self._cleanup_on_failure), destroy_first=True StoredFunc(self._cleanup_on_failure), destroy_first=True
) )
@@ -232,7 +232,7 @@ class ServerModelManager:
res = Servers.query_by_record(record) res = Servers.query_by_record(record)
self._parse_single_record(res, delete=True) self._parse_single_record(res, delete=True)
except Exception as e: except Exception as e:
logger.warning(e) logger.critical(e)
self.thread_man.set_cleanup_func( self.thread_man.set_cleanup_func(
StoredFunc(self._cleanup_on_failure), destroy_first=True StoredFunc(self._cleanup_on_failure), destroy_first=True
) )
+4 -2
View File
@@ -1,5 +1,5 @@
import pytest import pytest
import vdf import vdf # type: ignore[import-untyped]
from pathlib import Path from pathlib import Path
@@ -7,11 +7,13 @@ from dzgui.api.mods import get_local_mod_ids
from dzgui.util.dirs import make_parents from dzgui.util.dirs import make_parents
from tests.fixtures import fixture_path from tests.fixtures import fixture_path
@pytest.fixture @pytest.fixture
def libraryfolders() -> Path: def libraryfolders() -> Path:
return fixture_path("api/steamapps/libraryfolders.vdf") return fixture_path("api/steamapps/libraryfolders.vdf")
def test_missing_mod_dir(tmp_path, libraryfolders: Path) -> None:
def test_missing_mod_dir(tmp_path: Path, libraryfolders: Path) -> None:
""" """
Updates fixture file key with tmp path value serializes to file, Updates fixture file key with tmp path value serializes to file,
then tests for missing mod directory returning an empty list then tests for missing mod directory returning an empty list