diff --git a/src/Model/SedimentLayer/SedimentLayer.py b/src/Model/SedimentLayer/SedimentLayer.py index f20e99fa..4ec52541 100644 --- a/src/Model/SedimentLayer/SedimentLayer.py +++ b/src/Model/SedimentLayer/SedimentLayer.py @@ -275,6 +275,7 @@ class Layer(SQLSubModel): self._sl.modified() + class SedimentLayer(SQLSubModel): _sub_classes = [Layer] diff --git a/src/Model/Tools/PamhyrDB.py b/src/Model/Tools/PamhyrDB.py index edb47dfa..9bba82ce 100644 --- a/src/Model/Tools/PamhyrDB.py +++ b/src/Model/Tools/PamhyrDB.py @@ -414,7 +414,6 @@ class SQLSubModel(PamhyrID): """ raise NotImplementedMethodeError(self, self._db_save) - def _data_traversal(self, predicate=lambda obj, data: True, modifier=lambda obj, data: None, diff --git a/src/Model/Tools/PamhyrListExt.py b/src/Model/Tools/PamhyrListExt.py index c45f0942..07d0ed58 100644 --- a/src/Model/Tools/PamhyrListExt.py +++ b/src/Model/Tools/PamhyrListExt.py @@ -83,7 +83,7 @@ class PamhyrModelList(SQLSubModel): return self.lst.index(el) def get(self, index): - if len(self.lst) <= index : + if len(self.lst) <= index: return None return self.lst[index] diff --git a/src/View/AdditionalFiles/List.py b/src/View/AdditionalFiles/List.py index 53875f20..98d09e2c 100644 --- a/src/View/AdditionalFiles/List.py +++ b/src/View/AdditionalFiles/List.py @@ -51,7 +51,6 @@ class ListModel(PamhyrListModel): ), 0 ) - def data(self, index, role): row = index.row() column = index.column() diff --git a/src/View/AdditionalFiles/UndoCommand.py b/src/View/AdditionalFiles/UndoCommand.py index 1e597b84..bcc75f49 100644 --- a/src/View/AdditionalFiles/UndoCommand.py +++ b/src/View/AdditionalFiles/UndoCommand.py @@ -66,6 +66,7 @@ class AddCommand(QUndoCommand): else: self._new.set_as_not_deleted() + class DelCommand(QUndoCommand): def __init__(self, files, line): QUndoCommand.__init__(self) diff --git a/src/View/LateralContribution/UndoCommand.py b/src/View/LateralContribution/UndoCommand.py index 61113525..f7be897c 100644 --- a/src/View/LateralContribution/UndoCommand.py +++ b/src/View/LateralContribution/UndoCommand.py @@ -134,6 +134,7 @@ class AddCommand(QUndoCommand): else: self._new.set_as_not_deleted() + class DelCommand(QUndoCommand): def __init__(self, lcs, tab, rows): QUndoCommand.__init__(self) diff --git a/src/View/Scenarios/ContextMenu.py b/src/View/Scenarios/ContextMenu.py index 5d55a960..319c0d92 100644 --- a/src/View/Scenarios/ContextMenu.py +++ b/src/View/Scenarios/ContextMenu.py @@ -71,7 +71,7 @@ class ScenarioMenu(AbstractMenu): ) action = self._exec() - if action == None: + if action is None: return elif action == select: self._parent.select_scenario(item) diff --git a/src/View/Stricklers/Table.py b/src/View/Stricklers/Table.py index 3d80cdad..2f97e684 100644 --- a/src/View/Stricklers/Table.py +++ b/src/View/Stricklers/Table.py @@ -61,7 +61,6 @@ class TableModel(PamhyrTableModel): ), 0 ) - def data(self, index, role): if role != Qt.ItemDataRole.DisplayRole: return QVariant()