diff --git a/openfm_qt/__init__.py b/openfm_qt/__init__.py index b2f385b..6ea43af 100644 --- a/openfm_qt/__init__.py +++ b/openfm_qt/__init__.py @@ -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] diff --git a/openfm_qt/mainwindow.py b/openfm_qt/mainwindow.py index d988db2..82f0d9b 100644 --- a/openfm_qt/mainwindow.py +++ b/openfm_qt/mainwindow.py @@ -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"] - if e["group_id"] == group_id - ] - ) + 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.""" diff --git a/prebuild.py b/prebuild.py index b12c893..edcc661 100644 --- a/prebuild.py +++ b/prebuild.py @@ -1,4 +1,4 @@ -# This Python file uses the following encoding: utf-8 +# coding=utf-8 import sys import os