mirror of https://gitlab.com/pamhyr/pamhyr2
Fix pep8
parent
318f6a4668
commit
b0e0dc75f1
|
|
@ -374,7 +374,8 @@ class Mage(CommandLineSolver):
|
|||
files = files + self._export_BC(
|
||||
study, "LIM", LIM, repertory, qlog, name=name
|
||||
)
|
||||
files = files + self._export_QSO(study, QSO, repertory, qlog, name=name)
|
||||
files = files + self._export_QSO(study, QSO, repertory,
|
||||
qlog, name=name)
|
||||
|
||||
return files
|
||||
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ class PlotAC(PamhyrPlot):
|
|||
self.next_plot_selected.set_data([], [])
|
||||
|
||||
if (0 <= previous_id < self.data.number_profiles
|
||||
and not self._parent.tableView.isRowHidden(previous_id)):
|
||||
and not self._parent.tableView.isRowHidden(previous_id)):
|
||||
self.previous_plot_selected.set_data(
|
||||
self.data.profile(previous_id).get_station(),
|
||||
self.data.profile(previous_id).z()
|
||||
|
|
@ -201,7 +201,7 @@ class PlotAC(PamhyrPlot):
|
|||
self.previous_plot_selected.set_visible(True)
|
||||
|
||||
if (0 <= profile_id < self.data.number_profiles
|
||||
and not self._parent.tableView.isRowHidden(profile_id)):
|
||||
and not self._parent.tableView.isRowHidden(profile_id)):
|
||||
self.plot_selected.set_data(
|
||||
self.data.profile(profile_id).get_station(),
|
||||
self.data.profile(profile_id).z()
|
||||
|
|
@ -209,7 +209,7 @@ class PlotAC(PamhyrPlot):
|
|||
self.plot_selected.set_visible(True)
|
||||
|
||||
if (0 <= next_id < self.data.number_profiles
|
||||
and not self._parent.tableView.isRowHidden(next_id)):
|
||||
and not self._parent.tableView.isRowHidden(next_id)):
|
||||
self.next_plot_selected.set_data(
|
||||
self.data.profile(next_id).get_station(),
|
||||
self.data.profile(next_id).z()
|
||||
|
|
|
|||
|
|
@ -206,9 +206,12 @@ class GeometryWindow(PamhyrWindow):
|
|||
self.find(QCheckBox, "checkBox_show_interpolated").toggled.connect(
|
||||
self.update_redraw
|
||||
)
|
||||
self._table.modelReset.connect(self.update_interpolated_profiles_visibility)
|
||||
self._table.rowsInserted.connect(self.update_interpolated_profiles_visibility)
|
||||
self._table.rowsRemoved.connect(self.update_interpolated_profiles_visibility)
|
||||
self._table.modelReset.connect(
|
||||
self.update_interpolated_profiles_visibility)
|
||||
self._table.rowsInserted.connect(
|
||||
self.update_interpolated_profiles_visibility)
|
||||
self._table.rowsRemoved.connect(
|
||||
self.update_interpolated_profiles_visibility)
|
||||
if self._study.is_read_only():
|
||||
actions = {
|
||||
"action_export": self.export_to_file,
|
||||
|
|
@ -255,7 +258,8 @@ class GeometryWindow(PamhyrWindow):
|
|||
).isChecked()
|
||||
selection = self.tableView.selectionModel()
|
||||
for row in range(self._table.rowCount()):
|
||||
hidden = not show_interpolated and self._reach.profile(row).interpolated
|
||||
hidden = not show_interpolated \
|
||||
and self._reach.profile(row).interpolated
|
||||
self.tableView.setRowHidden(row, hidden)
|
||||
if hidden:
|
||||
selection.select(
|
||||
|
|
@ -263,7 +267,8 @@ class GeometryWindow(PamhyrWindow):
|
|||
QItemSelectionModel.Deselect | QItemSelectionModel.Rows
|
||||
)
|
||||
if selection.currentIndex().row() == row:
|
||||
selection.setCurrentIndex(QModelIndex(), QItemSelectionModel.NoUpdate)
|
||||
selection.setCurrentIndex(QModelIndex(),
|
||||
QItemSelectionModel.NoUpdate)
|
||||
|
||||
def update_redraw(self):
|
||||
self._update(redraw=True)
|
||||
|
|
|
|||
|
|
@ -919,7 +919,8 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
##################
|
||||
|
||||
def ensure_current_reach(self):
|
||||
"""Offer a reach selection when needed; return False on cancellation."""
|
||||
"""Offer a reach selection when needed;
|
||||
return False on cancellation."""
|
||||
if self._study is None:
|
||||
return False
|
||||
river = self._study.river
|
||||
|
|
|
|||
|
|
@ -93,7 +93,8 @@ class SelectProfileDialog(PamhyrDialog):
|
|||
for index in range(len(self._profiles)):
|
||||
if index not in self._selectable_indices:
|
||||
item = combobox.model().item(index)
|
||||
item.setFlags(item.flags() & ~(Qt.ItemIsEnabled | Qt.ItemIsSelectable))
|
||||
item.setFlags(item.flags() &
|
||||
~(Qt.ItemIsEnabled | Qt.ItemIsSelectable))
|
||||
|
||||
combobox.setCurrentIndex(
|
||||
self._selectable_indices[0] if self._selectable_indices else -1
|
||||
|
|
|
|||
|
|
@ -210,7 +210,8 @@ class MainTranslate(UnitTranslate):
|
|||
"MainWindow", "Warning"
|
||||
)
|
||||
self._dict["no_reach"] = _translate(
|
||||
"MainWindow", "Create a reach in the network before opening this window."
|
||||
"MainWindow",
|
||||
"Create a reach in the network before opening this window."
|
||||
)
|
||||
|
||||
self._dict["mb_last_open_title"] = _translate(
|
||||
|
|
|
|||
Loading…
Reference in New Issue