🐛 | Code quality fixes
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m43s
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m43s
- config.py: move 'import shutil' to module level - player.py: unify type hints, narrow except, add debug log - discord_rpc.py: replace broad except Exception with specific types - gui.py: remove unused import; replace lambda closures with method refs; fix closure scope bug; extract _populate_list_page() to remove duplicate code; add public accessors; make flush_volume public; add AudioVisualizer.reset_activity() - tests: replace unused _f variable with Path.touch()
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Tunetti configuration — stored at ~/.config/tunetti/config.json ."""
|
||||
|
||||
import json
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
# ── Config file location (XDG compliant) ──────────────────────────────────
|
||||
@@ -42,7 +43,6 @@ def _migrate_legacy() -> None:
|
||||
if old_db_path.parent == Path(__file__).parent and old_db_path.exists():
|
||||
new_db_path = CONFIG_DIR / "music_history.db"
|
||||
if not new_db_path.exists():
|
||||
import shutil
|
||||
shutil.copy2(str(old_db_path), str(new_db_path))
|
||||
old["db_path"] = str(new_db_path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user