From 137368cc27020ff477435374d217c124c0ad5572 Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby Date: Wed, 20 Mar 2024 17:08:11 +0100 Subject: [PATCH] pamhyr: Fix pep8. --- src/View/CheckList/Table.py | 1 + src/View/CheckList/Worker.py | 4 ++-- src/View/MainWindow.py | 2 +- src/View/MainWindowTabChecker.py | 4 ++-- src/View/Tools/PamhyrList.py | 1 + 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/View/CheckList/Table.py b/src/View/CheckList/Table.py index e160eff5..658c3b32 100644 --- a/src/View/CheckList/Table.py +++ b/src/View/CheckList/Table.py @@ -74,6 +74,7 @@ class TableModel(PamhyrTableModel): return QVariant() + class TabTableModel(PamhyrTableModel): def _setup_lst(self): self._lst = self._opt_data diff --git a/src/View/CheckList/Worker.py b/src/View/CheckList/Worker.py index f17e055f..8726dbd4 100644 --- a/src/View/CheckList/Worker.py +++ b/src/View/CheckList/Worker.py @@ -50,6 +50,7 @@ class Worker(QObject): self.signalStatus.emit("progress") + class TabWorker(QObject): signalStatus = pyqtSignal(str) @@ -63,7 +64,6 @@ class TabWorker(QObject): def study(self): return self._study - @study.setter def study(self, study): self._study = study @@ -75,7 +75,7 @@ class TabWorker(QObject): while True: checker = self._checker_q.get() - if self._study == None: + if self._study is None: self._checker_q.put(checker) time.sleep(5) else: diff --git a/src/View/MainWindow.py b/src/View/MainWindow.py index ba2f46ed..3fa718e2 100644 --- a/src/View/MainWindow.py +++ b/src/View/MainWindow.py @@ -405,7 +405,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit): if self._tab_widget_checker.study != self._study: self._tab_widget_checker.study = self._study - self._tab_widget_checker.update(modules = Modules.STUDY) + self._tab_widget_checker.update(modules=Modules.STUDY) ######### # MODEL # diff --git a/src/View/MainWindowTabChecker.py b/src/View/MainWindowTabChecker.py index 1cab46f9..77ffc1a7 100644 --- a/src/View/MainWindowTabChecker.py +++ b/src/View/MainWindowTabChecker.py @@ -115,7 +115,6 @@ class WidgetChecker(PamhyrWidget): data=[], ) - def setup_connections(self): table = self.find(QTableView, f"tableView_checker") table.selectionModel()\ @@ -168,8 +167,9 @@ class WidgetChecker(PamhyrWidget): self._worker.study = self._study for checker in self._checkers: - if self._study == None: + if self._study is None: checker.reset() + self._worker_q.put(checker) return diff --git a/src/View/Tools/PamhyrList.py b/src/View/Tools/PamhyrList.py index 8ed8d15c..7acc7ee0 100644 --- a/src/View/Tools/PamhyrList.py +++ b/src/View/Tools/PamhyrList.py @@ -35,6 +35,7 @@ from PyQt5.QtWidgets import ( logger = logging.getLogger() + class PamhyrListModel(QAbstractListModel): def __init__(self, list_view=None,