aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-04-22 16:43:58 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-04-23 07:25:16 +0200
commitff6a193f5478fe456a324926f038117d2ec74772 (patch)
tree86efb802f52bd74ac317cb101c789a8402c76722
parentd5d4895c1e76f947a43b8d729455a63e7c165b28 (diff)
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 <cristian.maureira-fredes@qt.io>
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard.py16
1 files changed, 8 insertions, 8 deletions
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 = ['<None>', '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,