Format code with yapf

This commit is contained in:
Wiktor Zykubek 2023-07-10 17:04:47 +02:00
parent 27bb48b97c
commit 92cfe6fa51
No known key found for this signature in database
GPG Key ID: 0DAA9DC01449FCA2
3 changed files with 12 additions and 14 deletions

View File

@ -1,7 +1,9 @@
# This Python file uses the following encoding: utf-8
# coding=utf-8
API_URL = "https://open.fm/radio/api/v2/ofm/stations_slug.json"
DEFAULT_VOLUME = 70
from .ui_main_window import Ui_MainWindow
from .mainwindow import MainWindow
from .ui_main_window import Ui_MainWindow # nopep8: E402
from .mainwindow import MainWindow # nopep8: E402
__all__ = [Ui_MainWindow, MainWindow]

View File

@ -1,4 +1,4 @@
# This Python file uses the following encoding: utf-8
# coding=utf-8
from PySide6.QtCore import QUrl
from PySide6.QtWidgets import QMainWindow, QMessageBox, QStyle
@ -51,8 +51,7 @@ class MainWindow(QMainWindow):
def printGroups(self) -> None:
"""Print groups (categories) in groupsListWidget."""
self.ui.groupsListWidget.addItems(
[e["name"] for e in self.__stations_data["groups"]]
)
[e["name"] for e in self.__stations_data["groups"]])
def printStations(self) -> None:
"""Print stations (channels) in stationsListWidget."""
@ -63,13 +62,10 @@ class MainWindow(QMainWindow):
group_id = e["id"]
self.ui.stationsListWidget.clear()
self.ui.stationsListWidget.addItems(
[
e["name"]
for e in self.__stations_data["channels"]
self.ui.stationsListWidget.addItems([
e["name"] for e in self.__stations_data["channels"]
if e["group_id"] == group_id
]
)
])
def setVolume(self, volume: int = None) -> None:
"""Set playback volume to given number or slider value."""

View File

@ -1,4 +1,4 @@
# This Python file uses the following encoding: utf-8
# coding=utf-8
import sys
import os