mirror of https://gitlab.com/pamhyr/pamhyr2
Pamhyr: Fix PEP8.
parent
589e591d3b
commit
8bcf776813
|
|
@ -275,6 +275,7 @@ class Layer(SQLSubModel):
|
||||||
|
|
||||||
self._sl.modified()
|
self._sl.modified()
|
||||||
|
|
||||||
|
|
||||||
class SedimentLayer(SQLSubModel):
|
class SedimentLayer(SQLSubModel):
|
||||||
_sub_classes = [Layer]
|
_sub_classes = [Layer]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -414,7 +414,6 @@ class SQLSubModel(PamhyrID):
|
||||||
"""
|
"""
|
||||||
raise NotImplementedMethodeError(self, self._db_save)
|
raise NotImplementedMethodeError(self, self._db_save)
|
||||||
|
|
||||||
|
|
||||||
def _data_traversal(self,
|
def _data_traversal(self,
|
||||||
predicate=lambda obj, data: True,
|
predicate=lambda obj, data: True,
|
||||||
modifier=lambda obj, data: None,
|
modifier=lambda obj, data: None,
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ class PamhyrModelList(SQLSubModel):
|
||||||
return self.lst.index(el)
|
return self.lst.index(el)
|
||||||
|
|
||||||
def get(self, index):
|
def get(self, index):
|
||||||
if len(self.lst) <= index :
|
if len(self.lst) <= index:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return self.lst[index]
|
return self.lst[index]
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@ class ListModel(PamhyrListModel):
|
||||||
), 0
|
), 0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def data(self, index, role):
|
def data(self, index, role):
|
||||||
row = index.row()
|
row = index.row()
|
||||||
column = index.column()
|
column = index.column()
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ class AddCommand(QUndoCommand):
|
||||||
else:
|
else:
|
||||||
self._new.set_as_not_deleted()
|
self._new.set_as_not_deleted()
|
||||||
|
|
||||||
|
|
||||||
class DelCommand(QUndoCommand):
|
class DelCommand(QUndoCommand):
|
||||||
def __init__(self, files, line):
|
def __init__(self, files, line):
|
||||||
QUndoCommand.__init__(self)
|
QUndoCommand.__init__(self)
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@ class AddCommand(QUndoCommand):
|
||||||
else:
|
else:
|
||||||
self._new.set_as_not_deleted()
|
self._new.set_as_not_deleted()
|
||||||
|
|
||||||
|
|
||||||
class DelCommand(QUndoCommand):
|
class DelCommand(QUndoCommand):
|
||||||
def __init__(self, lcs, tab, rows):
|
def __init__(self, lcs, tab, rows):
|
||||||
QUndoCommand.__init__(self)
|
QUndoCommand.__init__(self)
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ class ScenarioMenu(AbstractMenu):
|
||||||
)
|
)
|
||||||
|
|
||||||
action = self._exec()
|
action = self._exec()
|
||||||
if action == None:
|
if action is None:
|
||||||
return
|
return
|
||||||
elif action == select:
|
elif action == select:
|
||||||
self._parent.select_scenario(item)
|
self._parent.select_scenario(item)
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,6 @@ class TableModel(PamhyrTableModel):
|
||||||
), 0
|
), 0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def data(self, index, role):
|
def data(self, index, role):
|
||||||
if role != Qt.ItemDataRole.DisplayRole:
|
if role != Qt.ItemDataRole.DisplayRole:
|
||||||
return QVariant()
|
return QVariant()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue