update to changes from mlz repo

- bug fixes in error.py
- add from * to raise statements
- fix py35 compatibility
- finalize omit_unchanged_within feature
- fix follwup bug (missing Param.override) in proxy.py

Change-Id: I621c01a0d5e1ec6696fb06f39666f3316fb53649
This commit is contained in:
2021-11-10 13:44:14 +01:00
parent 7690481938
commit 41ce909172
13 changed files with 43 additions and 58 deletions

View File

@ -39,7 +39,7 @@ COMMENT = 'comment'
class MainWindow(QMainWindow):
def __init__(self, file_path=None, parent=None):
QMainWindow.__init__(self, parent)
super().__init__(parent)
loadUi(self, 'mainwindow.ui')
self.tabWidget.currentChanged.connect(self.tab_relevant_btns_disable)
if file_path is None:

View File

@ -26,7 +26,7 @@ from secop.gui.qt import QHBoxLayout, QSizePolicy, QSpacerItem, Qt, QWidget
class NodeDisplay(QWidget):
def __init__(self, file_path=None, parent=None):
QWidget.__init__(self, parent)
super().__init__(parent)
loadUi(self, 'node_display.ui')
self.saved = bool(file_path)
self.created = self.tree_widget.set_file(file_path)

View File

@ -44,7 +44,7 @@ class TreeWidgetItem(QTreeWidgetItem):
the datatype passed onto ValueWidget should be on of secop.datatypes"""
# TODO: like stated in docstring the datatype for parameters and
# properties must be found out through their object
QTreeWidgetItem.__init__(self, parent)
super().__init__(parent)
self.kind = kind
self.name = name
self.class_object = class_object
@ -129,7 +129,7 @@ class ValueWidget(QWidget):
def __init__(self, name='', value='', datatype=None, kind='', parent=None):
# TODO: implement: change module/interface class
QWidget.__init__(self, parent)
super().__init__(parent)
self.datatype = datatype
self.layout = QVBoxLayout()
self.name_label = QLabel(name)
@ -205,7 +205,7 @@ class ValueWidget(QWidget):
class ChangeNameDialog(QDialog):
def __init__(self, current_name='', invalid_names=None, parent=None):
QWidget.__init__(self, parent)
super().__init__(parent)
loadUi(self, 'change_name_dialog.ui')
self.invalid_names = invalid_names
self.name.setText(current_name)

View File

@ -31,7 +31,7 @@ from secop.gui.cfg_editor.utils import get_all_items, \
get_props, loadUi, set_name_edit_style, setActionIcon
from secop.gui.qt import QComboBox, QDialog, QDialogButtonBox, QLabel, \
QLineEdit, QMenu, QPoint, QSize, QStandardItem, QStandardItemModel, \
Qt, QTabBar, QTextEdit, QTreeView, QTreeWidget, QWidget, pyqtSignal
Qt, QTabBar, QTextEdit, QTreeView, QTreeWidget, pyqtSignal
NODE = 'node'
MODULE = 'module'
@ -47,7 +47,7 @@ class TreeWidget(QTreeWidget):
add_canceled = pyqtSignal()
def __init__(self, parent=None):
QTreeWidget.__init__(self, parent)
super().__init__(parent)
self.file_path = None
self.setIconSize(QSize(24, 24))
self.setSelectionMode(QTreeWidget.SingleSelection)
@ -335,7 +335,7 @@ class AddDialog(QDialog):
"""Notes:
self.get_value: is mapped to the specific method for getting
the value from self.value"""
QWidget.__init__(self, parent)
super().__init__(parent)
loadUi(self, 'add_dialog.ui')
self.setWindowTitle('add %s' % kind)
self.kind = kind
@ -402,7 +402,7 @@ class AddDialog(QDialog):
class TabBar(QTabBar):
def __init__(self, parent=None):
QTabBar.__init__(self, parent)
super().__init__(parent)
self.setContextMenuPolicy(Qt.CustomContextMenu)
self.context_pos = QPoint(0, 0)
self.menu = QMenu()
@ -436,7 +436,7 @@ class TabBar(QTabBar):
class TreeComboBox(QComboBox):
def __init__(self, value_dict, parent=None):
QComboBox.__init__(self, parent)
super().__init__(parent)
self.tree_view = QTreeView()
self.tree_view.setHeaderHidden(True)
self.tree_view.expanded.connect(self.resize_length)