mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
pep8: Some modifications to respect pep8 standard code.
This commit is contained in:
1 parent
8544dd1144
commit
fa2454d079
152 files changed
+1626
-1277
No files matched your search
@@ -44,6 +44,7 @@ logger = logging.getLogger()
|
||||
|
||||
_translate = QCoreApplication.translate
|
||||
|
||||
|
||||
class TableModel(PamhyrTableModel):
|
||||
def _setup_lst(self):
|
||||
self._tab = self._opt_data
|
||||
|
||||
@@ -25,6 +25,7 @@ from PyQt5.QtWidgets import (
|
||||
|
||||
from Model.SolverParameters.SolverParametersList import SolverParametersList
|
||||
|
||||
|
||||
class SetCommand(QUndoCommand):
|
||||
def __init__(self, data, index, column, new_value):
|
||||
QUndoCommand.__init__(self)
|
||||
|
||||
@@ -50,6 +50,7 @@ _translate = QCoreApplication.translate
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
||||
class SolverParametersWindow(PamhyrWindow):
|
||||
_pamhyr_ui = "SolverParameters"
|
||||
_pamhyr_name = "Solver parameters"
|
||||
@@ -57,12 +58,12 @@ class SolverParametersWindow(PamhyrWindow):
|
||||
def __init__(self, study=None, config=None, parent=None):
|
||||
name = self._pamhyr_name + " - " + study.name
|
||||
super(SolverParametersWindow, self).__init__(
|
||||
title = name,
|
||||
study = study,
|
||||
config = config,
|
||||
options = ['copy'],
|
||||
trad = ParamTranslate(),
|
||||
parent = parent
|
||||
title=name,
|
||||
study=study,
|
||||
config=config,
|
||||
options=['copy'],
|
||||
trad=ParamTranslate(),
|
||||
parent=parent
|
||||
)
|
||||
|
||||
self._params = self._study.river.parameters
|
||||
@@ -96,13 +97,13 @@ class SolverParametersWindow(PamhyrWindow):
|
||||
|
||||
# Create table model
|
||||
self._table[st] = TableModel(
|
||||
table_view = table,
|
||||
data = self._study.river,
|
||||
opt_data = st,
|
||||
table_headers = self._trad.get_dict("table_headers"),
|
||||
editable_headers = ["value"],
|
||||
trad = self._trad,
|
||||
undo = self._undo_stack[st],
|
||||
table_view=table,
|
||||
data=self._study.river,
|
||||
opt_data=st,
|
||||
table_headers=self._trad.get_dict("table_headers"),
|
||||
editable_headers=["value"],
|
||||
trad=self._trad,
|
||||
undo=self._undo_stack[st],
|
||||
)
|
||||
|
||||
table.setModel(self._table[st])
|
||||
|
||||
@@ -22,6 +22,7 @@ from View.Tools.PamhyrTranslate import PamhyrTranslate
|
||||
|
||||
_translate = QCoreApplication.translate
|
||||
|
||||
|
||||
class ParamTranslate(PamhyrTranslate):
|
||||
def __init__(self):
|
||||
super(ParamTranslate, self).__init__()
|
||||
|
||||
Reference in new issue
Block a user