From 14ff10e9596688e57d558dcf0e7013c3f31d1847 Mon Sep 17 00:00:00 2001 From: Sean Doran Date: Fri, 27 Feb 2026 12:08:37 -0500 Subject: [PATCH] Fix: always use XDG config path, drop script_dir fallback; bump to v0.3.0 --- PKGBUILD | 2 +- pyproject.toml | 2 +- src/turnup/__init__.py | 2 +- src/turnup/config.py | 9 ++------- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 4a9bb57..3b2f315 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Sean Doran # AUR updates are automated via GitHub Actions on version tag push pkgname=turn-up-arch -pkgver=0.2.9 +pkgver=0.3.0 pkgrel=1 pkgdesc="USB serial knob/button mixer daemon for PipeWire/PulseAudio on Linux" arch=('any') diff --git a/pyproject.toml b/pyproject.toml index 7233161..2d6ae50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "turnup" -version = "0.2.9" +version = "0.3.0" description = "USB serial knob/button mixer daemon for PipeWire/PulseAudio on Linux" readme = "README.md" license = { text = "MIT" } diff --git a/src/turnup/__init__.py b/src/turnup/__init__.py index 0c7da1e..b345509 100644 --- a/src/turnup/__init__.py +++ b/src/turnup/__init__.py @@ -1,3 +1,3 @@ """Turn Up — USB serial mixer daemon for PipeWire/PulseAudio.""" -__version__ = "0.2.9" +__version__ = "0.3.0" diff --git a/src/turnup/config.py b/src/turnup/config.py index 4c07161..e0e3264 100755 --- a/src/turnup/config.py +++ b/src/turnup/config.py @@ -160,18 +160,13 @@ def load_config(path: str | None = None) -> dict: """Load configuration from *path*. If *path* is ``None`` the XDG-compliant location - ``~/.config/turnup/config.json`` is used, falling back to the directory - that contains this module for backwards compatibility. + ``~/.config/turnup/config.json`` is used. Returns the parsed and validated configuration dictionary. Exits with status 1 on malformed JSON. """ if path is None: - if os.path.exists(DEFAULT_CONFIG_PATH): - path = DEFAULT_CONFIG_PATH - else: - script_dir = os.path.dirname(os.path.abspath(__file__)) - path = os.path.join(script_dir, "config.json") + path = DEFAULT_CONFIG_PATH if not os.path.exists(path): log.warning("No config.json found at %s — writing defaults", path)