pep8: Some modifications to respect pep8 standard code.

This commit is contained in:
Pierre-Antoine Rouby committed 2023-10-11 11:06:45 +02:00
1 parent 8544dd1144
commit fa2454d079
152 files changed
+1626 -1277

No files matched your search

+1
View File
@@ -22,6 +22,7 @@ from View.Tools.PamhyrTranslate import PamhyrTranslate
_translate = QCoreApplication.translate
class CheckListTranslate(PamhyrTranslate):
def __init__(self):
super(CheckListTranslate, self).__init__()
+15 -13
View File
@@ -44,13 +44,14 @@ from View.CheckList.Translate import CheckListTranslate
_translate = QCoreApplication.translate
class CheckListWindow(PamhyrWindow):
_pamhyr_ui = "CheckList"
_pamhyr_name = "Check list"
signalStatus = pyqtSignal(str)
def __init__(self, autorun:bool=True,
def __init__(self, autorun: bool = True,
study=None, config=None,
solver=None, parent=None):
self._autorun = autorun
@@ -59,12 +60,12 @@ class CheckListWindow(PamhyrWindow):
name = self._pamhyr_name + " - " + study.name
super(CheckListWindow, self).__init__(
title = name,
study = study,
config = config,
trad = CheckListTranslate(),
options = [],
parent = parent
title=name,
study=study,
config=config,
trad=CheckListTranslate(),
options=[],
parent=parent
)
self._checker_list = (
@@ -81,9 +82,9 @@ class CheckListWindow(PamhyrWindow):
def setup_table(self):
table = self.find(QTableView, f"tableView")
self._table = TableModel(
table_view = table,
table_headers = self._trad.get_dict("table_headers"),
data = self._checker_list,
table_view=table,
table_headers=self._trad.get_dict("table_headers"),
data=self._checker_list,
)
def setup_progress_bar(self):
@@ -120,7 +121,8 @@ class CheckListWindow(PamhyrWindow):
def _compute_status(self):
ok = len(list(filter(lambda c: c.is_ok(), self._checker_list)))
warning = len(list(filter(lambda c: c.is_warning(), self._checker_list)))
warning = len(
list(filter(lambda c: c.is_warning(), self._checker_list)))
error = len(list(filter(lambda c: c.is_error(), self._checker_list)))
return ok, warning, error
@@ -164,7 +166,7 @@ class CheckListWindow(PamhyrWindow):
self.update_statusbar()
def update(self, key:str):
def update(self, key: str):
if key == "start":
self.start_compute()
self.info_compute("Starting ...")
@@ -187,4 +189,4 @@ class CheckListWindow(PamhyrWindow):
def accept(self):
self._parent.solver_log(self._solver)
#self.end()
# self.end()
+1
View File
@@ -22,6 +22,7 @@ from PyQt5.QtCore import (
Qt, QObject, pyqtSlot, pyqtSignal
)
class Worker(QObject):
signalStatus = pyqtSignal(str)