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

@@ -67,7 +67,8 @@ class MusicPlayer:
return command + [url]
async def set_volume(self, volume: int) -> None:
"""Меняет громкость; ffplay/mpv не умеют на лету, поэтому перезапускаем."""
"""Меняет громкость; ffplay/mpv не умеют на лету, поэтому
перезапускаем."""
self.volume = max(0, min(100, int(volume)))
if self.url and self.is_playing():
position = self.elapsed()
@@ -145,7 +146,12 @@ class MusicPlayer:
if not self.proc:
return 0.0
now = self.paused_at if self.paused else time.monotonic()
return max(0.0, self.offset + now - self.started_at - self.paused_total)
return max(
0.0,
self.offset +
now -
self.started_at -
self.paused_total)
async def seek(self, delta: float, duration: float) -> None:
"""Seek by delta seconds. Restarts ffplay at the new position."""