From ff6a193f5478fe456a324926f038117d2ec74772 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 22 Apr 2021 16:43:58 +0200 Subject: classwizard example: Use and generate super() without parameters As a drive-by, add a missing comma. Amends 9a9f9fd2528c03df4b0e9dde48026a2181e8a410. Task-number: PYSIDE-1112 Change-Id: I5e7205609b460f56324a8ec193948250e6e38d6b Reviewed-by: Cristian Maureira-Fredes --- examples/widgets/dialogs/classwizard/classwizard.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'examples/widgets') diff --git a/examples/widgets/dialogs/classwizard/classwizard.py b/examples/widgets/dialogs/classwizard/classwizard.py index 091980059..d6cd79884 100644 --- a/examples/widgets/dialogs/classwizard/classwizard.py +++ b/examples/widgets/dialogs/classwizard/classwizard.py @@ -58,7 +58,7 @@ import classwizard_rc BASE_CLASSES = ['', 'PySide6.QtCore.QObject', - 'PySide6.QtWidgets.QDialog', 'PySide6.QtWidgets.QMainWindow' + 'PySide6.QtWidgets.QDialog', 'PySide6.QtWidgets.QMainWindow', 'PySide6.QtWidgets.QWidget'] @@ -95,7 +95,7 @@ def signal_initialization(signature): class ClassWizard(QWizard): def __init__(self, parent=None): - super(ClassWizard, self).__init__(parent) + super().__init__(parent) self.addPage(IntroPage()) self._class_info_index = self.addPage(ClassInfoPage()) @@ -214,7 +214,7 @@ class ClassWizard(QWizard): block += '):\n' if base_class: - block += f' super({class_name}, self).__init__(' + block += f' super().__init__(' if qobject: block += 'parent' block += ')\n' @@ -253,7 +253,7 @@ class ClassWizard(QWizard): class IntroPage(QWizardPage): def __init__(self, parent=None): - super(IntroPage, self).__init__(parent) + super().__init__(parent) self.setTitle("Introduction") self.setPixmap(QWizard.WatermarkPixmap, @@ -268,7 +268,7 @@ class IntroPage(QWizardPage): class ClassInfoPage(QWizardPage): def __init__(self, parent=None): - super(ClassInfoPage, self).__init__(parent) + super().__init__(parent) self.setTitle("Class Information") self.setSubTitle("Specify basic information about the class for " @@ -312,7 +312,7 @@ class ClassInfoPage(QWizardPage): class QObjectPage(QWizardPage): """Allows for adding properties and signals to a QObject.""" def __init__(self, parent=None): - super(QObjectPage, self).__init__(parent) + super().__init__(parent) self.setTitle("QObject parameters") self.setSubTitle("Specify the signals, slots and properties.") @@ -329,7 +329,7 @@ class QObjectPage(QWizardPage): class OutputFilesPage(QWizardPage): def __init__(self, parent=None): - super(OutputFilesPage, self).__init__(parent) + super().__init__(parent) self.setTitle("Output Files") self.setSubTitle("Specify where you want the wizard to put the " @@ -389,7 +389,7 @@ class OutputFilesPage(QWizardPage): class ConclusionPage(QWizardPage): def __init__(self, parent=None): - super(ConclusionPage, self).__init__(parent) + super().__init__(parent) self.setTitle("Conclusion") self.setPixmap(QWizard.WatermarkPixmap, -- cgit v1.2.3