Format code with yapf
This commit is contained in:
parent
27bb48b97c
commit
92cfe6fa51
@ -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"
|
API_URL = "https://open.fm/radio/api/v2/ofm/stations_slug.json"
|
||||||
DEFAULT_VOLUME = 70
|
DEFAULT_VOLUME = 70
|
||||||
|
|
||||||
from .ui_main_window import Ui_MainWindow
|
from .ui_main_window import Ui_MainWindow # nopep8: E402
|
||||||
from .mainwindow import MainWindow
|
from .mainwindow import MainWindow # nopep8: E402
|
||||||
|
|
||||||
|
__all__ = [Ui_MainWindow, MainWindow]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# This Python file uses the following encoding: utf-8
|
# coding=utf-8
|
||||||
|
|
||||||
from PySide6.QtCore import QUrl
|
from PySide6.QtCore import QUrl
|
||||||
from PySide6.QtWidgets import QMainWindow, QMessageBox, QStyle
|
from PySide6.QtWidgets import QMainWindow, QMessageBox, QStyle
|
||||||
@ -51,8 +51,7 @@ class MainWindow(QMainWindow):
|
|||||||
def printGroups(self) -> None:
|
def printGroups(self) -> None:
|
||||||
"""Print groups (categories) in groupsListWidget."""
|
"""Print groups (categories) in groupsListWidget."""
|
||||||
self.ui.groupsListWidget.addItems(
|
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:
|
def printStations(self) -> None:
|
||||||
"""Print stations (channels) in stationsListWidget."""
|
"""Print stations (channels) in stationsListWidget."""
|
||||||
@ -63,13 +62,10 @@ class MainWindow(QMainWindow):
|
|||||||
group_id = e["id"]
|
group_id = e["id"]
|
||||||
|
|
||||||
self.ui.stationsListWidget.clear()
|
self.ui.stationsListWidget.clear()
|
||||||
self.ui.stationsListWidget.addItems(
|
self.ui.stationsListWidget.addItems([
|
||||||
[
|
e["name"] for e in self.__stations_data["channels"]
|
||||||
e["name"]
|
if e["group_id"] == group_id
|
||||||
for e in self.__stations_data["channels"]
|
])
|
||||||
if e["group_id"] == group_id
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
def setVolume(self, volume: int = None) -> None:
|
def setVolume(self, volume: int = None) -> None:
|
||||||
"""Set playback volume to given number or slider value."""
|
"""Set playback volume to given number or slider value."""
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# This Python file uses the following encoding: utf-8
|
# coding=utf-8
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
Loading…
x
Reference in New Issue
Block a user