Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
[*] Fix code style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
IceflowRE committed Dec 14, 2020
1 parent 954c59e commit 1de965d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion mp3monitoring/core/signal/_signal_no_qt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Signal():
class Signal:
"""
Use those weird name because of https://bugreports.qt.io/browse/PYSIDE-1264.
"""
Expand Down
2 changes: 1 addition & 1 deletion mp3monitoring/gui/dialog/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def change_update_check(self):
if self._update_check_runner.update_available:
self.update_status.setPixmap(QIcon(str(pkg_data.WARNING_SYMBOL)).pixmap(QSize(self.update_info.height() * 0.8, self.update_info.height() * 0.8)))
self.update_info.setText("An Update is available.")
# executed in a top-level script environment e.g. pythonw -m mp3monitoring --gui, ONLY then we can update, otherwise the executable is locked by us obviously
# executed in a top-level script environment e.g. pythonw -m mp3monitoring --gui, ONLY then we can update, otherwise the executable is locked
if Path(sys.modules['__main__'].__file__) == Path(sysconfig.get_paths()['purelib']) / "mp3monitoring" / "__main__.py":
self.update_now.show()
else:
Expand Down
7 changes: 2 additions & 5 deletions mp3monitoring/gui/window/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ def update_job_actions(self, sel_job_idx: int = -1):
self.action_start_job.setEnabled(not sel_job.is_active())
self.action_stop_job.setEnabled(sel_job.is_active() and not sel_job.is_stopping())

def monitor_selection_changed(self, selected: QItemSelection, deselected: QItemSelection):
def monitor_selection_changed(self, selected: QItemSelection, _deselected: QItemSelection):
self.update_job_actions(selected.indexes()[0].row())

def monitor_data_changed(self, top_left: QModelIndex, bottom_right: QModelIndex, roles):
def monitor_data_changed(self, _top_left: QModelIndex, _bottom_right: QModelIndex, _roles):
sel_idx = self.monitor_table_view.selectedIndexes()
if len(sel_idx) > 0:
self.update_job_actions(sel_idx[0].row())
Expand Down Expand Up @@ -177,6 +177,3 @@ def handle_start_job(self):

def handle_stop_job(self):
self._manager.jobs[self.monitor_table_view.selectionModel().currentIndex().row()].stop(False)

def handle_check_update(self):
show.information_dialog('Not implemented yet.', 'Checking for updates is not implemented yet.')
2 changes: 1 addition & 1 deletion mp3monitoring/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def main(argv=None):
if not args.gui:
stop_event: threading.Event = threading.Event()

def signal_handler(sig, frame):
def signal_handler(_sig, _frame):
stop_event.set()

signal.signal(signal.SIGINT, signal_handler)
Expand Down

0 comments on commit 1de965d

Please sign in to comment.