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
@@ -60,6 +60,7 @@ _translate = QCoreApplication.translate
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
||||
class InitialConditionsWindow(PamhyrWindow):
|
||||
_pamhyr_ui = "InitialConditions"
|
||||
_pamhyr_name = "Initial condition"
|
||||
@@ -77,11 +78,11 @@ class InitialConditionsWindow(PamhyrWindow):
|
||||
)
|
||||
|
||||
super(InitialConditionsWindow, self).__init__(
|
||||
title = name,
|
||||
study = study,
|
||||
config = config,
|
||||
trad = ICTranslate(),
|
||||
parent = parent
|
||||
title=name,
|
||||
study=study,
|
||||
config=config,
|
||||
trad=ICTranslate(),
|
||||
parent=parent
|
||||
)
|
||||
|
||||
self._ics = study.river.initial_conditions.get(self._reach)
|
||||
@@ -95,19 +96,19 @@ class InitialConditionsWindow(PamhyrWindow):
|
||||
def setup_table(self):
|
||||
table = self.find(QTableView, f"tableView")
|
||||
self._delegate_kp = ComboBoxDelegate(
|
||||
reach = self._reach,
|
||||
parent = self
|
||||
reach=self._reach,
|
||||
parent=self
|
||||
)
|
||||
|
||||
self._table = InitialConditionTableModel(
|
||||
reach = self._reach,
|
||||
table_view = table,
|
||||
table_headers = self._trad.get_dict("table_headers"),
|
||||
editable_headers = ["kp", "discharge", "elevation", "height"],
|
||||
delegates = {"kp": self._delegate_kp},
|
||||
data = self._study,
|
||||
undo = self._undo_stack,
|
||||
trad = self._trad
|
||||
reach=self._reach,
|
||||
table_view=table,
|
||||
table_headers=self._trad.get_dict("table_headers"),
|
||||
editable_headers=["kp", "discharge", "elevation", "height"],
|
||||
delegates={"kp": self._delegate_kp},
|
||||
data=self._study,
|
||||
undo=self._undo_stack,
|
||||
trad=self._trad
|
||||
)
|
||||
|
||||
table.setModel(self._table)
|
||||
@@ -126,11 +127,11 @@ class InitialConditionsWindow(PamhyrWindow):
|
||||
self.plot_layout_1.addWidget(self.canvas_1)
|
||||
|
||||
self.plot_1 = PlotDKP(
|
||||
canvas = self.canvas_1,
|
||||
data = self._ics,
|
||||
trad = self._trad,
|
||||
toolbar = self.toolbar_1,
|
||||
parent = self
|
||||
canvas=self.canvas_1,
|
||||
data=self._ics,
|
||||
trad=self._trad,
|
||||
toolbar=self.toolbar_1,
|
||||
parent=self
|
||||
)
|
||||
self.plot_1.draw()
|
||||
|
||||
@@ -144,11 +145,11 @@ class InitialConditionsWindow(PamhyrWindow):
|
||||
self.plot_layout_2.addWidget(self.canvas_2)
|
||||
|
||||
self.plot_2 = PlotDischarge(
|
||||
canvas = self.canvas_2,
|
||||
data = self._ics,
|
||||
trad = self._trad,
|
||||
toolbar = self.toolbar_2,
|
||||
parent = self
|
||||
canvas=self.canvas_2,
|
||||
data=self._ics,
|
||||
trad=self._trad,
|
||||
toolbar=self.toolbar_2,
|
||||
parent=self
|
||||
)
|
||||
self.plot_2.draw()
|
||||
|
||||
|
||||
Reference in new issue
Block a user