style: format all code to PEP8 (flake8 clean)

Reformat every module with autopep8 and hand-tune the remaining long
lines so that `flake8` passes with default settings (max line length
79). No behavior changes: long f-strings, messages, QSS/Textual CSS
rules and argument lists are only wrapped or split, an unused import
and an unused local are dropped, and dbus-next D-Bus signature
annotations carry targeted `# noqa` comments.
This commit is contained in:
jads
2026-10-23 23:52:14 +03:00
parent 4460791a95
commit e71f5623a7
7 changed files with 558 additions and 213 deletions

View File

@@ -3,7 +3,6 @@
from __future__ import annotations
import json
from pathlib import Path
from mtsmusic import CONFIG_DIR
@@ -12,7 +11,8 @@ HISTORY_LIMIT = 100
def track_artist(track: dict) -> str:
return ", ".join(a.get("name", "?") for a in track.get("artists") or []) or "?"
return ", ".join(a.get("name", "?")
for a in track.get("artists") or []) or "?"
def track_album(track: dict) -> str:
@@ -58,7 +58,9 @@ def record_history(track: dict) -> list[dict]:
track_id = str(track.get("id") or "")
if not track_id:
return load_history()
history = [item for item in load_history() if str(item.get("id")) != track_id]
history = [
item for item in load_history() if str(
item.get("id")) != track_id]
history.insert(0, track)
history = history[:HISTORY_LIMIT]
try: