diff options
104 files changed, 156 insertions, 157 deletions
diff --git a/examples/3d/simple3d/simple3d.py b/examples/3d/simple3d/simple3d.py index 3c6ff3bf6..ab6dc0ca0 100644 --- a/examples/3d/simple3d/simple3d.py +++ b/examples/3d/simple3d/simple3d.py @@ -49,7 +49,7 @@ from PySide6.Qt3DExtras import (Qt3DExtras) class OrbitTransformController(QObject): def __init__(self, parent): - super(OrbitTransformController, self).__init__(parent) + super().__init__(parent) self._target = None self._matrix = QMatrix4x4() self._radius = 1 @@ -93,7 +93,7 @@ class OrbitTransformController(QObject): class Window(Qt3DExtras.Qt3DWindow): def __init__(self): - super(Window, self).__init__() + super().__init__() # Camera self.camera().lens().setPerspectiveProjection(45, 16 / 9, 0.1, 1000) diff --git a/examples/axcontainer/axviewer/axviewer.py b/examples/axcontainer/axviewer/axviewer.py index 04989c4f8..7edb99046 100644 --- a/examples/axcontainer/axviewer/axviewer.py +++ b/examples/axcontainer/axviewer/axviewer.py @@ -50,7 +50,7 @@ from PySide6.QtWidgets import (QApplication, QDialog, class MainWindow(QMainWindow): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() toolBar = QToolBar() self.addToolBar(toolBar) diff --git a/examples/charts/audio/audio.py b/examples/charts/audio/audio.py index 969f2b9ab..2d4c1a552 100644 --- a/examples/charts/audio/audio.py +++ b/examples/charts/audio/audio.py @@ -53,7 +53,7 @@ resolution = 4 class MainWindow(QMainWindow): def __init__(self, device): - super(MainWindow, self).__init__() + super().__init__() self.series = QLineSeries() self.chart = QChart() diff --git a/examples/charts/callout/callout.py b/examples/charts/callout/callout.py index 747f20072..219f44597 100644 --- a/examples/charts/callout/callout.py +++ b/examples/charts/callout/callout.py @@ -154,7 +154,7 @@ class Callout(QGraphicsItem): class View(QGraphicsView): def __init__(self, parent = None): - super(View, self).__init__(parent) + super().__init__(parent) self.setScene(QGraphicsScene(self)) self.setDragMode(QGraphicsView.NoDrag) diff --git a/examples/charts/donutbreakdown/donutbreakdown.py b/examples/charts/donutbreakdown/donutbreakdown.py index 320156bc9..b724857d3 100644 --- a/examples/charts/donutbreakdown/donutbreakdown.py +++ b/examples/charts/donutbreakdown/donutbreakdown.py @@ -49,7 +49,7 @@ from PySide6.QtCharts import QChart, QChartView, QPieSeries, QPieSlice class MainSlice(QPieSlice): def __init__(self, breakdown_series, parent=None): - super(MainSlice, self).__init__(parent) + super().__init__(parent) self.breakdown_series = breakdown_series self.name = None @@ -72,7 +72,7 @@ class MainSlice(QPieSlice): class DonutBreakdownChart(QChart): def __init__(self, parent=None): - super(DonutBreakdownChart, self).__init__(QChart.ChartTypeCartesian, + super().__init__(QChart.ChartTypeCartesian, parent, Qt.WindowFlags()) self.main_series = QPieSeries() self.main_series.setPieSize(0.7) diff --git a/examples/charts/legend/legend.py b/examples/charts/legend/legend.py index 639e28f68..1a75d076e 100644 --- a/examples/charts/legend/legend.py +++ b/examples/charts/legend/legend.py @@ -49,7 +49,7 @@ from PySide6.QtCharts import QBarSeries, QBarSet, QChart, QChartView class MainWidget(QWidget): def __init__(self, parent=None): - super(MainWidget, self).__init__(parent) + super().__init__(parent) self.chart = QChart() self.series = QBarSeries() diff --git a/examples/charts/lineandbar/lineandbar.py b/examples/charts/lineandbar/lineandbar.py index a3601c162..606e66415 100644 --- a/examples/charts/lineandbar/lineandbar.py +++ b/examples/charts/lineandbar/lineandbar.py @@ -51,7 +51,7 @@ from PySide6.QtCharts import (QBarCategoryAxis, QBarSeries, QBarSet, QChart, class TestChart(QMainWindow): def __init__(self): - QMainWindow.__init__(self) + super().__init__() self.set0 = QBarSet("Jane") self.set1 = QBarSet("John") diff --git a/examples/charts/linechart/linechart.py b/examples/charts/linechart/linechart.py index ce81c36d8..0b46ff84d 100644 --- a/examples/charts/linechart/linechart.py +++ b/examples/charts/linechart/linechart.py @@ -49,7 +49,7 @@ from PySide6.QtCharts import QChart, QChartView, QLineSeries class TestChart(QMainWindow): def __init__(self): - QMainWindow.__init__(self) + super().__init__() self.series = QLineSeries() self.series.append(0, 6) diff --git a/examples/charts/logvalueaxis/logvalueaxis.py b/examples/charts/logvalueaxis/logvalueaxis.py index 180940b73..3dbad1299 100644 --- a/examples/charts/logvalueaxis/logvalueaxis.py +++ b/examples/charts/logvalueaxis/logvalueaxis.py @@ -52,7 +52,7 @@ from PySide6.QtCharts import (QChart, QChartView, QLineSeries, QLogValueAxis, class TestChart(QMainWindow): def __init__(self): - QMainWindow.__init__(self) + super().__init__() self.series = QLineSeries() self.series.append([ diff --git a/examples/charts/memoryusage/memoryusage.py b/examples/charts/memoryusage/memoryusage.py index aac03b00f..0a098014c 100644 --- a/examples/charts/memoryusage/memoryusage.py +++ b/examples/charts/memoryusage/memoryusage.py @@ -97,7 +97,7 @@ def get_memory_usage(): class MainWindow(QMainWindow): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() self.setWindowTitle('Memory Usage') diff --git a/examples/charts/modeldata/modeldata.py b/examples/charts/modeldata/modeldata.py index 380f538f1..0fd38d0f5 100644 --- a/examples/charts/modeldata/modeldata.py +++ b/examples/charts/modeldata/modeldata.py @@ -53,7 +53,7 @@ from PySide6.QtCharts import QChart, QChartView, QLineSeries, QVXYModelMapper class CustomTableModel(QAbstractTableModel): def __init__(self): - QAbstractTableModel.__init__(self) + super().__init__() self.input_data = [] self.mapping = {} self.column_count = 4 @@ -119,7 +119,7 @@ class CustomTableModel(QAbstractTableModel): class TableWidget(QWidget): def __init__(self): - QWidget.__init__(self) + super().__init__() self.model = CustomTableModel() diff --git a/examples/charts/nesteddonuts/nesteddonuts.py b/examples/charts/nesteddonuts/nesteddonuts.py index 9005980a2..d8ee6160c 100644 --- a/examples/charts/nesteddonuts/nesteddonuts.py +++ b/examples/charts/nesteddonuts/nesteddonuts.py @@ -54,7 +54,7 @@ from functools import partial class Widget(QWidget): def __init__(self): - QWidget.__init__(self) + super().__init__() self.setMinimumSize(800, 600) self.donuts = [] self.chart_view = QChartView() diff --git a/examples/charts/percentbarchart/percentbarchart.py b/examples/charts/percentbarchart/percentbarchart.py index b9301f36e..6557fe81a 100644 --- a/examples/charts/percentbarchart/percentbarchart.py +++ b/examples/charts/percentbarchart/percentbarchart.py @@ -50,7 +50,7 @@ from PySide6.QtCharts import (QBarCategoryAxis, QBarSet, QChart, QChartView, class MainWindow(QMainWindow): def __init__(self): - QMainWindow.__init__(self) + super().__init__() set0 = QBarSet("Jane") set1 = QBarSet("John") diff --git a/examples/charts/piechart/piechart.py b/examples/charts/piechart/piechart.py index ebb602b0c..1980c0ba1 100644 --- a/examples/charts/piechart/piechart.py +++ b/examples/charts/piechart/piechart.py @@ -50,7 +50,7 @@ from PySide6.QtCharts import QChart, QChartView, QPieSeries class TestChart(QMainWindow): def __init__(self): - QMainWindow.__init__(self) + super().__init__() self.series = QPieSeries() diff --git a/examples/charts/temperaturerecords/temperaturerecords.py b/examples/charts/temperaturerecords/temperaturerecords.py index b37b70db2..d3bc872af 100644 --- a/examples/charts/temperaturerecords/temperaturerecords.py +++ b/examples/charts/temperaturerecords/temperaturerecords.py @@ -50,7 +50,7 @@ from PySide6.QtCharts import (QBarCategoryAxis, QBarSet, QChart, QChartView, class MainWindow(QMainWindow): def __init__(self): - QMainWindow.__init__(self) + super().__init__() low = QBarSet("Min") high = QBarSet("Max") low.append([-52, -50, -45.3, -37.0, -25.6, -8.0, diff --git a/examples/corelib/settingseditor/settingseditor.py b/examples/corelib/settingseditor/settingseditor.py index 10e79abf9..196bcc10c 100644 --- a/examples/corelib/settingseditor/settingseditor.py +++ b/examples/corelib/settingseditor/settingseditor.py @@ -167,7 +167,7 @@ class TypeChecker: class MainWindow(QMainWindow): def __init__(self, parent=None): - super(MainWindow, self).__init__(parent) + super().__init__(parent) self.settings_tree = SettingsTree() self.setCentralWidget(self.settings_tree) @@ -320,7 +320,7 @@ class MainWindow(QMainWindow): class LocationDialog(QDialog): def __init__(self, parent=None): - super(LocationDialog, self).__init__(parent) + super().__init__(parent) self.format_combo = QComboBox() self.format_combo.addItem("Native") @@ -472,7 +472,7 @@ class LocationDialog(QDialog): class SettingsTree(QTreeWidget): def __init__(self, parent=None): - super(SettingsTree, self).__init__(parent) + super().__init__(parent) self._type_checker = TypeChecker() self.setItemDelegate(VariantDelegate(self._type_checker, self)) @@ -666,7 +666,7 @@ class SettingsTree(QTreeWidget): class VariantDelegate(QItemDelegate): def __init__(self, type_checker, parent=None): - super(VariantDelegate, self).__init__(parent) + super().__init__(parent) self._type_checker = type_checker def paint(self, painter, option, index): diff --git a/examples/corelib/threads/mandelbrot.py b/examples/corelib/threads/mandelbrot.py index e184d6529..3c6a6af21 100644 --- a/examples/corelib/threads/mandelbrot.py +++ b/examples/corelib/threads/mandelbrot.py @@ -77,7 +77,7 @@ class RenderThread(QThread): rendered_image = Signal(QImage, float) def __init__(self, parent=None): - super(RenderThread, self).__init__(parent) + super().__init__(parent) self.mutex = QMutex() self.condition = QWaitCondition() @@ -234,7 +234,7 @@ class RenderThread(QThread): class MandelbrotWidget(QWidget): def __init__(self, parent=None): - super(MandelbrotWidget, self).__init__(parent) + super().__init__(parent) self.thread = RenderThread() self.pixmap = QPixmap() diff --git a/examples/datavisualization/bars3d/bars3d.py b/examples/datavisualization/bars3d/bars3d.py index d7d211864..36c43a549 100644 --- a/examples/datavisualization/bars3d/bars3d.py +++ b/examples/datavisualization/bars3d/bars3d.py @@ -58,7 +58,7 @@ def data_to_bar_data_array(data): class MainWindow(QMainWindow): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() self.setWindowTitle('Qt DataVisualization 3D Bars') diff --git a/examples/declarative/signals/pytoqml2/main.py b/examples/declarative/signals/pytoqml2/main.py index 657161263..97d4d96f8 100644 --- a/examples/declarative/signals/pytoqml2/main.py +++ b/examples/declarative/signals/pytoqml2/main.py @@ -51,7 +51,7 @@ class RotateValue(QObject): valueChanged = Signal(int, arguments=['val']) def __init__(self): - super(RotateValue, self).__init__() + super().__init__() self.r = 0 @Slot() diff --git a/examples/declarative/signals/qmltopy2/main.py b/examples/declarative/signals/qmltopy2/main.py index 219206be6..4df632292 100644 --- a/examples/declarative/signals/qmltopy2/main.py +++ b/examples/declarative/signals/qmltopy2/main.py @@ -48,7 +48,7 @@ from PySide6.QtQuick import QQuickView class RotateValue(QObject): def __init__(self): - super(RotateValue,self).__init__() + super().__init__() self.r = 0 # If a slot returns a value, the return value type must be explicitly diff --git a/examples/designer/taskmenuextension/tictactoe.py b/examples/designer/taskmenuextension/tictactoe.py index 539decce2..d4f8dff1a 100644 --- a/examples/designer/taskmenuextension/tictactoe.py +++ b/examples/designer/taskmenuextension/tictactoe.py @@ -51,7 +51,7 @@ DEFAULT_STATE = "---------" class TicTacToe(QWidget): def __init__(self, parent=None): - super(TicTacToe, self).__init__(parent) + super().__init__(parent) self._state = DEFAULT_STATE self._turn_number = 0 diff --git a/examples/designer/taskmenuextension/tictactoeplugin.py b/examples/designer/taskmenuextension/tictactoeplugin.py index 9b9938479..276c2d0e8 100644 --- a/examples/designer/taskmenuextension/tictactoeplugin.py +++ b/examples/designer/taskmenuextension/tictactoeplugin.py @@ -77,7 +77,7 @@ DOM_XML = """ class TicTacToePlugin(QDesignerCustomWidgetInterface): def __init__(self): - super(TicTacToePlugin, self).__init__() + super().__init__() self._form_editor = None def createWidget(self, parent): diff --git a/examples/designer/taskmenuextension/tictactoetaskmenu.py b/examples/designer/taskmenuextension/tictactoetaskmenu.py index d8f805c2e..6eeb8ae21 100644 --- a/examples/designer/taskmenuextension/tictactoetaskmenu.py +++ b/examples/designer/taskmenuextension/tictactoetaskmenu.py @@ -58,7 +58,7 @@ from PySide6.QtDesigner import (QExtensionFactory, QPyDesignerTaskMenuExtension) class TicTacToeDialog(QDialog): def __init__(self, parent): - super(TicTacToeDialog, self).__init__(parent) + super().__init__(parent) layout = QVBoxLayout(self) self._ticTacToe = TicTacToe(self) layout.addWidget(self._ticTacToe) @@ -80,7 +80,7 @@ class TicTacToeDialog(QDialog): class TicTacToeTaskMenu(QPyDesignerTaskMenuExtension): def __init__(self, ticTacToe, parent): - super(TicTacToeTaskMenu, self).__init__(parent) + super().__init__(parent) self._ticTacToe = ticTacToe self._edit_state_action = QAction('Edit State...', None) self._edit_state_action.triggered.connect(self._edit_state) @@ -101,7 +101,7 @@ class TicTacToeTaskMenu(QPyDesignerTaskMenuExtension): class TicTacToeTaskMenuFactory(QExtensionFactory): def __init__(self, extension_manager): - super(TicTacToeTaskMenuFactory, self).__init__(extension_manager) + super().__init__(extension_manager) @staticmethod def task_menu_iid(): diff --git a/examples/external/opencv/webcam_pattern_detection.py b/examples/external/opencv/webcam_pattern_detection.py index 4325fc810..4f02f8d4f 100644 --- a/examples/external/opencv/webcam_pattern_detection.py +++ b/examples/external/opencv/webcam_pattern_detection.py @@ -103,7 +103,7 @@ class Thread(QThread): class Window(QMainWindow): def __init__(self): - QMainWindow.__init__(self) + super().__init__() # Title and dimensions self.setWindowTitle("Patterns detection") self.setGeometry(0, 0, 800, 500) diff --git a/examples/installer_test/hello.py b/examples/installer_test/hello.py index f8434133e..318512458 100644 --- a/examples/installer_test/hello.py +++ b/examples/installer_test/hello.py @@ -68,7 +68,7 @@ auto_quit = "Nuitka" if is_compiled else "PyInst" if uses_embedding else False class MyWidget(QWidget): def __init__(self): - QWidget.__init__(self) + super().__init__() self.hello = ["Hallo Welt", "ä½ å¥½ï¼Œä¸–ç•Œ", "Hei maailma", "Hola Mundo", "Привет мир"] diff --git a/examples/macextras/macpasteboardmime/macpasteboardmime.py b/examples/macextras/macpasteboardmime/macpasteboardmime.py index 3da05a313..59220ec7a 100644 --- a/examples/macextras/macpasteboardmime/macpasteboardmime.py +++ b/examples/macextras/macpasteboardmime/macpasteboardmime.py @@ -54,7 +54,7 @@ except ImportError: class VCardMime(QtMacExtras.QMacPasteboardMime): def __init__(self, t = QtMacExtras.QMacPasteboardMime.MIME_ALL): - super(VCardMime, self).__init__(t) + super().__init__(t) def convertorName(self): return "VCardMime" @@ -89,7 +89,7 @@ class VCardMime(QtMacExtras.QMacPasteboardMime): class TestWidget(QtWidgets.QWidget): def __init__(self, parent=None): - super(TestWidget, self).__init__(parent) + super().__init__(parent) self.vcardMime = VCardMime() self.setAcceptDrops(True) diff --git a/examples/multimedia/audiooutput/audiooutput.py b/examples/multimedia/audiooutput/audiooutput.py index 44c0f6910..330c33fe3 100644 --- a/examples/multimedia/audiooutput/audiooutput.py +++ b/examples/multimedia/audiooutput/audiooutput.py @@ -55,7 +55,7 @@ from PySide6.QtWidgets import (QApplication, QComboBox, QHBoxLayout, QLabel, class Generator(QIODevice): def __init__(self, format, durationUs, sampleRate, parent): - super(Generator, self).__init__(parent) + super().__init__(parent) self.m_pos = 0 self.m_buffer = QByteArray() @@ -139,7 +139,7 @@ class AudioTest(QMainWindow): DataSampleRateHz = 44100 def __init__(self): - super(AudioTest, self).__init__() + super().__init__() self.m_device = QAudioDeviceInfo.defaultOutputDevice() self.m_output = None diff --git a/examples/multimedia/camera/camera.py b/examples/multimedia/camera/camera.py index e8e95b7ee..0f23a37fb 100644 --- a/examples/multimedia/camera/camera.py +++ b/examples/multimedia/camera/camera.py @@ -52,7 +52,7 @@ from PySide6.QtMultimediaWidgets import QCameraViewfinder class ImageView(QWidget): def __init__(self, previewImage, fileName): - super(ImageView, self).__init__() + super().__init__() self.fileName = fileName @@ -85,7 +85,7 @@ class ImageView(QWidget): class MainWindow(QMainWindow): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() self.cameraInfo = QCameraInfo.defaultCamera() self.camera = QCamera(self.cameraInfo) diff --git a/examples/multimedia/player/player.py b/examples/multimedia/player/player.py index bffcb3906..b268178dd 100644 --- a/examples/multimedia/player/player.py +++ b/examples/multimedia/player/player.py @@ -52,7 +52,7 @@ from PySide6.QtMultimediaWidgets import QVideoWidget class MainWindow(QMainWindow): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() self.playlist = QMediaPlaylist() self.player = QMediaPlayer() diff --git a/examples/network/blockingfortuneclient/blockingfortuneclient.py b/examples/network/blockingfortuneclient/blockingfortuneclient.py index d053820d4..1c7e13386 100644 --- a/examples/network/blockingfortuneclient/blockingfortuneclient.py +++ b/examples/network/blockingfortuneclient/blockingfortuneclient.py @@ -57,7 +57,7 @@ class FortuneThread(QThread): error = Signal(int, str) def __init__(self, parent=None): - super(FortuneThread, self).__init__(parent) + super().__init__(parent) self.quit = False self._host_name = '' @@ -123,7 +123,7 @@ class FortuneThread(QThread): class BlockingClient(QWidget): def __init__(self, parent=None): - super(BlockingClient, self).__init__(parent) + super().__init__(parent) self.thread = FortuneThread() self._current_fortune = '' diff --git a/examples/network/fortuneclient/fortuneclient.py b/examples/network/fortuneclient/fortuneclient.py index 156122424..74a404d96 100644 --- a/examples/network/fortuneclient/fortuneclient.py +++ b/examples/network/fortuneclient/fortuneclient.py @@ -54,7 +54,7 @@ from PySide6.QtWidgets import (QApplication, QDialog, QDialogButtonBox, QGridLay class Client(QDialog): def __init__(self, parent=None): - super(Client, self).__init__(parent) + super().__init__(parent) self._block_size = 0 self._current_fortune = '' diff --git a/examples/network/fortuneserver/fortuneserver.py b/examples/network/fortuneserver/fortuneserver.py index 4761dc33d..831baaa37 100644 --- a/examples/network/fortuneserver/fortuneserver.py +++ b/examples/network/fortuneserver/fortuneserver.py @@ -54,7 +54,7 @@ from PySide6.QtWidgets import (QApplication, QDialog, QHBoxLayout, class Server(QDialog): def __init__(self, parent=None): - super(Server, self).__init__(parent) + super().__init__(parent) status_label = QLabel() status_label.setTextInteractionFlags(Qt.TextBrowserInteraction) diff --git a/examples/network/threadedfortuneserver/threadedfortuneserver.py b/examples/network/threadedfortuneserver/threadedfortuneserver.py index c42103073..f79573d69 100644 --- a/examples/network/threadedfortuneserver/threadedfortuneserver.py +++ b/examples/network/threadedfortuneserver/threadedfortuneserver.py @@ -56,7 +56,7 @@ class FortuneThread(QThread): error = Signal(QTcpSocket.SocketError) def __init__(self, socketDescriptor, fortune, parent): - super(FortuneThread, self).__init__(parent) + super().__init__(parent) self._socket_descriptor = socketDescriptor self.text = fortune @@ -100,7 +100,7 @@ class FortuneServer(QTcpServer): class Dialog(QDialog): def __init__(self, parent=None): - super(Dialog, self).__init__(parent) + super().__init__(parent) self.server = FortuneServer() diff --git a/examples/opengl/contextinfo/contextinfo.py b/examples/opengl/contextinfo/contextinfo.py index 8a1fb3e3d..d115637c5 100644 --- a/examples/opengl/contextinfo/contextinfo.py +++ b/examples/opengl/contextinfo/contextinfo.py @@ -118,7 +118,7 @@ def print_surface_format(surface_format): class RenderWindow(QWindow): def __init__(self, format): - super(RenderWindow, self).__init__() + super().__init__() self.setSurfaceType(QWindow.OpenGLSurface) self.setFormat(format) self.context = QOpenGLContext(self) @@ -249,7 +249,7 @@ class RenderWindow(QWindow): class MainWindow(QWidget): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() h_box_layout = QHBoxLayout(self) self._plain_text_edit = QPlainTextEdit() self._plain_text_edit.setMinimumWidth(400) diff --git a/examples/opengl/hellogl2/hellogl2.py b/examples/opengl/hellogl2/hellogl2.py index c4e6d64c4..bad59cba3 100644 --- a/examples/opengl/hellogl2/hellogl2.py +++ b/examples/opengl/hellogl2/hellogl2.py @@ -230,7 +230,7 @@ class GLWidget(QOpenGLWidget, QOpenGLFunctions): def __init__(self, transparent, parent=None): QOpenGLWidget.__init__(self, parent) - QOpenGLFunctions.__init__(self) + super().__init__() self._transparent = transparent self._core = QSurfaceFormat.defaultFormat().profile() == QSurfaceFormat.CoreProfile diff --git a/examples/remoteobjects/modelview/modelviewserver.py b/examples/remoteobjects/modelview/modelviewserver.py index 4098f61e9..8684294ff 100644 --- a/examples/remoteobjects/modelview/modelviewserver.py +++ b/examples/remoteobjects/modelview/modelviewserver.py @@ -50,7 +50,7 @@ from PySide6.QtRemoteObjects import QRemoteObjectHost, QRemoteObjectRegistryHost class TimerHandler(QObject): def __init__(self, model): - super(TimerHandler, self).__init__() + super().__init__() self._model = model def change_data(self): diff --git a/examples/samplebinding/README.md b/examples/samplebinding/README.md index 7cd032ffc..d12d2b774 100644 --- a/examples/samplebinding/README.md +++ b/examples/samplebinding/README.md @@ -94,7 +94,7 @@ And actual C++ constructors are mapped to the Python `__init__` method. ``` class VanillaChocolateIcecream(Icecream): def __init__(self, flavor=""): - super(VanillaChocolateIcecream, self).__init__(flavor) + super().__init__(flavor) ``` diff --git a/examples/samplebinding/main.py b/examples/samplebinding/main.py index 135eca12e..144b36933 100644 --- a/examples/samplebinding/main.py +++ b/examples/samplebinding/main.py @@ -45,7 +45,7 @@ from Universe import Icecream, Truck class VanillaChocolateIcecream(Icecream): def __init__(self, flavor=""): - super(VanillaChocolateIcecream, self).__init__(flavor) + super().__init__(flavor) def clone(self): return VanillaChocolateIcecream(self.getFlavor()) @@ -55,7 +55,7 @@ class VanillaChocolateIcecream(Icecream): class VanillaChocolateCherryIcecream(VanillaChocolateIcecream): def __init__(self, flavor=""): - super(VanillaChocolateIcecream, self).__init__(flavor) + super().__init__(flavor) def clone(self): return VanillaChocolateCherryIcecream(self.getFlavor()) diff --git a/examples/sql/books/bookwindow.py b/examples/sql/books/bookwindow.py index 831a3cd63..ff99cbbbc 100644 --- a/examples/sql/books/bookwindow.py +++ b/examples/sql/books/bookwindow.py @@ -52,7 +52,7 @@ class BookWindow(QMainWindow, Ui_BookWindow): """A window to show the books available""" def __init__(self): - QMainWindow.__init__(self) + super().__init__() self.setupUi(self) #Initialize db diff --git a/examples/texttospeech/hello_speak/hello_speak.py b/examples/texttospeech/hello_speak/hello_speak.py index b5f2cc84b..dee43c8e8 100644 --- a/examples/texttospeech/hello_speak/hello_speak.py +++ b/examples/texttospeech/hello_speak/hello_speak.py @@ -50,7 +50,7 @@ from PySide6.QtTextToSpeech import QTextToSpeech class MainWindow(QMainWindow): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() centralWidget = QWidget() self.setCentralWidget(centralWidget) diff --git a/examples/webchannel/standalone/core.py b/examples/webchannel/standalone/core.py index f6c3e8043..f26b6b834 100644 --- a/examples/webchannel/standalone/core.py +++ b/examples/webchannel/standalone/core.py @@ -49,7 +49,7 @@ class Core(QObject): sendText = Signal(str) def __init__(self, dialog, parent=None): - super(Core, self).__init__(parent) + super().__init__(parent) self._dialog = dialog self._dialog.sendText.connect(self._emit_send_text) diff --git a/examples/webchannel/standalone/dialog.py b/examples/webchannel/standalone/dialog.py index 5e8acb908..2db033fcd 100644 --- a/examples/webchannel/standalone/dialog.py +++ b/examples/webchannel/standalone/dialog.py @@ -49,7 +49,7 @@ class Dialog(QDialog): sendText = Signal(str) def __init__(self, parent=None): - super(Dialog, self).__init__(parent) + super().__init__(parent) self._ui = Ui_Dialog() self._ui.setupUi(self) self._ui.send.clicked.connect(self.clicked) diff --git a/examples/webchannel/standalone/websocketclientwrapper.py b/examples/webchannel/standalone/websocketclientwrapper.py index 5d4ec4cfe..96aa79a08 100644 --- a/examples/webchannel/standalone/websocketclientwrapper.py +++ b/examples/webchannel/standalone/websocketclientwrapper.py @@ -57,7 +57,7 @@ class WebSocketClientWrapper(QObject): """Construct the client wrapper with the given parent. All clients connecting to the QWebSocketServer will be automatically wrapped in WebSocketTransport objects.""" - super(WebSocketClientWrapper, self).__init__(parent) + super().__init__(parent) self._server = server self._server.newConnection.connect(self.handleNewConnection) self._transports = [] diff --git a/examples/webchannel/standalone/websockettransport.py b/examples/webchannel/standalone/websockettransport.py index 401701699..570c7e518 100644 --- a/examples/webchannel/standalone/websockettransport.py +++ b/examples/webchannel/standalone/websockettransport.py @@ -54,7 +54,7 @@ class WebSocketTransport(QWebChannelAbstractTransport): def __init__(self, socket): """Construct the transport object and wrap the given socket. The socket is also set as the parent of the transport object.""" - super(WebSocketTransport, self).__init__(socket) + super().__init__(socket) self._socket = socket self._socket.textMessageReceived.connect(self.textMessageReceived) self._socket.disconnected.connect(self._disconnected) diff --git a/examples/webenginewidgets/simplebrowser/simplebrowser.py b/examples/webenginewidgets/simplebrowser/simplebrowser.py index 8c5ec0704..9395b5e27 100644 --- a/examples/webenginewidgets/simplebrowser/simplebrowser.py +++ b/examples/webenginewidgets/simplebrowser/simplebrowser.py @@ -51,7 +51,7 @@ from PySide6.QtWebEngineWidgets import QWebEnginePage, QWebEngineView class MainWindow(QMainWindow): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() self.setWindowTitle('PySide6 WebEngineWidgets Example') diff --git a/examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py b/examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py index 88ef74367..4304c3899 100644 --- a/examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py +++ b/examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py @@ -137,7 +137,7 @@ class BookmarkWidget(QTreeView): changed = QtCore.Signal() def __init__(self): - super(BookmarkWidget, self).__init__() + super().__init__() self.setRootIsDecorated(False) self.setUniformRowHeights(True) self.setHeaderHidden(True) diff --git a/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py b/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py index 00b7750f7..679c8e196 100644 --- a/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py +++ b/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py @@ -57,7 +57,7 @@ class BrowserTabWidget(QTabWidget): download_requested = QtCore.Signal(QWebEngineDownloadItem) def __init__(self, window_factory_function): - super(BrowserTabWidget, self).__init__() + super().__init__() self.setTabsClosable(True) self._window_factory_function = window_factory_function self._webengineviews = [] diff --git a/examples/webenginewidgets/tabbedbrowser/downloadwidget.py b/examples/webenginewidgets/tabbedbrowser/downloadwidget.py index a773070a1..392c6d5d6 100644 --- a/examples/webenginewidgets/tabbedbrowser/downloadwidget.py +++ b/examples/webenginewidgets/tabbedbrowser/downloadwidget.py @@ -53,7 +53,7 @@ class DownloadWidget(QProgressBar): remove_requested = QtCore.Signal() def __init__(self, download_item): - super(DownloadWidget, self).__init__() + super().__init__() self._download_item = download_item download_item.finished.connect(self._finished) download_item.downloadProgress.connect(self._download_progress) diff --git a/examples/webenginewidgets/tabbedbrowser/findtoolbar.py b/examples/webenginewidgets/tabbedbrowser/findtoolbar.py index ec52e9073..c6668babc 100644 --- a/examples/webenginewidgets/tabbedbrowser/findtoolbar.py +++ b/examples/webenginewidgets/tabbedbrowser/findtoolbar.py @@ -51,7 +51,7 @@ class FindToolBar(QToolBar): find = QtCore.Signal(str, QWebEnginePage.FindFlags) def __init__(self): - super(FindToolBar, self).__init__() + super().__init__() self._line_edit = QLineEdit() self._line_edit.setClearButtonEnabled(True) self._line_edit.setPlaceholderText("Find...") diff --git a/examples/webenginewidgets/tabbedbrowser/historywindow.py b/examples/webenginewidgets/tabbedbrowser/historywindow.py index e0f381962..bc2640e69 100644 --- a/examples/webenginewidgets/tabbedbrowser/historywindow.py +++ b/examples/webenginewidgets/tabbedbrowser/historywindow.py @@ -46,7 +46,7 @@ from PySide6.QtCore import Signal, QAbstractTableModel, QModelIndex, Qt, QUrl class HistoryModel(QAbstractTableModel): def __init__(self, history, parent=None): - super(HistoryModel, self).__init__(parent) + super().__init__(parent) self._history = history def headerData(self, section, orientation, role=Qt.DisplayRole): @@ -80,7 +80,7 @@ class HistoryWindow(QTreeView): open_url = Signal(QUrl) def __init__(self, history, parent): - super(HistoryWindow, self).__init__(parent) + super().__init__(parent) self._model = HistoryModel(history, self) self.setModel(self._model) diff --git a/examples/webenginewidgets/tabbedbrowser/main.py b/examples/webenginewidgets/tabbedbrowser/main.py index 388f3b2ec..ee3516176 100644 --- a/examples/webenginewidgets/tabbedbrowser/main.py +++ b/examples/webenginewidgets/tabbedbrowser/main.py @@ -80,7 +80,7 @@ class MainWindow(QMainWindow): web browsing experience.""" def __init__(self): - super(MainWindow, self).__init__() + super().__init__() self.setWindowTitle('PySide6 tabbed browser Example') diff --git a/examples/webenginewidgets/tabbedbrowser/webengineview.py b/examples/webenginewidgets/tabbedbrowser/webengineview.py index d7eba1246..e12567df3 100644 --- a/examples/webenginewidgets/tabbedbrowser/webengineview.py +++ b/examples/webenginewidgets/tabbedbrowser/webengineview.py @@ -66,7 +66,7 @@ class WebEngineView(QWebEngineView): return 5 def __init__(self, tab_factory_func, window_factory_func): - super(WebEngineView, self).__init__() + super().__init__() self._tab_factory_func = tab_factory_func self._window_factory_func = window_factory_func page = self.page() diff --git a/examples/widgetbinding/dialog.py b/examples/widgetbinding/dialog.py index 9568f8a41..f51e2186c 100644 --- a/examples/widgetbinding/dialog.py +++ b/examples/widgetbinding/dialog.py @@ -59,7 +59,7 @@ from wigglywidget import WigglyWidget as WigglyWidgetPY class Dialog(QDialog): def __init__(self, parent=None): - super(Dialog, self).__init__(parent) + super().__init__(parent) wiggly_widget_py = WigglyWidgetPY(self) wiggly_widget_cpp = WigglyWidgetCPP(self) lineEdit = QLineEdit(self) diff --git a/examples/widgetbinding/wigglywidget.py b/examples/widgetbinding/wigglywidget.py index 21a955dd1..482415ae6 100644 --- a/examples/widgetbinding/wigglywidget.py +++ b/examples/widgetbinding/wigglywidget.py @@ -55,7 +55,7 @@ from PySide6.QtWidgets import QWidget class WigglyWidget(QWidget): def __init__(self, parent=None): - super(WigglyWidget, self).__init__(parent) + super().__init__(parent) self._step = 0 self._text = "" self.setBackgroundRole(QPalette.Midlight) diff --git a/examples/widgets/animation/animatedtiles/animatedtiles.py b/examples/widgets/animation/animatedtiles/animatedtiles.py index 75458c002..d9198c89a 100644 --- a/examples/widgets/animation/animatedtiles/animatedtiles.py +++ b/examples/widgets/animation/animatedtiles/animatedtiles.py @@ -60,7 +60,7 @@ import animatedtiles_rc # composition and delegate the property. class Pixmap(QObject): def __init__(self, pix): - super(Pixmap, self).__init__() + super().__init__() self.pixmap_item = QGraphicsPixmapItem(pix) self.pixmap_item.setCacheMode(QGraphicsItem.DeviceCoordinateCache) @@ -78,7 +78,7 @@ class Button(QGraphicsWidget): pressed = Signal() def __init__(self, pixmap, parent=None): - super(Button, self).__init__(parent) + super().__init__(parent) self._pix = pixmap diff --git a/examples/widgets/animation/appchooser/appchooser.py b/examples/widgets/animation/appchooser/appchooser.py index 66903b6c5..046da7243 100644 --- a/examples/widgets/animation/appchooser/appchooser.py +++ b/examples/widgets/animation/appchooser/appchooser.py @@ -56,7 +56,7 @@ class Pixmap(QGraphicsWidget): clicked = Signal() def __init__(self, pix, parent=None): - super(Pixmap, self).__init__(parent) + super().__init__(parent) self.orig = QPixmap(pix) self.p = QPixmap(pix) diff --git a/examples/widgets/animation/easing/easing.py b/examples/widgets/animation/easing/easing.py index b3d6f0dff..83d2e3666 100644 --- a/examples/widgets/animation/easing/easing.py +++ b/examples/widgets/animation/easing/easing.py @@ -61,7 +61,7 @@ class PathType(IntEnum): class Animation(QPropertyAnimation): def __init__(self, target, prop): - super(Animation, self).__init__(target, prop) + super().__init__(target, prop) self.set_path_type(PathType.LINEAR_PATH) def set_path_type(self, pathType): @@ -99,7 +99,7 @@ class Animation(QPropertyAnimation): # composition and delegate the property. class Pixmap(QObject): def __init__(self, pix): - super(Pixmap, self).__init__() + super().__init__() self.pixmap_item = QGraphicsPixmapItem(pix) self.pixmap_item.setCacheMode(QGraphicsItem.DeviceCoordinateCache) @@ -115,7 +115,7 @@ class Pixmap(QObject): class Window(QWidget): def __init__(self, parent=None): - super(Window, self).__init__(parent) + super().__init__(parent) self._iconSize = QSize(64, 64) self._scene = QGraphicsScene() diff --git a/examples/widgets/animation/states/states.py b/examples/widgets/animation/states/states.py index 2150e1f81..4e9343e13 100644 --- a/examples/widgets/animation/states/states.py +++ b/examples/widgets/animation/states/states.py @@ -59,7 +59,7 @@ import states_rc class Pixmap(QGraphicsObject): def __init__(self, pix): - super(Pixmap, self).__init__() + super().__init__() self.p = QPixmap(pix) diff --git a/examples/widgets/codeeditor/codeeditor.py b/examples/widgets/codeeditor/codeeditor.py index 9e0ac5b23..f5f119000 100644 --- a/examples/widgets/codeeditor/codeeditor.py +++ b/examples/widgets/codeeditor/codeeditor.py @@ -57,7 +57,7 @@ class LineNumberArea(QWidget): class CodeEditor(QPlainTextEdit): def __init__(self): - QPlainTextEdit.__init__(self) + super().__init__() self.line_number_area = LineNumberArea(self) self.blockCountChanged[int].connect(self.update_line_number_area_width) diff --git a/examples/widgets/dialogs/classwizard/listchooser.py b/examples/widgets/dialogs/classwizard/listchooser.py index 8b6f0d020..baad72d5e 100644 --- a/examples/widgets/dialogs/classwizard/listchooser.py +++ b/examples/widgets/dialogs/classwizard/listchooser.py @@ -58,7 +58,7 @@ FUNCTION_PATTERN = r'^\w+\([\w ,]*\)$' class ValidatingInputDialog(QDialog): """A dialog for text input with a regular expression validation.""" def __init__(self, label, pattern, parent=None): - super(ValidatingInputDialog, self).__init__(parent) + super().__init__(parent) layout = QVBoxLayout(self) self._form_layout = QFormLayout() @@ -111,8 +111,7 @@ class ValidatingInputDialog(QDialog): class FunctionSignatureDialog(ValidatingInputDialog): """A dialog for input of function signatures.""" def __init__(self, name, parent=None): - super(FunctionSignatureDialog, self).__init__(name, FUNCTION_PATTERN, - parent) + super().__init__(name, FUNCTION_PATTERN, parent) self.text = '()' self.cursor_position = 0 @@ -120,7 +119,7 @@ class FunctionSignatureDialog(ValidatingInputDialog): class PropertyDialog(ValidatingInputDialog): """A dialog for input of a property name and type.""" def __init__(self, parent=None): - super(PropertyDialog, self).__init__('&Name:', r'^\w+$', parent) + super().__init__('&Name:', r'^\w+$', parent) self.setWindowTitle('Add a Property') self._type_combo = QComboBox() self._type_combo.addItems(DEFAULT_TYPES) @@ -134,7 +133,7 @@ class ListChooser(QGroupBox): """A widget for editing a list of strings with a customization point for creating the strings.""" def __init__(self, title, parent=None): - super(ListChooser, self).__init__(title, parent) + super().__init__(title, parent) main_layout = QHBoxLayout(self) self._list = QListWidget(self) self._list.currentItemChanged.connect(self._current_item_changed) @@ -188,7 +187,7 @@ class ListChooser(QGroupBox): class SignalChooser(ListChooser): """A widget for editing a list of signal function signatures.""" def __init__(self, parent=None): - super(SignalChooser, self).__init__('Signals', parent) + super().__init__('Signals', parent) def _create_new_item(self): dialog = FunctionSignatureDialog('&Signal signature:', self) @@ -201,7 +200,7 @@ class SignalChooser(ListChooser): class PropertyChooser(ListChooser): """A widget for editing a list of properties as a string of 'type name'.""" def __init__(self, parent=None): - super(PropertyChooser, self).__init__('Properties', parent) + super().__init__('Properties', parent) def _create_new_item(self): dialog = PropertyDialog(self) diff --git a/examples/widgets/dialogs/extension/extension.py b/examples/widgets/dialogs/extension/extension.py index 00222a6d2..c053a7c8f 100644 --- a/examples/widgets/dialogs/extension/extension.py +++ b/examples/widgets/dialogs/extension/extension.py @@ -53,7 +53,7 @@ from PySide6.QtWidgets import (QApplication, QCheckBox, QDialog, class FindDialog(QDialog): def __init__(self, parent=None): - super(FindDialog, self).__init__(parent) + super().__init__(parent) label = QLabel("Find &what:") line_edit = QLineEdit() diff --git a/examples/widgets/dialogs/findfiles/findfiles.py b/examples/widgets/dialogs/findfiles/findfiles.py index 7ddb6907c..779954edc 100644 --- a/examples/widgets/dialogs/findfiles/findfiles.py +++ b/examples/widgets/dialogs/findfiles/findfiles.py @@ -56,7 +56,7 @@ from PySide6.QtWidgets import (QAbstractItemView, QApplication, QComboBox, class Window(QDialog): def __init__(self, parent=None): - super(Window, self).__init__(parent) + super().__init__(parent) self._browse_button = self.create_button("&Browse...", self.browse) self._find_button = self.create_button("&Find", self.find) diff --git a/examples/widgets/dialogs/standarddialogs/standarddialogs.py b/examples/widgets/dialogs/standarddialogs/standarddialogs.py index 80849bcb0..934714237 100644 --- a/examples/widgets/dialogs/standarddialogs/standarddialogs.py +++ b/examples/widgets/dialogs/standarddialogs/standarddialogs.py @@ -57,7 +57,7 @@ class DialogOptionsWidget(QGroupBox): """Widget displaying a number of check boxes representing the dialog options.""" def __init__(self, parent=None): - super(DialogOptionsWidget, self).__init__(parent) + super().__init__(parent) self._layout = QVBoxLayout(self) self._mapping = {} @@ -81,7 +81,7 @@ class Dialog(QDialog): "button will activate the detected escape button (if any).</p>" def __init__(self, parent=None): - super(Dialog, self).__init__(parent) + super().__init__(parent) self._open_files_path = '' diff --git a/examples/widgets/draganddrop/draggabletext/draggabletext.py b/examples/widgets/draganddrop/draggabletext/draggabletext.py index 5da27c450..efe35e8ce 100644 --- a/examples/widgets/draganddrop/draggabletext/draggabletext.py +++ b/examples/widgets/draganddrop/draggabletext/draggabletext.py @@ -51,7 +51,7 @@ import draggabletext_rc class DragLabel(QLabel): def __init__(self, text, parent): - super(DragLabel, self).__init__(text, parent) + super().__init__(text, parent) self.setAutoFillBackground(True) self.setFrameShape(QFrame.Panel) @@ -83,7 +83,7 @@ class DragLabel(QLabel): class DragWidget(QWidget): def __init__(self, parent=None): - super(DragWidget, self).__init__(parent) + super().__init__(parent) dictionary_file = QFile(':/dictionary/words.txt') dictionary_file.open(QIODevice.ReadOnly) diff --git a/examples/widgets/effects/lighting.py b/examples/widgets/effects/lighting.py index e319b5f66..44856b20b 100644 --- a/examples/widgets/effects/lighting.py +++ b/examples/widgets/effects/lighting.py @@ -53,7 +53,7 @@ from PySide6.QtWidgets import (QApplication, QFrame, QGraphicsDropShadowEffect, class Lighting(QGraphicsView): def __init__(self, parent=None): - super(Lighting, self).__init__(parent) + super().__init__(parent) self.angle = 0.0 self.m_scene = QGraphicsScene() diff --git a/examples/widgets/gallery/widgetgallery.py b/examples/widgets/gallery/widgetgallery.py index d46095386..6cebd5382 100644 --- a/examples/widgets/gallery/widgetgallery.py +++ b/examples/widgets/gallery/widgetgallery.py @@ -147,7 +147,7 @@ class WidgetGallery(QDialog): """Dialog displaying a gallery of Qt Widgets""" def __init__(self): - super(WidgetGallery, self).__init__() + super().__init__() self.setWindowIcon(QIcon(':/qt-project.org/logos/pysidelogo.png')) self._progress_bar = self.create_progress_bar() diff --git a/examples/widgets/graphicsview/collidingmice/collidingmice.py b/examples/widgets/graphicsview/collidingmice/collidingmice.py index b22517617..58cae55be 100644 --- a/examples/widgets/graphicsview/collidingmice/collidingmice.py +++ b/examples/widgets/graphicsview/collidingmice/collidingmice.py @@ -67,7 +67,7 @@ class Mouse(QGraphicsItem): 83 + adjust) def __init__(self): - super(Mouse, self).__init__() + super().__init__() self.angle = 0.0 self.speed = 0.0 diff --git a/examples/widgets/graphicsview/diagramscene/diagramscene.py b/examples/widgets/graphicsview/diagramscene/diagramscene.py index c6f0b725b..492a9d25b 100644 --- a/examples/widgets/graphicsview/diagramscene/diagramscene.py +++ b/examples/widgets/graphicsview/diagramscene/diagramscene.py @@ -61,7 +61,7 @@ import diagramscene_rc class Arrow(QGraphicsLineItem): def __init__(self, startItem, endItem, parent=None, scene=None): - super(Arrow, self).__init__(parent, scene) + super().__init__(parent, scene) self._arrow_head = QPolygonF() @@ -160,7 +160,7 @@ class DiagramTextItem(QGraphicsTextItem): selected_change = Signal(QGraphicsItem) def __init__(self, parent=None, scene=None): - super(DiagramTextItem, self).__init__(parent, scene) + super().__init__(parent, scene) self.setFlag(QGraphicsItem.ItemIsMovable) self.setFlag(QGraphicsItem.ItemIsSelectable) @@ -185,7 +185,7 @@ class DiagramItem(QGraphicsPolygonItem): Step, Conditional, StartEnd, Io = range(4) def __init__(self, diagram_type, contextMenu, parent=None, scene=None): - super(DiagramItem, self).__init__(parent, scene) + super().__init__(parent, scene) self.arrows = [] @@ -268,7 +268,7 @@ class DiagramScene(QGraphicsScene): item_selected = Signal(QGraphicsItem) def __init__(self, itemMenu, parent=None): - super(DiagramScene, self).__init__(parent) + super().__init__(parent) self._my_item_menu = itemMenu self._my_mode = self.MoveItem @@ -396,7 +396,7 @@ class MainWindow(QMainWindow): insert_text_button = 10 def __init__(self): - super(MainWindow, self).__init__() + super().__init__() self.create_actions() self.create_menus() diff --git a/examples/widgets/graphicsview/elasticnodes/elasticnodes.py b/examples/widgets/graphicsview/elasticnodes/elasticnodes.py index f374f0180..549a27259 100644 --- a/examples/widgets/graphicsview/elasticnodes/elasticnodes.py +++ b/examples/widgets/graphicsview/elasticnodes/elasticnodes.py @@ -61,7 +61,7 @@ class Edge(QGraphicsItem): type = QGraphicsItem.UserType + 2 def __init__(self, sourceNode, destNode): - QGraphicsItem.__init__(self) + super().__init__() self._arrow_size = 10.0 self._source_point = QPointF() @@ -160,7 +160,7 @@ class Node(QGraphicsItem): type = QGraphicsItem.UserType + 1 def __init__(self, graphWidget): - QGraphicsItem.__init__(self) + super().__init__() self.graph = weakref.ref(graphWidget) self._edge_list = [] @@ -275,7 +275,7 @@ class Node(QGraphicsItem): class GraphWidget(QGraphicsView): def __init__(self): - QGraphicsView.__init__(self) + super().__init__() self._timer_id = 0 diff --git a/examples/widgets/imageviewer/imageviewer.py b/examples/widgets/imageviewer/imageviewer.py index b18c365af..8da12bd9d 100644 --- a/examples/widgets/imageviewer/imageviewer.py +++ b/examples/widgets/imageviewer/imageviewer.py @@ -65,7 +65,7 @@ shows how to use QPainter to print an image.</p> class ImageViewer(QMainWindow): def __init__(self, parent=None): - super(ImageViewer, self).__init__(parent) + super().__init__(parent) self._scale_factor = 1.0 self._first_file_dialog = True self._image_label = QLabel() diff --git a/examples/widgets/itemviews/addressbook/adddialogwidget.py b/examples/widgets/itemviews/addressbook/adddialogwidget.py index 017bb9650..bf2dd679d 100644 --- a/examples/widgets/itemviews/addressbook/adddialogwidget.py +++ b/examples/widgets/itemviews/addressbook/adddialogwidget.py @@ -48,7 +48,7 @@ class AddDialogWidget(QDialog): """ A dialog to add a new address to the addressbook. """ def __init__(self, parent=None): - super(AddDialogWidget, self).__init__(parent) + super().__init__(parent) name_label = QLabel("Name") address_label = QLabel("Address") diff --git a/examples/widgets/itemviews/addressbook/addressbook.py b/examples/widgets/itemviews/addressbook/addressbook.py index c105a9542..1b689f2ee 100644 --- a/examples/widgets/itemviews/addressbook/addressbook.py +++ b/examples/widgets/itemviews/addressbook/addressbook.py @@ -49,7 +49,7 @@ from addresswidget import AddressWidget class MainWindow(QMainWindow): def __init__(self, parent=None): - super(MainWindow, self).__init__(parent) + super().__init__(parent) self._address_widget = AddressWidget() self.setCentralWidget(self._address_widget) diff --git a/examples/widgets/itemviews/addressbook/addresswidget.py b/examples/widgets/itemviews/addressbook/addresswidget.py index 07fc53234..d16f70f42 100644 --- a/examples/widgets/itemviews/addressbook/addresswidget.py +++ b/examples/widgets/itemviews/addressbook/addresswidget.py @@ -63,7 +63,7 @@ class AddressWidget(QTabWidget): def __init__(self, parent=None): """ Initialize the AddressWidget. """ - super(AddressWidget, self).__init__(parent) + super().__init__(parent) self._table_model = TableModel() self._new_address_tab = NewAddressTab() diff --git a/examples/widgets/itemviews/addressbook/newaddresstab.py b/examples/widgets/itemviews/addressbook/newaddresstab.py index 6833eaf4a..8a2a0ceb6 100644 --- a/examples/widgets/itemviews/addressbook/newaddresstab.py +++ b/examples/widgets/itemviews/addressbook/newaddresstab.py @@ -53,7 +53,7 @@ class NewAddressTab(QWidget): send_details = Signal(str, str) def __init__(self, parent=None): - super(NewAddressTab, self).__init__(parent) + super().__init__(parent) description_label = QLabel("There are no contacts in your address book." "\nClick Add to add new contacts.") diff --git a/examples/widgets/itemviews/addressbook/tablemodel.py b/examples/widgets/itemviews/addressbook/tablemodel.py index 9cf79f208..ec8e3e9e4 100644 --- a/examples/widgets/itemviews/addressbook/tablemodel.py +++ b/examples/widgets/itemviews/addressbook/tablemodel.py @@ -45,7 +45,7 @@ from PySide6.QtCore import (Qt, QAbstractTableModel, QModelIndex) class TableModel(QAbstractTableModel): def __init__(self, addresses=None, parent=None): - super(TableModel, self).__init__(parent) + super().__init__(parent) if addresses is None: self.addresses = [] diff --git a/examples/widgets/itemviews/basicfiltermodel/basicsortfiltermodel.py b/examples/widgets/itemviews/basicfiltermodel/basicsortfiltermodel.py index 3e1e3f9ed..657b9637b 100644 --- a/examples/widgets/itemviews/basicfiltermodel/basicsortfiltermodel.py +++ b/examples/widgets/itemviews/basicfiltermodel/basicsortfiltermodel.py @@ -56,7 +56,7 @@ FIXED_STRING = 2 class Window(QWidget): def __init__(self): - super(Window, self).__init__() + super().__init__() self._proxy_model = QSortFilterProxyModel() self._proxy_model.setDynamicSortFilter(True) diff --git a/examples/widgets/itemviews/fetchmore/fetchmore.py b/examples/widgets/itemviews/fetchmore/fetchmore.py index 194cc4e88..1ee4d8635 100644 --- a/examples/widgets/itemviews/fetchmore/fetchmore.py +++ b/examples/widgets/itemviews/fetchmore/fetchmore.py @@ -65,7 +65,7 @@ class FileListModel(QAbstractListModel): number_populated = Signal(str, int, int, int) def __init__(self, parent=None): - super(FileListModel, self).__init__(parent) + super().__init__(parent) self._path = '' self._file_count = 0 @@ -130,7 +130,7 @@ class FileListModel(QAbstractListModel): class Window(QWidget): def __init__(self, parent=None): - super(Window, self).__init__(parent) + super().__init__(parent) self._model = FileListModel(self) self._model.set_dir_path(QDir.rootPath()) diff --git a/examples/widgets/itemviews/stardelegate/stardelegate.py b/examples/widgets/itemviews/stardelegate/stardelegate.py index 847727267..e4c4bae12 100644 --- a/examples/widgets/itemviews/stardelegate/stardelegate.py +++ b/examples/widgets/itemviews/stardelegate/stardelegate.py @@ -52,7 +52,7 @@ class StarDelegate(QStyledItemDelegate): """ def __init__(self, parent=None): - super(StarDelegate, self).__init__(parent) + super().__init__(parent) def paint(self, painter, option, index): """ Paint the items in the table. diff --git a/examples/widgets/itemviews/stardelegate/stareditor.py b/examples/widgets/itemviews/stardelegate/stareditor.py index ef6235247..226552cc0 100644 --- a/examples/widgets/itemviews/stardelegate/stareditor.py +++ b/examples/widgets/itemviews/stardelegate/stareditor.py @@ -57,7 +57,7 @@ class StarEditor(QWidget): """ Initialize the editor object, making sure we can watch mouse events. """ - super(StarEditor, self).__init__(parent) + super().__init__(parent) self.setMouseTracking(True) self.setAutoFillBackground(True) diff --git a/examples/widgets/layouts/basiclayouts/basiclayouts.py b/examples/widgets/layouts/basiclayouts/basiclayouts.py index 27ab35fb1..1a0288209 100644 --- a/examples/widgets/layouts/basiclayouts/basiclayouts.py +++ b/examples/widgets/layouts/basiclayouts/basiclayouts.py @@ -57,7 +57,7 @@ class Dialog(QDialog): num_buttons = 4 def __init__(self): - super(Dialog, self).__init__() + super().__init__() self.create_menu() self.create_horizontal_group_box() diff --git a/examples/widgets/layouts/dynamiclayouts/dynamiclayouts.py b/examples/widgets/layouts/dynamiclayouts/dynamiclayouts.py index 88f118dc2..fc57e011f 100644 --- a/examples/widgets/layouts/dynamiclayouts/dynamiclayouts.py +++ b/examples/widgets/layouts/dynamiclayouts/dynamiclayouts.py @@ -50,7 +50,7 @@ from PySide6.QtWidgets import (QApplication, QDialog, QLayout, QGridLayout, class Dialog(QDialog): def __init__(self): - super(Dialog, self).__init__() + super().__init__() self._rotable_widgets = [] diff --git a/examples/widgets/layouts/flowlayout/flowlayout.py b/examples/widgets/layouts/flowlayout/flowlayout.py index 1eae372a1..959f80a0e 100644 --- a/examples/widgets/layouts/flowlayout/flowlayout.py +++ b/examples/widgets/layouts/flowlayout/flowlayout.py @@ -50,7 +50,7 @@ from PySide6.QtWidgets import (QApplication, QLayout, QPushButton, class Window(QWidget): def __init__(self): - super(Window, self).__init__() + super().__init__() flow_layout = FlowLayout(self) flow_layout.addWidget(QPushButton("Short")) @@ -64,7 +64,7 @@ class Window(QWidget): class FlowLayout(QLayout): def __init__(self, parent=None): - super(FlowLayout, self).__init__(parent) + super().__init__(parent) if parent is not None: self.setContentsMargins(QMargins(0, 0, 0, 0)) diff --git a/examples/widgets/mainwindows/application/application.py b/examples/widgets/mainwindows/application/application.py index e61c6acb8..d355a7cb2 100644 --- a/examples/widgets/mainwindows/application/application.py +++ b/examples/widgets/mainwindows/application/application.py @@ -53,7 +53,7 @@ import application_rc class MainWindow(QMainWindow): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() self._cur_file = '' diff --git a/examples/widgets/mainwindows/dockwidgets/dockwidgets.py b/examples/widgets/mainwindows/dockwidgets/dockwidgets.py index c4cef14e6..0ef54f37b 100644 --- a/examples/widgets/mainwindows/dockwidgets/dockwidgets.py +++ b/examples/widgets/mainwindows/dockwidgets/dockwidgets.py @@ -56,7 +56,7 @@ import dockwidgets_rc class MainWindow(QMainWindow): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() self._text_edit = QTextEdit() self.setCentralWidget(self._text_edit) diff --git a/examples/widgets/mainwindows/mdi/mdi.py b/examples/widgets/mainwindows/mdi/mdi.py index b10ecbef3..7027d32cc 100644 --- a/examples/widgets/mainwindows/mdi/mdi.py +++ b/examples/widgets/mainwindows/mdi/mdi.py @@ -59,7 +59,7 @@ class MdiChild(QTextEdit): sequence_number = 1 def __init__(self): - super(MdiChild, self).__init__() + super().__init__() self.setAttribute(Qt.WA_DeleteOnClose) self._is_untitled = True @@ -169,7 +169,7 @@ class MdiChild(QTextEdit): class MainWindow(QMainWindow): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() self._mdi_area = QMdiArea() self._mdi_area.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded) diff --git a/examples/widgets/painting/basicdrawing/basicdrawing.py b/examples/widgets/painting/basicdrawing/basicdrawing.py index 724b43ad9..e08ce061d 100644 --- a/examples/widgets/painting/basicdrawing/basicdrawing.py +++ b/examples/widgets/painting/basicdrawing/basicdrawing.py @@ -63,7 +63,7 @@ class RenderArea(QWidget): Pie, Path, Text, Pixmap = range(13) def __init__(self, parent=None): - super(RenderArea, self).__init__(parent) + super().__init__(parent) self.pen = QPen() self.brush = QBrush() @@ -170,7 +170,7 @@ id_role = Qt.UserRole class Window(QWidget): def __init__(self): - super(Window, self).__init__() + super().__init__() self._render_area = RenderArea() diff --git a/examples/widgets/painting/concentriccircles/concentriccircles.py b/examples/widgets/painting/concentriccircles/concentriccircles.py index 0596a32e2..dbba93b58 100644 --- a/examples/widgets/painting/concentriccircles/concentriccircles.py +++ b/examples/widgets/painting/concentriccircles/concentriccircles.py @@ -50,7 +50,7 @@ from PySide6.QtWidgets import (QApplication, QFrame, QGridLayout, QLabel, class CircleWidget(QWidget): def __init__(self, parent=None): - super(CircleWidget, self).__init__(parent) + super().__init__(parent) self._float_based = False self.antialiased = False @@ -98,7 +98,7 @@ class CircleWidget(QWidget): class Window(QWidget): def __init__(self): - super(Window, self).__init__() + super().__init__() aliased_label = self.create_label("Aliased") antialiased_label = self.create_label("Antialiased") diff --git a/examples/widgets/richtext/orderform/orderform.py b/examples/widgets/richtext/orderform/orderform.py index e8be602c2..323be365d 100644 --- a/examples/widgets/richtext/orderform/orderform.py +++ b/examples/widgets/richtext/orderform/orderform.py @@ -57,7 +57,7 @@ from PySide6.QtPrintSupport import QAbstractPrintDialog, QPrintDialog, QPrinter class MainWindow(QMainWindow): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() file_menu = QMenu("&File", self) new_action = file_menu.addAction("&New...") @@ -219,7 +219,7 @@ class MainWindow(QMainWindow): class DetailsDialog(QDialog): def __init__(self, title, parent): - super(DetailsDialog, self).__init__(parent) + super().__init__(parent) self.items = ("T-shirt", "Badge", "Reference book", "Coffee cup") diff --git a/examples/widgets/state-machine/eventtrans/eventtrans.py b/examples/widgets/state-machine/eventtrans/eventtrans.py index a014d9356..8fe67ace8 100644 --- a/examples/widgets/state-machine/eventtrans/eventtrans.py +++ b/examples/widgets/state-machine/eventtrans/eventtrans.py @@ -47,7 +47,7 @@ from PySide6.QtStateMachine import QEventTransition, QState, QStateMachine class MainWindow(QMainWindow): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() button = QPushButton(self) button.setGeometry(QRect(100, 100, 100, 100)) diff --git a/examples/widgets/state-machine/factstates/factstates.py b/examples/widgets/state-machine/factstates/factstates.py index dfde45781..47cf4d841 100644 --- a/examples/widgets/state-machine/factstates/factstates.py +++ b/examples/widgets/state-machine/factstates/factstates.py @@ -49,7 +49,7 @@ from PySide6.QtStateMachine import (QFinalState, QSignalTransition, QState, class Factorial(QObject): x_changed = Signal(int) def __init__(self): - super(Factorial, self).__init__() + super().__init__() self.xval = -1 self.facval = 1 def get_x(self): @@ -68,7 +68,7 @@ class Factorial(QObject): class FactorialLoopTransition(QSignalTransition): def __init__(self, fact): - super(FactorialLoopTransition, self).__init__(fact, SIGNAL('x_changed(int)')) + super().__init__(fact, SIGNAL('x_changed(int)')) self.fact = fact def eventTest(self, e): if not super(FactorialLoopTransition, self).eventTest(e): @@ -82,7 +82,7 @@ class FactorialLoopTransition(QSignalTransition): class FactorialDoneTransition(QSignalTransition): def __init__(self, fact): - super(FactorialDoneTransition, self).__init__(fact, SIGNAL('x_changed(int)')) + super().__init__(fact, SIGNAL('x_changed(int)')) self.fact = fact def eventTest(self, e): if not super(FactorialDoneTransition, self).eventTest(e): diff --git a/examples/widgets/state-machine/pingpong/pingpong.py b/examples/widgets/state-machine/pingpong/pingpong.py index f2e1f59f7..12de2bb69 100644 --- a/examples/widgets/state-machine/pingpong/pingpong.py +++ b/examples/widgets/state-machine/pingpong/pingpong.py @@ -47,14 +47,14 @@ from PySide6.QtStateMachine import QAbstractTransition, QState, QStateMachine class PingEvent(QEvent): def __init__(self): - super(PingEvent, self).__init__(QEvent.Type(QEvent.User+2)) + super().__init__(QEvent.Type(QEvent.User+2)) class PongEvent(QEvent): def __init__(self): - super(PongEvent, self).__init__(QEvent.Type(QEvent.User+3)) + super().__init__(QEvent.Type(QEvent.User+3)) class Pinger(QState): def __init__(self, parent): - super(Pinger, self).__init__(parent) + super().__init__(parent) def onEntry(self, e): self.p = PingEvent() self.machine().postEvent(self.p) diff --git a/examples/widgets/state-machine/rogue/rogue.py b/examples/widgets/state-machine/rogue/rogue.py index c214b897b..67caef1f0 100644 --- a/examples/widgets/state-machine/rogue/rogue.py +++ b/examples/widgets/state-machine/rogue/rogue.py @@ -49,7 +49,7 @@ from PySide6.QtStateMachine import (QEventTransition, QFinalState, class MovementTransition(QEventTransition): def __init__(self, window): - super(MovementTransition, self).__init__(window, QEvent.KeyPress) + super().__init__(window, QEvent.KeyPress) self.window = window def eventTest(self, event): if event.type() == QEvent.StateMachineWrapped and \ @@ -71,7 +71,7 @@ class MovementTransition(QEventTransition): class Custom(QState): def __init__(self, parent, mw): - super(Custom, self).__init__(parent) + super().__init__(parent) self.mw = mw def onEntry(self, e): @@ -79,7 +79,7 @@ class Custom(QState): class MainWindow(QMainWindow): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() self.pX = 5 self.pY = 5 self.width = 35 diff --git a/examples/widgets/state-machine/trafficlight/trafficlight.py b/examples/widgets/state-machine/trafficlight/trafficlight.py index d642261e9..e807d7388 100644 --- a/examples/widgets/state-machine/trafficlight/trafficlight.py +++ b/examples/widgets/state-machine/trafficlight/trafficlight.py @@ -48,7 +48,7 @@ from PySide6.QtStateMachine import QFinalState, QState, QStateMachine class LightWidget(QWidget): def __init__(self, color): - super(LightWidget, self).__init__() + super().__init__() self.color = color self._on_val = False def is_on(self): @@ -76,7 +76,7 @@ class LightWidget(QWidget): class TrafficLightWidget(QWidget): def __init__(self): - super(TrafficLightWidget, self).__init__() + super().__init__() vbox = QVBoxLayout(self) self._red_light = LightWidget(Qt.red) vbox.addWidget(self._red_light) @@ -105,7 +105,7 @@ def create_light_state(light, duration, parent=None): class TrafficLight(QWidget): def __init__(self): - super(TrafficLight, self).__init__() + super().__init__() vbox = QVBoxLayout(self) widget = TrafficLightWidget() vbox.addWidget(widget) diff --git a/examples/widgets/systray/window.py b/examples/widgets/systray/window.py index 4a92857d8..828aebecd 100644 --- a/examples/widgets/systray/window.py +++ b/examples/widgets/systray/window.py @@ -51,7 +51,7 @@ import rc_systray class Window(QDialog): def __init__(self, parent=None): - super(Window, self).__init__(parent) + super().__init__(parent) self._icon_group_box = QGroupBox() self._icon_label = QLabel() diff --git a/examples/widgets/tetrix/tetrix.py b/examples/widgets/tetrix/tetrix.py index cc2ad0b56..6103afd18 100644 --- a/examples/widgets/tetrix/tetrix.py +++ b/examples/widgets/tetrix/tetrix.py @@ -65,7 +65,7 @@ class Piece(IntEnum): class TetrixWindow(QWidget): def __init__(self): - super(TetrixWindow, self).__init__() + super().__init__() self.board = TetrixBoard() @@ -129,7 +129,7 @@ class TetrixBoard(QFrame): lines_removed_changed = Signal(int) def __init__(self, parent=None): - super(TetrixBoard, self).__init__(parent) + super().__init__(parent) self.timer = QBasicTimer() self.nextPieceLabel = None diff --git a/examples/widgets/threads/thread_signals.py b/examples/widgets/threads/thread_signals.py index 6a3b0ee08..60daac198 100644 --- a/examples/widgets/threads/thread_signals.py +++ b/examples/widgets/threads/thread_signals.py @@ -47,7 +47,7 @@ from PySide6.QtWidgets import QApplication, QPushButton, QVBoxLayout, QWidget # Create a basic window with a layout and a button class MainForm(QWidget): def __init__(self): - QWidget.__init__(self) + super().__init__() self.setWindowTitle("My Form") self.layout = QVBoxLayout() self.button = QPushButton("Click me!") diff --git a/examples/widgets/tutorials/addressbook/part1.py b/examples/widgets/tutorials/addressbook/part1.py index cf8847b2c..1970b31a7 100644 --- a/examples/widgets/tutorials/addressbook/part1.py +++ b/examples/widgets/tutorials/addressbook/part1.py @@ -50,7 +50,7 @@ from PySide6.QtWidgets import (QApplication, QGridLayout, class AddressBook(QWidget): def __init__(self, parent=None): - super(AddressBook, self).__init__(parent) + super().__init__(parent) name_label = QLabel("Name:") self._name_line = QLineEdit() diff --git a/examples/widgets/tutorials/addressbook/part2.py b/examples/widgets/tutorials/addressbook/part2.py index 963c84b9a..fe823742f 100644 --- a/examples/widgets/tutorials/addressbook/part2.py +++ b/examples/widgets/tutorials/addressbook/part2.py @@ -80,7 +80,7 @@ class SortedDict(dict): class AddressBook(QWidget): def __init__(self, parent=None): - super(AddressBook, self).__init__(parent) + super().__init__(parent) self.contacts = SortedDict() self._old_name = '' diff --git a/examples/widgets/tutorials/addressbook/part3.py b/examples/widgets/tutorials/addressbook/part3.py index 80e76f46e..c5ff6e732 100644 --- a/examples/widgets/tutorials/addressbook/part3.py +++ b/examples/widgets/tutorials/addressbook/part3.py @@ -80,7 +80,7 @@ class SortedDict(dict): class AddressBook(QWidget): def __init__(self, parent=None): - super(AddressBook, self).__init__(parent) + super().__init__(parent) self.contacts = SortedDict() self._old_name = '' diff --git a/examples/widgets/tutorials/addressbook/part4.py b/examples/widgets/tutorials/addressbook/part4.py index 389b2e47c..b28b1953c 100644 --- a/examples/widgets/tutorials/addressbook/part4.py +++ b/examples/widgets/tutorials/addressbook/part4.py @@ -82,7 +82,7 @@ class AddressBook(QWidget): NavigationMode, AddingMode, EditingMode = range(3) def __init__(self, parent=None): - super(AddressBook, self).__init__(parent) + super().__init__(parent) self.contacts = SortedDict() self._old_name = '' diff --git a/examples/widgets/tutorials/addressbook/part5.py b/examples/widgets/tutorials/addressbook/part5.py index c01821417..5d8918870 100644 --- a/examples/widgets/tutorials/addressbook/part5.py +++ b/examples/widgets/tutorials/addressbook/part5.py @@ -83,7 +83,7 @@ class AddressBook(QWidget): NavigationMode, AddingMode, EditingMode = range(3) def __init__(self, parent=None): - super(AddressBook, self).__init__(parent) + super().__init__(parent) self.contacts = SortedDict() self._old_name = '' @@ -320,7 +320,7 @@ class AddressBook(QWidget): class FindDialog(QDialog): def __init__(self, parent=None): - super(FindDialog, self).__init__(parent) + super().__init__(parent) find_label = QLabel("Enter the name of a contact:") self._line_edit = QLineEdit() diff --git a/examples/widgets/tutorials/addressbook/part6.py b/examples/widgets/tutorials/addressbook/part6.py index 2bf694672..aae863ead 100644 --- a/examples/widgets/tutorials/addressbook/part6.py +++ b/examples/widgets/tutorials/addressbook/part6.py @@ -83,7 +83,7 @@ class AddressBook(QWidget): NavigationMode, AddingMode, EditingMode = range(3) def __init__(self, parent=None): - super(AddressBook, self).__init__(parent) + super().__init__(parent) self.contacts = SortedDict() self._old_name = '' @@ -383,7 +383,7 @@ class AddressBook(QWidget): class FindDialog(QDialog): def __init__(self, parent=None): - super(FindDialog, self).__init__(parent) + super().__init__(parent) find_label = QLabel("Enter the name of a contact:") self._line_edit = QLineEdit() diff --git a/examples/widgets/tutorials/addressbook/part7.py b/examples/widgets/tutorials/addressbook/part7.py index 8378030ce..89f5b3467 100644 --- a/examples/widgets/tutorials/addressbook/part7.py +++ b/examples/widgets/tutorials/addressbook/part7.py @@ -83,7 +83,7 @@ class AddressBook(QWidget): NavigationMode, AddingMode, EditingMode = range(3) def __init__(self, parent=None): - super(AddressBook, self).__init__(parent) + super().__init__(parent) self.contacts = SortedDict() self._old_name = '' @@ -435,7 +435,7 @@ class AddressBook(QWidget): class FindDialog(QDialog): def __init__(self, parent=None): - super(FindDialog, self).__init__(parent) + super().__init__(parent) find_label = QLabel("Enter the name of a contact:") self._line_edit = QLineEdit() diff --git a/examples/xml/dombookmarks/dombookmarks.py b/examples/xml/dombookmarks/dombookmarks.py index d037d93fa..c1827c0c6 100644 --- a/examples/xml/dombookmarks/dombookmarks.py +++ b/examples/xml/dombookmarks/dombookmarks.py @@ -52,7 +52,7 @@ from PySide6.QtXml import QDomDocument class MainWindow(QMainWindow): def __init__(self, parent=None): - super(MainWindow, self).__init__(parent) + super().__init__(parent) self._xbel_tree = XbelTree() self.setCentralWidget(self._xbel_tree) @@ -136,7 +136,7 @@ class MainWindow(QMainWindow): class XbelTree(QTreeWidget): def __init__(self, parent=None): - super(XbelTree, self).__init__(parent) + super().__init__(parent) self.header().setSectionResizeMode(QHeaderView.Stretch) self.setHeaderLabels(("Title", "Location")) |