From 6bb7b383701d25f3c7346a785d3cb2e916261ba3 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 28 Apr 2021 12:21:41 +0200 Subject: Tests: Use new form of super() Change-Id: Id0a6c5e67f53623cc6d41ccc377218479931ee65 Reviewed-by: Cristian Maureira-Fredes --- sources/pyside6/tests/Qt3DExtras/qt3dextras_test.py | 4 ++-- sources/pyside6/tests/QtCore/bug_1019.py | 2 +- sources/pyside6/tests/QtCore/bug_408.py | 2 +- sources/pyside6/tests/QtCore/bug_428.py | 2 +- sources/pyside6/tests/QtCore/bug_462.py | 6 +++--- sources/pyside6/tests/QtCore/bug_656.py | 2 +- sources/pyside6/tests/QtCore/bug_686.py | 6 +++--- sources/pyside6/tests/QtCore/bug_826.py | 2 +- sources/pyside6/tests/QtCore/bug_953.py | 2 +- sources/pyside6/tests/QtCore/bug_PYSIDE-164.py | 4 ++-- sources/pyside6/tests/QtCore/child_event_test.py | 4 ++-- sources/pyside6/tests/QtCore/duck_punching_test.py | 2 +- sources/pyside6/tests/QtCore/emoji_string_test.py | 2 +- sources/pyside6/tests/QtCore/qobject_connect_notify_test.py | 2 +- sources/pyside6/tests/QtCore/qobject_inherits_test.py | 2 +- sources/pyside6/tests/QtCore/qobject_objectproperty_test.py | 2 +- sources/pyside6/tests/QtCore/qobject_parent_test.py | 2 +- sources/pyside6/tests/QtCore/qobject_timer_event_test.py | 2 +- sources/pyside6/tests/QtCore/qproperty_decorator.py | 2 +- sources/pyside6/tests/QtCore/qthread_prod_cons_test.py | 6 +++--- sources/pyside6/tests/QtCore/qthread_test.py | 2 +- sources/pyside6/tests/QtCore/qtimer_singleshot_test.py | 2 +- sources/pyside6/tests/QtCore/qtimer_timeout_test.py | 2 +- sources/pyside6/tests/QtCore/snake_prop_feature_test.py | 2 +- sources/pyside6/tests/QtGui/bug_652.py | 2 +- sources/pyside6/tests/QtGui/bug_660.py | 2 +- sources/pyside6/tests/QtGui/qrasterwindow_test.py | 2 +- .../pyside6/tests/QtMultimediaWidgets/qmultimediawidgets.py | 2 +- sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py | 2 +- .../tests/QtPrintSupport/returnquadruplesofnumbers_test.py | 6 +++--- sources/pyside6/tests/QtQml/bug_456.py | 2 +- sources/pyside6/tests/QtQml/bug_726.py | 2 +- sources/pyside6/tests/QtQml/bug_814.py | 2 +- sources/pyside6/tests/QtQml/bug_847.py | 2 +- sources/pyside6/tests/QtQml/bug_926.py | 2 +- sources/pyside6/tests/QtQml/bug_951.py | 2 +- sources/pyside6/tests/QtQml/signal_arguments.py | 2 +- sources/pyside6/tests/QtSql/qsqldatabaseandqueries_test.py | 2 +- sources/pyside6/tests/QtTest/eventfilter_test.py | 2 +- sources/pyside6/tests/QtUiTools/bug_1060.py | 2 +- sources/pyside6/tests/QtUiTools/bug_360.py | 2 +- sources/pyside6/tests/QtUiTools/bug_958.py | 2 +- sources/pyside6/tests/QtUiTools/bug_965.py | 2 +- sources/pyside6/tests/QtWidgets/bug_1006.py | 2 +- sources/pyside6/tests/QtWidgets/bug_307.py | 2 +- sources/pyside6/tests/QtWidgets/bug_338.py | 2 +- sources/pyside6/tests/QtWidgets/bug_433.py | 2 +- sources/pyside6/tests/QtWidgets/bug_525.py | 2 +- sources/pyside6/tests/QtWidgets/bug_667.py | 4 ++-- sources/pyside6/tests/QtWidgets/bug_668.py | 2 +- sources/pyside6/tests/QtWidgets/bug_793.py | 6 +++--- sources/pyside6/tests/QtWidgets/bug_811.py | 2 +- sources/pyside6/tests/QtWidgets/bug_836.py | 2 +- sources/pyside6/tests/QtWidgets/bug_844.py | 2 +- sources/pyside6/tests/QtWidgets/bug_862.py | 8 ++++---- sources/pyside6/tests/QtWidgets/paint_event_test.py | 2 +- sources/pyside6/tests/QtWidgets/private_mangle_test.py | 4 ++-- sources/pyside6/tests/QtWidgets/qgraphicsscene_test.py | 2 +- sources/pyside6/tests/QtWidgets/qpen_test.py | 2 +- sources/pyside6/tests/QtWidgets/qpushbutton_test.py | 2 +- sources/pyside6/tests/QtWidgets/qshortcut_test.py | 2 +- sources/pyside6/tests/QtWidgets/qtabwidgetclear_test.py | 2 +- sources/pyside6/tests/QtWidgets/qtextedit_signal_test.py | 2 +- sources/pyside6/tests/QtWidgets/qwidget_test.py | 6 +++--- .../tests/QtWidgets/virtual_protected_inheritance_test.py | 2 +- sources/pyside6/tests/QtWidgets/wrong_return_test.py | 2 +- sources/pyside6/tests/manually/bug_841.py | 6 +++--- sources/pyside6/tests/pysidetest/decoratedslot_test.py | 2 +- sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py | 10 +++++----- sources/pyside6/tests/pysidetest/notify_id.py | 2 +- sources/pyside6/tests/pysidetest/properties_test.py | 4 ++-- sources/pyside6/tests/pysidetest/property_python_test.py | 4 ++-- sources/pyside6/tests/pysidetest/signal_slot_warning.py | 2 +- sources/pyside6/tests/pysidetest/typedef_signal_test.py | 2 +- sources/pyside6/tests/signals/bug_311.py | 2 +- sources/pyside6/tests/signals/lambda_test.py | 2 +- sources/pyside6/tests/signals/qobject_sender_test.py | 4 ++-- sources/pyside6/tests/signals/ref04_test.py | 2 +- sources/pyside6/tests/signals/ref05_test.py | 2 +- sources/pyside6/tests/signals/ref06_test.py | 2 +- sources/pyside6/tests/signals/signal_across_threads.py | 4 ++-- sources/pyside6/tests/signals/signal_signature_test.py | 2 +- 82 files changed, 112 insertions(+), 112 deletions(-) diff --git a/sources/pyside6/tests/Qt3DExtras/qt3dextras_test.py b/sources/pyside6/tests/Qt3DExtras/qt3dextras_test.py index 23940df71..29294c61d 100644 --- a/sources/pyside6/tests/Qt3DExtras/qt3dextras_test.py +++ b/sources/pyside6/tests/Qt3DExtras/qt3dextras_test.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/sources/pyside6/tests/QtCore/bug_1019.py b/sources/pyside6/tests/QtCore/bug_1019.py index 24fb150b9..c7f1ea358 100644 --- a/sources/pyside6/tests/QtCore/bug_1019.py +++ b/sources/pyside6/tests/QtCore/bug_1019.py @@ -40,7 +40,7 @@ from PySide6.QtCore import QCoreApplication, QTimer, Slot class MyTimer (QTimer): def __init__(self): - QTimer.__init__(self) + super().__init__() self.startCalled = False @Slot() diff --git a/sources/pyside6/tests/QtCore/bug_408.py b/sources/pyside6/tests/QtCore/bug_408.py index 7dbd5286c..b5cd63c22 100644 --- a/sources/pyside6/tests/QtCore/bug_408.py +++ b/sources/pyside6/tests/QtCore/bug_408.py @@ -40,7 +40,7 @@ from PySide6.QtCore import QIODevice, QTextStream class MyDevice(QIODevice): def __init__(self, txt): - QIODevice.__init__(self) + super().__init__() self.txt = txt self.ptr = 0 diff --git a/sources/pyside6/tests/QtCore/bug_428.py b/sources/pyside6/tests/QtCore/bug_428.py index da065c6de..7b4a730c0 100644 --- a/sources/pyside6/tests/QtCore/bug_428.py +++ b/sources/pyside6/tests/QtCore/bug_428.py @@ -40,7 +40,7 @@ from PySide6.QtCore import QObject class MyBaseObject(QObject): def __init__(self, number): self.myMember = 'myMember' + number - QObject.__init__(self) + super().__init__() class QObjectConstructorTest(unittest.TestCase): def testBug(self): diff --git a/sources/pyside6/tests/QtCore/bug_462.py b/sources/pyside6/tests/QtCore/bug_462.py index da048c0fb..6af2590ee 100644 --- a/sources/pyside6/tests/QtCore/bug_462.py +++ b/sources/pyside6/tests/QtCore/bug_462.py @@ -40,12 +40,12 @@ from PySide6.QtCore import QObject, QCoreApplication, QEvent, QThread class MyEvent(QEvent): def __init__(self,i): print("TYPE:", type(QEvent.User)) - super(MyEvent,self).__init__(QEvent.Type(QEvent.User + 100 )) + super().__init__(QEvent.Type(QEvent.User + 100 )) self.i = i class MyThread (QThread): def __init__(self,owner): - super(MyThread,self).__init__() + super().__init__() self.owner=owner; def run(self): @@ -55,7 +55,7 @@ class MyThread (QThread): class MyBaseObject(QObject): def __init__(self): - QObject.__init__(self) + super().__init__() self.events = [] self.t = MyThread(self) self.t.start() diff --git a/sources/pyside6/tests/QtCore/bug_656.py b/sources/pyside6/tests/QtCore/bug_656.py index 3feaeaeaf..f0539c700 100644 --- a/sources/pyside6/tests/QtCore/bug_656.py +++ b/sources/pyside6/tests/QtCore/bug_656.py @@ -40,7 +40,7 @@ from PySide6.QtCore import QCoreApplication class CoreApp(QCoreApplication): def __init__(self,*args): - super(CoreApp,self).__init__(*args) + super().__init__(*args) # It shouldn't crash after the __init__ call import sys diff --git a/sources/pyside6/tests/QtCore/bug_686.py b/sources/pyside6/tests/QtCore/bug_686.py index dd1e4820f..ff9a64d50 100644 --- a/sources/pyside6/tests/QtCore/bug_686.py +++ b/sources/pyside6/tests/QtCore/bug_686.py @@ -41,7 +41,7 @@ from PySide6.QtCore import (QMutex, QMutexLocker, QReadLocker, QReadWriteLock, class MyWriteThread(QThread): def __init__(self, lock): - QThread.__init__(self) + super().__init__() self.lock = lock self.started = False self.canQuit = False @@ -55,7 +55,7 @@ class MyWriteThread(QThread): class MyReadThread(QThread): def __init__(self, lock): - QThread.__init__(self) + super().__init__() self.lock = lock self.started = False self.canQuit = False @@ -69,7 +69,7 @@ class MyReadThread(QThread): class MyMutexedThread(QThread): def __init__(self, mutex): - QThread.__init__(self) + super().__init__() self.mutex = mutex self.started = False self.canQuit = False diff --git a/sources/pyside6/tests/QtCore/bug_826.py b/sources/pyside6/tests/QtCore/bug_826.py index 2b16c8288..a6ef2667a 100644 --- a/sources/pyside6/tests/QtCore/bug_826.py +++ b/sources/pyside6/tests/QtCore/bug_826.py @@ -45,7 +45,7 @@ class TestEvent(QEvent): TestEventType = QEvent.Type(QEvent.registerEventType()) def __init__(self, rand=0): - super(TestEvent, self).__init__(TestEvent.TestEventType) + super().__init__(TestEvent.TestEventType) self._rand = rand def getRand(self): diff --git a/sources/pyside6/tests/QtCore/bug_953.py b/sources/pyside6/tests/QtCore/bug_953.py index 6a449fac9..25f2819e0 100644 --- a/sources/pyside6/tests/QtCore/bug_953.py +++ b/sources/pyside6/tests/QtCore/bug_953.py @@ -42,7 +42,7 @@ class Dispatcher(QObject): _me = None def __init__(self): - super(Dispatcher, self).__init__() + super().__init__() self._me = self QTimer.singleShot(0, self._finish) diff --git a/sources/pyside6/tests/QtCore/bug_PYSIDE-164.py b/sources/pyside6/tests/QtCore/bug_PYSIDE-164.py index bab09033d..826021215 100644 --- a/sources/pyside6/tests/QtCore/bug_PYSIDE-164.py +++ b/sources/pyside6/tests/QtCore/bug_PYSIDE-164.py @@ -39,7 +39,7 @@ from PySide6.QtCore import QCoreApplication, QEventLoop, QObject, Qt, QThread, Q class Emitter(QThread): def __init__(self): - QThread.__init__(self) + super().__init__() def run(self): print("Before emit.") @@ -48,7 +48,7 @@ class Emitter(QThread): class Receiver(QObject): def __init__(self, eventloop): - QObject.__init__(self) + super().__init__() self.eventloop = eventloop def receive(self, number): diff --git a/sources/pyside6/tests/QtCore/child_event_test.py b/sources/pyside6/tests/QtCore/child_event_test.py index 1172f6027..e7d7756f1 100644 --- a/sources/pyside6/tests/QtCore/child_event_test.py +++ b/sources/pyside6/tests/QtCore/child_event_test.py @@ -44,7 +44,7 @@ from helper.usesqcoreapplication import UsesQCoreApplication class ExtQObject(QObject): def __init__(self): - QObject.__init__(self) + super().__init__() self.child_event_received = False def childEvent(self, event): @@ -53,7 +53,7 @@ class ExtQObject(QObject): class ExtQTimer(QTimer): def __init__(self): - QTimer.__init__(self) + super().__init__() self.child_event_received = False def childEvent(self, event): diff --git a/sources/pyside6/tests/QtCore/duck_punching_test.py b/sources/pyside6/tests/QtCore/duck_punching_test.py index 2dc67b509..b6421b256 100644 --- a/sources/pyside6/tests/QtCore/duck_punching_test.py +++ b/sources/pyside6/tests/QtCore/duck_punching_test.py @@ -48,7 +48,7 @@ def MethodType(func, instance, instanceType): class Duck(QObject): def __init__(self): - QObject.__init__(self) + super().__init__() def childEvent(self, event): QObject.childEvent(self, event) diff --git a/sources/pyside6/tests/QtCore/emoji_string_test.py b/sources/pyside6/tests/QtCore/emoji_string_test.py index f575a7b77..4efb05e57 100644 --- a/sources/pyside6/tests/QtCore/emoji_string_test.py +++ b/sources/pyside6/tests/QtCore/emoji_string_test.py @@ -72,7 +72,7 @@ class TestStuff(QObject): return def __init__(self): - super(TestStuff, self).__init__() + super().__init__() self.testsig.connect(self.a_nop) self.testsig.emit(emoji_str) diff --git a/sources/pyside6/tests/QtCore/qobject_connect_notify_test.py b/sources/pyside6/tests/QtCore/qobject_connect_notify_test.py index c46c41b2a..794eddd13 100644 --- a/sources/pyside6/tests/QtCore/qobject_connect_notify_test.py +++ b/sources/pyside6/tests/QtCore/qobject_connect_notify_test.py @@ -48,7 +48,7 @@ def cute_slot(): class Obj(QObject): def __init__(self): - QObject.__init__(self) + super().__init__() self.con_notified = False self.dis_notified = False self.signal = "" diff --git a/sources/pyside6/tests/QtCore/qobject_inherits_test.py b/sources/pyside6/tests/QtCore/qobject_inherits_test.py index 0d0b0d174..252b3e024 100644 --- a/sources/pyside6/tests/QtCore/qobject_inherits_test.py +++ b/sources/pyside6/tests/QtCore/qobject_inherits_test.py @@ -81,7 +81,7 @@ class InheritsCase(unittest.TestCase): class DerivedObject(QObject): def __init__(self): self.member = 'member' - QObject.__init__(self) + super().__init__() obj0 = DerivedObject() # The second instantiation of DerivedObject will generate an exception # that will not come to surface immediately. diff --git a/sources/pyside6/tests/QtCore/qobject_objectproperty_test.py b/sources/pyside6/tests/QtCore/qobject_objectproperty_test.py index ac86ed8d1..f799a96d0 100644 --- a/sources/pyside6/tests/QtCore/qobject_objectproperty_test.py +++ b/sources/pyside6/tests/QtCore/qobject_objectproperty_test.py @@ -53,7 +53,7 @@ class ExtQObject(QObject): self.foobar = None # The parent __init__ method must be called after the # definition of "self.foobar". - QObject.__init__(self) + super().__init__() class TestBug378(unittest.TestCase): '''Test case for the bug #378''' diff --git a/sources/pyside6/tests/QtCore/qobject_parent_test.py b/sources/pyside6/tests/QtCore/qobject_parent_test.py index 3edd866cc..0cef3d326 100644 --- a/sources/pyside6/tests/QtCore/qobject_parent_test.py +++ b/sources/pyside6/tests/QtCore/qobject_parent_test.py @@ -236,7 +236,7 @@ class TestParentOwnership(unittest.TestCase): class ExtQObject(QObject): def __init__(self): - QObject.__init__(self) + super().__init__() class ReparentingTest(unittest.TestCase): '''Test cases for reparenting''' diff --git a/sources/pyside6/tests/QtCore/qobject_timer_event_test.py b/sources/pyside6/tests/QtCore/qobject_timer_event_test.py index 0ddf77c10..0730dd1f0 100644 --- a/sources/pyside6/tests/QtCore/qobject_timer_event_test.py +++ b/sources/pyside6/tests/QtCore/qobject_timer_event_test.py @@ -46,7 +46,7 @@ from helper.usesqcoreapplication import UsesQCoreApplication class Dummy(QObject): def __init__(self, app): - super(Dummy, self).__init__() + super().__init__() self.times_called = 0 self.app = app diff --git a/sources/pyside6/tests/QtCore/qproperty_decorator.py b/sources/pyside6/tests/QtCore/qproperty_decorator.py index 021bbed56..3d9503272 100644 --- a/sources/pyside6/tests/QtCore/qproperty_decorator.py +++ b/sources/pyside6/tests/QtCore/qproperty_decorator.py @@ -40,7 +40,7 @@ from PySide6.QtCore import QObject, Property class MyObject(QObject): def __init__(self): - QObject.__init__(self) + super().__init__() self._value = None @Property(int) diff --git a/sources/pyside6/tests/QtCore/qthread_prod_cons_test.py b/sources/pyside6/tests/QtCore/qthread_prod_cons_test.py index 586a484fe..339c0a7d6 100644 --- a/sources/pyside6/tests/QtCore/qthread_prod_cons_test.py +++ b/sources/pyside6/tests/QtCore/qthread_prod_cons_test.py @@ -49,7 +49,7 @@ class Bucket(QObject): '''Dummy class to hold the produced values''' def __init__(self, max_size=10, *args): #Constructor which receives the max number of produced items - super(Bucket, self).__init__(*args) + super().__init__(*args) self.data = [] self.max_size = 10 @@ -66,7 +66,7 @@ class Producer(QThread): def __init__(self, bucket, *args): #Constructor. Receives the bucket - super(Producer, self).__init__(*args) + super().__init__(*args) self.runs = 0 self.bucket = bucket self.production_list = [] @@ -87,7 +87,7 @@ class Consumer(QThread): '''Consumer thread''' def __init__(self, bucket, *args): #Constructor. Receives the bucket - super(Consumer, self).__init__(*args) + super().__init__(*args) self.runs = 0 self.bucket = bucket self.consumption_list = [] diff --git a/sources/pyside6/tests/QtCore/qthread_test.py b/sources/pyside6/tests/QtCore/qthread_test.py index e3f7c7f19..666d55b7e 100644 --- a/sources/pyside6/tests/QtCore/qthread_test.py +++ b/sources/pyside6/tests/QtCore/qthread_test.py @@ -49,7 +49,7 @@ mutex = QMutex() class Dummy(QThread): '''Dummy thread''' def __init__(self, *args): - super(Dummy, self).__init__(*args) + super().__init__(*args) self.called = False def run(self): diff --git a/sources/pyside6/tests/QtCore/qtimer_singleshot_test.py b/sources/pyside6/tests/QtCore/qtimer_singleshot_test.py index 7119ccd40..71f497e54 100644 --- a/sources/pyside6/tests/QtCore/qtimer_singleshot_test.py +++ b/sources/pyside6/tests/QtCore/qtimer_singleshot_test.py @@ -46,7 +46,7 @@ class WatchDog(QObject): '''Exits the QCoreApplication main loop after sometime.''' def __init__(self, watched): - QObject.__init__(self) + super().__init__() self.times_called = 0 self.watched = watched diff --git a/sources/pyside6/tests/QtCore/qtimer_timeout_test.py b/sources/pyside6/tests/QtCore/qtimer_timeout_test.py index 255ef9d25..6f6ff5297 100644 --- a/sources/pyside6/tests/QtCore/qtimer_timeout_test.py +++ b/sources/pyside6/tests/QtCore/qtimer_timeout_test.py @@ -45,7 +45,7 @@ class WatchDog(QObject): '''Exits the QCoreApplication main loop after sometime.''' def __init__(self, watched): - QObject.__init__(self) + super().__init__() self.times_called = 0 self.watched = watched diff --git a/sources/pyside6/tests/QtCore/snake_prop_feature_test.py b/sources/pyside6/tests/QtCore/snake_prop_feature_test.py index 01c8dd349..9c871dab1 100644 --- a/sources/pyside6/tests/QtCore/snake_prop_feature_test.py +++ b/sources/pyside6/tests/QtCore/snake_prop_feature_test.py @@ -60,7 +60,7 @@ This works now, including class properties. class Window(QWidget): def __init__(self): - super(Window, self).__init__() + super().__init__() class FeatureTest(unittest.TestCase): diff --git a/sources/pyside6/tests/QtGui/bug_652.py b/sources/pyside6/tests/QtGui/bug_652.py index a994e8997..3758f2edc 100644 --- a/sources/pyside6/tests/QtGui/bug_652.py +++ b/sources/pyside6/tests/QtGui/bug_652.py @@ -40,7 +40,7 @@ from PySide6.QtGui import QTextBlockUserData, QTextCursor, QTextDocument class MyData(QTextBlockUserData): def __init__(self, data): - QTextBlockUserData.__init__(self) + super().__init__() self.data = data def getMyNiceData(self): diff --git a/sources/pyside6/tests/QtGui/bug_660.py b/sources/pyside6/tests/QtGui/bug_660.py index 9fb2cd6db..61ae00a11 100644 --- a/sources/pyside6/tests/QtGui/bug_660.py +++ b/sources/pyside6/tests/QtGui/bug_660.py @@ -39,7 +39,7 @@ from PySide6.QtGui import QStandardItemModel, QStandardItem class MyItemModel(QStandardItemModel): def __init__(self,parent=None): - super(MyItemModel,self).__init__(parent) + super().__init__(parent) self.appendRow([QStandardItem('Item 1'),]) def mimeTypes(self): diff --git a/sources/pyside6/tests/QtGui/qrasterwindow_test.py b/sources/pyside6/tests/QtGui/qrasterwindow_test.py index 07d81c813..03a8701f0 100644 --- a/sources/pyside6/tests/QtGui/qrasterwindow_test.py +++ b/sources/pyside6/tests/QtGui/qrasterwindow_test.py @@ -45,7 +45,7 @@ from PySide6.QtGui import QColor, QBackingStore, QPaintDevice, QPainter, QWindow # Window using convenience class QRasterWindow class TestRasterWindow(QRasterWindow): def __init__(self): - super(TestRasterWindow, self).__init__() + super().__init__() self.text = QStaticText("QRasterWindow") def paintEvent(self, event): diff --git a/sources/pyside6/tests/QtMultimediaWidgets/qmultimediawidgets.py b/sources/pyside6/tests/QtMultimediaWidgets/qmultimediawidgets.py index ebdad6de7..cb5e1b355 100644 --- a/sources/pyside6/tests/QtMultimediaWidgets/qmultimediawidgets.py +++ b/sources/pyside6/tests/QtMultimediaWidgets/qmultimediawidgets.py @@ -44,7 +44,7 @@ from PySide6.QtCore import QTimer class MyWidget(QWidget): def __init__(self): - QWidget.__init__(self) + super().__init__() layout = QVBoxLayout(self) layout.addWidget(QVideoWidget()) diff --git a/sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py b/sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py index eae7e50ea..11720303b 100644 --- a/sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py +++ b/sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py @@ -53,7 +53,7 @@ except ImportError: class OpenGLWindow(QOpenGLWindow): def __init__(self): - super(OpenGLWindow, self).__init__() + super().__init__() self.m_functions = None self.m_texture = None diff --git a/sources/pyside6/tests/QtPrintSupport/returnquadruplesofnumbers_test.py b/sources/pyside6/tests/QtPrintSupport/returnquadruplesofnumbers_test.py index 2cb62d614..26b3cf7f8 100644 --- a/sources/pyside6/tests/QtPrintSupport/returnquadruplesofnumbers_test.py +++ b/sources/pyside6/tests/QtPrintSupport/returnquadruplesofnumbers_test.py @@ -43,15 +43,15 @@ from helper.usesqapplication import UsesQApplication class Layout(QLayout): def __init__(self): - QLayout.__init__(self) + super().__init__() class GraphicsLayout(QGraphicsLayout): def __init__(self): - QGraphicsLayout.__init__(self) + super().__init__() class GraphicsLayoutItem(QGraphicsLayoutItem): def __init__(self): - QGraphicsLayoutItem.__init__(self) + super().__init__() class ReturnsQuadruplesOfNumbers(UsesQApplication): def compareTuples(self, ta, tb): diff --git a/sources/pyside6/tests/QtQml/bug_456.py b/sources/pyside6/tests/QtQml/bug_456.py index ddb9819df..96654808a 100644 --- a/sources/pyside6/tests/QtQml/bug_456.py +++ b/sources/pyside6/tests/QtQml/bug_456.py @@ -43,7 +43,7 @@ from PySide6.QtQuick import QQuickView class RotateValue(QObject): def __init__(self): - super(RotateValue,self).__init__() + super().__init__() @Slot(result=int) def val(self): diff --git a/sources/pyside6/tests/QtQml/bug_726.py b/sources/pyside6/tests/QtQml/bug_726.py index 56712280c..ee8e77089 100644 --- a/sources/pyside6/tests/QtQml/bug_726.py +++ b/sources/pyside6/tests/QtQml/bug_726.py @@ -43,7 +43,7 @@ from PySide6.QtQuick import QQuickView class ProxyObject(QObject): def __init__(self): - super(ProxyObject,self).__init__() + super().__init__() self._o = None self._receivedName = "" diff --git a/sources/pyside6/tests/QtQml/bug_814.py b/sources/pyside6/tests/QtQml/bug_814.py index b89eb93f6..f90c8894d 100644 --- a/sources/pyside6/tests/QtQml/bug_814.py +++ b/sources/pyside6/tests/QtQml/bug_814.py @@ -54,7 +54,7 @@ from PySide6.QtQuick import QQuickView class ListModel(QAbstractListModel): def __init__(self): - QAbstractListModel.__init__(self) + super().__init__() def roleNames(self): return { Qt.DisplayRole: b'pysideModelData' } diff --git a/sources/pyside6/tests/QtQml/bug_847.py b/sources/pyside6/tests/QtQml/bug_847.py index 99e3d54eb..ffa688a32 100644 --- a/sources/pyside6/tests/QtQml/bug_847.py +++ b/sources/pyside6/tests/QtQml/bug_847.py @@ -51,7 +51,7 @@ from PySide6.QtQuick import QQuickView class View(QQuickView): def __init__(self): - QQuickView.__init__(self) + super().__init__() called = Signal(int, int) diff --git a/sources/pyside6/tests/QtQml/bug_926.py b/sources/pyside6/tests/QtQml/bug_926.py index f76c3c310..6ca5b4170 100644 --- a/sources/pyside6/tests/QtQml/bug_926.py +++ b/sources/pyside6/tests/QtQml/bug_926.py @@ -46,7 +46,7 @@ from PySide6.QtQuick import QQuickView class MyClass (QObject): def __init__(self): - super(MyClass,self).__init__() + super().__init__() self.__url = QUrl() def getUrl(self): diff --git a/sources/pyside6/tests/QtQml/bug_951.py b/sources/pyside6/tests/QtQml/bug_951.py index 2996fada7..fb4eeefca 100644 --- a/sources/pyside6/tests/QtQml/bug_951.py +++ b/sources/pyside6/tests/QtQml/bug_951.py @@ -45,7 +45,7 @@ from PySide6.QtQuick import QQuickItem, QQuickView class MyItem(QQuickItem): COMPONENT_COMPLETE_CALLED = False def __init__(self,parent=None): - super(MyItem, self).__init__(parent) + super().__init__(parent) self.setObjectName("myitem") def componentComplete(self): diff --git a/sources/pyside6/tests/QtQml/signal_arguments.py b/sources/pyside6/tests/QtQml/signal_arguments.py index 9fc8af24d..b3bd59491 100644 --- a/sources/pyside6/tests/QtQml/signal_arguments.py +++ b/sources/pyside6/tests/QtQml/signal_arguments.py @@ -43,7 +43,7 @@ from PySide6.QtCore import QObject, Signal, Slot, QUrl, QTimer, Property class Obj(QObject): def __init__(self): - QObject.__init__(self) + super().__init__() self.value = 0 sumResult = Signal(int, name="sumResult", arguments=['sum']) diff --git a/sources/pyside6/tests/QtSql/qsqldatabaseandqueries_test.py b/sources/pyside6/tests/QtSql/qsqldatabaseandqueries_test.py index 54696c687..f8d784bdb 100644 --- a/sources/pyside6/tests/QtSql/qsqldatabaseandqueries_test.py +++ b/sources/pyside6/tests/QtSql/qsqldatabaseandqueries_test.py @@ -46,7 +46,7 @@ from PySide6.QtWidgets import QApplication, QWidget class Foo(QWidget): def __init__(self): - QWidget.__init__(self) + super().__init__() self.model = QSqlTableModel() class SqlDatabaseCreationDestructionAndQueries(unittest.TestCase): diff --git a/sources/pyside6/tests/QtTest/eventfilter_test.py b/sources/pyside6/tests/QtTest/eventfilter_test.py index 50c264e35..e84024b0b 100644 --- a/sources/pyside6/tests/QtTest/eventfilter_test.py +++ b/sources/pyside6/tests/QtTest/eventfilter_test.py @@ -48,7 +48,7 @@ from helper.usesqapplication import UsesQApplication class KeyEventFilter(QObject): def __init__(self, widget, eventType, key): - QObject.__init__(self) + super().__init__() self.widget = widget self.eventType = eventType diff --git a/sources/pyside6/tests/QtUiTools/bug_1060.py b/sources/pyside6/tests/QtUiTools/bug_1060.py index c84268cb3..c5d8e61b3 100644 --- a/sources/pyside6/tests/QtUiTools/bug_1060.py +++ b/sources/pyside6/tests/QtUiTools/bug_1060.py @@ -42,7 +42,7 @@ from PySide6.QtUiTools import QUiLoader class MyQUiLoader(QUiLoader): def __init__(self): - super(MyQUiLoader, self).__init__() + super().__init__() def createWidget(self, *args): return super(MyQUiLoader, self).createWidget(*args) diff --git a/sources/pyside6/tests/QtUiTools/bug_360.py b/sources/pyside6/tests/QtUiTools/bug_360.py index e2edcea9f..230afb965 100644 --- a/sources/pyside6/tests/QtUiTools/bug_360.py +++ b/sources/pyside6/tests/QtUiTools/bug_360.py @@ -42,7 +42,7 @@ from PySide6.QtUiTools import QUiLoader class MyQUiLoader(QUiLoader): def __init__(self, baseinstance): - QUiLoader.__init__(self) + super().__init__() self.baseinstance = baseinstance self._widgets = [] diff --git a/sources/pyside6/tests/QtUiTools/bug_958.py b/sources/pyside6/tests/QtUiTools/bug_958.py index c2e072f64..2ef9b4331 100644 --- a/sources/pyside6/tests/QtUiTools/bug_958.py +++ b/sources/pyside6/tests/QtUiTools/bug_958.py @@ -42,7 +42,7 @@ from helper.timedqapplication import TimedQApplication class Gui_Qt(QMainWindow): def __init__(self, parent=None): - super(Gui_Qt, self).__init__(parent) + super().__init__(parent) lLoader = QUiLoader() diff --git a/sources/pyside6/tests/QtUiTools/bug_965.py b/sources/pyside6/tests/QtUiTools/bug_965.py index 82afe7d76..734158f68 100644 --- a/sources/pyside6/tests/QtUiTools/bug_965.py +++ b/sources/pyside6/tests/QtUiTools/bug_965.py @@ -41,7 +41,7 @@ from helper.usesqapplication import UsesQApplication class MyQUiLoader(QUiLoader): def __init__(self): - super(MyQUiLoader, self).__init__() + super().__init__() def createWidget(self, className, parent=None, name=""): return None diff --git a/sources/pyside6/tests/QtWidgets/bug_1006.py b/sources/pyside6/tests/QtWidgets/bug_1006.py index b8d59284e..96231ddc3 100644 --- a/sources/pyside6/tests/QtWidgets/bug_1006.py +++ b/sources/pyside6/tests/QtWidgets/bug_1006.py @@ -43,7 +43,7 @@ from helper.timedqapplication import TimedQApplication class LabelWindow(QDialog): def __init__(self, parent): - super(LabelWindow, self).__init__(parent) + super().__init__(parent) self.test_layout = QGridLayout() label = QLabel("Label") diff --git a/sources/pyside6/tests/QtWidgets/bug_307.py b/sources/pyside6/tests/QtWidgets/bug_307.py index 2a149c13e..19da5148e 100644 --- a/sources/pyside6/tests/QtWidgets/bug_307.py +++ b/sources/pyside6/tests/QtWidgets/bug_307.py @@ -42,7 +42,7 @@ from PySide6.QtWidgets import QPushButton, QApplication class Test (QApplication) : def __init__(self, argv) : - super(Test, self).__init__(argv) + super().__init__(argv) self._called = False def called(self): diff --git a/sources/pyside6/tests/QtWidgets/bug_338.py b/sources/pyside6/tests/QtWidgets/bug_338.py index 111417054..329a6746c 100644 --- a/sources/pyside6/tests/QtWidgets/bug_338.py +++ b/sources/pyside6/tests/QtWidgets/bug_338.py @@ -42,7 +42,7 @@ from PySide6.QtWidgets import QApplication, QGraphicsPolygonItem, QGraphicsScene class DiagramItem(QGraphicsPolygonItem): def __init__(self, parent=None, scene=None): - super(DiagramItem, self).__init__(parent, scene) + super().__init__(parent, scene) def itemChange(self, change, value): return value diff --git a/sources/pyside6/tests/QtWidgets/bug_433.py b/sources/pyside6/tests/QtWidgets/bug_433.py index a68a0615c..0cae07435 100644 --- a/sources/pyside6/tests/QtWidgets/bug_433.py +++ b/sources/pyside6/tests/QtWidgets/bug_433.py @@ -41,7 +41,7 @@ from PySide6.QtWidgets import QApplication, QGraphicsScene, QGraphicsView class Test(QGraphicsView): def __init__(self, parent=None): - super(Test, self).__init__(parent) + super().__init__(parent) self.s = QGraphicsScene() self.setScene(self.s) diff --git a/sources/pyside6/tests/QtWidgets/bug_525.py b/sources/pyside6/tests/QtWidgets/bug_525.py index d35b41c0a..573e9bf46 100644 --- a/sources/pyside6/tests/QtWidgets/bug_525.py +++ b/sources/pyside6/tests/QtWidgets/bug_525.py @@ -40,7 +40,7 @@ from PySide6.QtWidgets import QMenu class M2(QMenu): def __init__(self,parent=None): - super(M2,self).__init__(parent) + super().__init__(parent) self.setTitle(self.tr("M2")) class TestMenuDerivedClass(unittest.TestCase): diff --git a/sources/pyside6/tests/QtWidgets/bug_667.py b/sources/pyside6/tests/QtWidgets/bug_667.py index 2fa306a9c..3cad4e11a 100644 --- a/sources/pyside6/tests/QtWidgets/bug_667.py +++ b/sources/pyside6/tests/QtWidgets/bug_667.py @@ -40,12 +40,12 @@ from PySide6.QtWidgets import QApplication, QGraphicsView, QGraphicsScene, QGrap class Ball(QGraphicsEllipseItem): def __init__(self, d, parent=None): - super(Ball, self).__init__(0, 0, d, d, parent) + super().__init__(0, 0, d, d, parent) self.vel = QPointF(0,0) #commenting this out prevents the crash class Foo(QGraphicsView): def __init__(self): - super(Foo, self).__init__(None) + super().__init__(None) self.scene = QGraphicsScene(self.rect()) self.setScene(self.scene) self.scene.addItem(Ball(10)) diff --git a/sources/pyside6/tests/QtWidgets/bug_668.py b/sources/pyside6/tests/QtWidgets/bug_668.py index 8b03ebbdb..167a19ce6 100644 --- a/sources/pyside6/tests/QtWidgets/bug_668.py +++ b/sources/pyside6/tests/QtWidgets/bug_668.py @@ -43,7 +43,7 @@ from PySide6.QtWidgets import QApplication, QFileSystemModel, QMainWindow, QTree class A(QMainWindow): def __init__(self, parent=None): - super(A, self).__init__(parent) + super().__init__(parent) a = QFileSystemModel(self) a.setRootPath(QDir.homePath()) diff --git a/sources/pyside6/tests/QtWidgets/bug_793.py b/sources/pyside6/tests/QtWidgets/bug_793.py index 0741617d6..08c060f15 100644 --- a/sources/pyside6/tests/QtWidgets/bug_793.py +++ b/sources/pyside6/tests/QtWidgets/bug_793.py @@ -40,17 +40,17 @@ from PySide6.QtWidgets import QWidget, QApplication class TestW1(QWidget): def __init__(self, parent = None): - super(TestW1, self).__init__(parent) + super().__init__(parent) TestW2(parent, self) class TestW2(QWidget): def __init__(self, ancestor, parent = None): - super(TestW2, self).__init__(parent) + super().__init__(parent) self.ancestor_ref = ancestor class Test(QWidget): def __init__(self): - super(Test, self).__init__() + super().__init__() TestW1(self) class TestQApplicationDestrcutor(unittest.TestCase): diff --git a/sources/pyside6/tests/QtWidgets/bug_811.py b/sources/pyside6/tests/QtWidgets/bug_811.py index 1ba027dd0..cde5f2fe9 100644 --- a/sources/pyside6/tests/QtWidgets/bug_811.py +++ b/sources/pyside6/tests/QtWidgets/bug_811.py @@ -43,7 +43,7 @@ from PySide6.QtWidgets import QTextEdit class TestUserData(QTextBlockUserData): def __init__(self, data): - super(TestUserData, self).__init__() + super().__init__() self.data = data class TestUserDataRefCount(UsesQApplication): diff --git a/sources/pyside6/tests/QtWidgets/bug_836.py b/sources/pyside6/tests/QtWidgets/bug_836.py index f985e4615..4523c525c 100644 --- a/sources/pyside6/tests/QtWidgets/bug_836.py +++ b/sources/pyside6/tests/QtWidgets/bug_836.py @@ -50,7 +50,7 @@ class Mixin3(object): class MainWindow(Mixin1, Mixin2, Mixin3, QFrame): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() def main(): app = QApplication([]) diff --git a/sources/pyside6/tests/QtWidgets/bug_844.py b/sources/pyside6/tests/QtWidgets/bug_844.py index 1c7705939..879c08850 100644 --- a/sources/pyside6/tests/QtWidgets/bug_844.py +++ b/sources/pyside6/tests/QtWidgets/bug_844.py @@ -40,7 +40,7 @@ from PySide6.QtCore import QObject, QTimer class QtKeyPressListener(QObject): def __init__(self, obj): - QObject.__init__(self) + super().__init__() obj.installEventFilter(self) def eventFilter(self, obj, event): diff --git a/sources/pyside6/tests/QtWidgets/bug_862.py b/sources/pyside6/tests/QtWidgets/bug_862.py index f788cb12d..643b338e7 100644 --- a/sources/pyside6/tests/QtWidgets/bug_862.py +++ b/sources/pyside6/tests/QtWidgets/bug_862.py @@ -64,19 +64,19 @@ import PySide6.QtCore class MyQObject(QObject): def __init__(self): - QObject.__init__(self) + super().__init__() class MyQWidget(QWidget): def __init__(self): - QWidget.__init__(self) + super().__init__() class MyQGraphicsObject(QGraphicsObject): def __init__(self): - QGraphicsObject.__init__(self) + super().__init__() class MyQGraphicsItem(QGraphicsItem): def __init__(self): - QGraphicsItem.__init__(self) + super().__init__() class TestRepr (unittest.TestCase): diff --git a/sources/pyside6/tests/QtWidgets/paint_event_test.py b/sources/pyside6/tests/QtWidgets/paint_event_test.py index 19a082f71..ed5c56eee 100644 --- a/sources/pyside6/tests/QtWidgets/paint_event_test.py +++ b/sources/pyside6/tests/QtWidgets/paint_event_test.py @@ -50,7 +50,7 @@ class MyWidget(QWidget): if app is None: app = QApplication([]) - super(MyWidget, self).__init__() + super().__init__() self.app = app self.runs = 0 self.max_runs = 5 diff --git a/sources/pyside6/tests/QtWidgets/private_mangle_test.py b/sources/pyside6/tests/QtWidgets/private_mangle_test.py index f46d11778..bfa11c350 100644 --- a/sources/pyside6/tests/QtWidgets/private_mangle_test.py +++ b/sources/pyside6/tests/QtWidgets/private_mangle_test.py @@ -59,7 +59,7 @@ class Harness(QWidget): clicked = Signal() def __init__(self): - QWidget.__init__(self) + super().__init__() self.clicked.connect(self.method) self.clicked.connect(self._method) self.clicked.connect(self.__method) @@ -78,7 +78,7 @@ class _Under(QWidget): clicked = Signal() def __init__(self): - QWidget.__init__(self) + super().__init__() self.clicked.connect(self.method) self.clicked.connect(self._method) self.clicked.connect(self.__method) diff --git a/sources/pyside6/tests/QtWidgets/qgraphicsscene_test.py b/sources/pyside6/tests/QtWidgets/qgraphicsscene_test.py index a87ddd142..54e81c45c 100644 --- a/sources/pyside6/tests/QtWidgets/qgraphicsscene_test.py +++ b/sources/pyside6/tests/QtWidgets/qgraphicsscene_test.py @@ -63,7 +63,7 @@ class Constructor(unittest.TestCase): # QWidget due to handling multiple inheritance incorrectly. class CustomScene(QGraphicsScene): def __init__(self, parent = None): - super(CustomScene, self).__init__(parent) + super().__init__(parent) self.dpi = 0 def drawBackground(self, painter, rect): diff --git a/sources/pyside6/tests/QtWidgets/qpen_test.py b/sources/pyside6/tests/QtWidgets/qpen_test.py index fc365ff07..c833ebd92 100644 --- a/sources/pyside6/tests/QtWidgets/qpen_test.py +++ b/sources/pyside6/tests/QtWidgets/qpen_test.py @@ -43,7 +43,7 @@ from PySide6.QtWidgets import QWidget class Painting(QWidget): def __init__(self): - QWidget.__init__(self) + super().__init__() self.penFromEnum = None self.penFromInteger = None diff --git a/sources/pyside6/tests/QtWidgets/qpushbutton_test.py b/sources/pyside6/tests/QtWidgets/qpushbutton_test.py index bcec339c8..f126f58b6 100644 --- a/sources/pyside6/tests/QtWidgets/qpushbutton_test.py +++ b/sources/pyside6/tests/QtWidgets/qpushbutton_test.py @@ -41,7 +41,7 @@ from PySide6.QtCore import QTimer class MyWidget(QWidget): def __init__(self): - QWidget.__init__(self) + super().__init__() m = QMenu(self) b = QPushButton("Hello", self) diff --git a/sources/pyside6/tests/QtWidgets/qshortcut_test.py b/sources/pyside6/tests/QtWidgets/qshortcut_test.py index e09af1ac0..4fefcca64 100644 --- a/sources/pyside6/tests/QtWidgets/qshortcut_test.py +++ b/sources/pyside6/tests/QtWidgets/qshortcut_test.py @@ -45,7 +45,7 @@ from PySide6.QtWidgets import QApplication, QWidget class Foo(QWidget): def __init__(self): - QWidget.__init__(self) + super().__init__() self.ok = False self.copy = False diff --git a/sources/pyside6/tests/QtWidgets/qtabwidgetclear_test.py b/sources/pyside6/tests/QtWidgets/qtabwidgetclear_test.py index b4250c2c1..ff87f2bc2 100644 --- a/sources/pyside6/tests/QtWidgets/qtabwidgetclear_test.py +++ b/sources/pyside6/tests/QtWidgets/qtabwidgetclear_test.py @@ -40,7 +40,7 @@ from helper.usesqapplication import UsesQApplication class TabWidgetClear(QMainWindow): def __init__(self): - QMainWindow.__init__(self) + super().__init__() self.tabWidget = QTabWidget(self) self.setCentralWidget(self.tabWidget) self.editBox = QTextEdit(self) diff --git a/sources/pyside6/tests/QtWidgets/qtextedit_signal_test.py b/sources/pyside6/tests/QtWidgets/qtextedit_signal_test.py index 4820d953b..964e187f9 100644 --- a/sources/pyside6/tests/QtWidgets/qtextedit_signal_test.py +++ b/sources/pyside6/tests/QtWidgets/qtextedit_signal_test.py @@ -48,7 +48,7 @@ class MyWindow(QMainWindow): self.appendText.emit("PySide") def __init__(self, parent=None): - super(MyWindow, self).__init__(parent) + super().__init__(parent) self.textEdit = QTextEdit() self.btn = QPushButton("ClickMe") diff --git a/sources/pyside6/tests/QtWidgets/qwidget_test.py b/sources/pyside6/tests/QtWidgets/qwidget_test.py index 6ff904201..5b8bdd5a0 100644 --- a/sources/pyside6/tests/QtWidgets/qwidget_test.py +++ b/sources/pyside6/tests/QtWidgets/qwidget_test.py @@ -41,14 +41,14 @@ from helper.usesqapplication import UsesQApplication class QWidgetInherit(QMainWindow): def __init__(self): - QWidget.__init__(self) + QWidget.__init__(self) # Intended: Initialize QWidget instead of base class NativeEventTestWidget(QWidget): nativeEventCount = 0 def __init__(self): - QWidget.__init__(self) + super().__init__() def nativeEvent(self, eventType, message): self.nativeEventCount = self.nativeEventCount + 1 @@ -67,7 +67,7 @@ class QWidgetVisible(UsesQApplication): self.assertTrue(not widget.isVisible()) widget.setVisible(True) self.assertTrue(widget.isVisible()) - self.assertTrue(widget.winId() is not 0) + self.assertTrue(widget.winId() != 0) # skip this test on macOS since no native events are received if sys.platform == 'darwin': return diff --git a/sources/pyside6/tests/QtWidgets/virtual_protected_inheritance_test.py b/sources/pyside6/tests/QtWidgets/virtual_protected_inheritance_test.py index 220a6e31a..5fd685f01 100644 --- a/sources/pyside6/tests/QtWidgets/virtual_protected_inheritance_test.py +++ b/sources/pyside6/tests/QtWidgets/virtual_protected_inheritance_test.py @@ -47,7 +47,7 @@ class MySpinButton(QSpinBox): def __init__(self, max_runs=5, app=None): #Creates a new spinbox that will run and quit - super(MySpinButton, self).__init__() + super().__init__() if app is None: app = QApplication([]) diff --git a/sources/pyside6/tests/QtWidgets/wrong_return_test.py b/sources/pyside6/tests/QtWidgets/wrong_return_test.py index 019010f50..134acef14 100644 --- a/sources/pyside6/tests/QtWidgets/wrong_return_test.py +++ b/sources/pyside6/tests/QtWidgets/wrong_return_test.py @@ -47,7 +47,7 @@ warnings.simplefilter('error') class MyWidget(QWidget): def __init__(self, parent=None): - super(MyWidget, self).__init__(parent) + super().__init__(parent) def sizeHint(self): pass diff --git a/sources/pyside6/tests/manually/bug_841.py b/sources/pyside6/tests/manually/bug_841.py index 6f2b4902f..44edac83c 100644 --- a/sources/pyside6/tests/manually/bug_841.py +++ b/sources/pyside6/tests/manually/bug_841.py @@ -33,7 +33,7 @@ from PySide6.QtWidgets import QMainWindow, QTreeView, QAbstractItemView, QApplic class Item(QStandardItem): def __init__(self, text): - super(Item, self).__init__() + super().__init__() self.setText(text) self.setDragEnabled(True) self.setDropEnabled(True) @@ -44,7 +44,7 @@ class Item(QStandardItem): class Project(QStandardItemModel): def __init__(self): - super(Project, self).__init__() + super().__init__() self.setItemPrototype(Item("Prototype")) # add some items so we have stuff to move around self.appendRow(Item("ABC")) @@ -53,7 +53,7 @@ class Project(QStandardItemModel): class MainWindow(QMainWindow): def __init__(self): - super(MainWindow, self).__init__() + super().__init__() self.model = Project() self.view = QTreeView(self) diff --git a/sources/pyside6/tests/pysidetest/decoratedslot_test.py b/sources/pyside6/tests/pysidetest/decoratedslot_test.py index 3c9df7769..d1f8f6d40 100644 --- a/sources/pyside6/tests/pysidetest/decoratedslot_test.py +++ b/sources/pyside6/tests/pysidetest/decoratedslot_test.py @@ -42,7 +42,7 @@ from testbinding import TestObject class Receiver(QObject): def __init__(self): - QObject.__init__(self) + super().__init__() self.called = False def ReceiverDecorator(func): diff --git a/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py b/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py index 45a3a608a..adf8b8045 100644 --- a/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py +++ b/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py @@ -48,13 +48,13 @@ from PySide6.QtCore import QObject, Signal, Slot class Mixin(object): mixinSignal = Signal() def __init__(self, *args, **kwargs): - super(Mixin,self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class MixinTwo(Mixin): mixinTwoSignal = Signal() def __init__(self, *args, **kwargs): - super(MixinTwo,self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.mixinTwoSlotCalled = False @Slot() @@ -65,7 +65,7 @@ class MixinThree(object): mixinThreeSignal = Signal() def __init__(self, *args, **kwargs): - super(MixinThree,self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.mixinThreeSlotCalled = False @Slot() @@ -76,7 +76,7 @@ class Derived(Mixin, QObject): derivedSignal = Signal(str) def __init__(self): - super(Derived,self).__init__() + super().__init__() self.derivedSlotCalled = False self.derivedSlotString = '' @@ -89,7 +89,7 @@ class MultipleDerived(MixinTwo, MixinThree, Mixin, QObject): derivedSignal = Signal(str) def __init__(self): - super(MultipleDerived,self).__init__() + super().__init__() self.derivedSlotCalled = False self.derivedSlotString = '' diff --git a/sources/pyside6/tests/pysidetest/notify_id.py b/sources/pyside6/tests/pysidetest/notify_id.py index 870ee144a..f3c38ab06 100644 --- a/sources/pyside6/tests/pysidetest/notify_id.py +++ b/sources/pyside6/tests/pysidetest/notify_id.py @@ -42,7 +42,7 @@ notify method.''' class Foo(QObject): def __init__(self): - QObject.__init__(self) + super().__init__() self._prop = "Empty" def getProp(self): diff --git a/sources/pyside6/tests/pysidetest/properties_test.py b/sources/pyside6/tests/pysidetest/properties_test.py index 9333feb75..abd0b90b6 100644 --- a/sources/pyside6/tests/pysidetest/properties_test.py +++ b/sources/pyside6/tests/pysidetest/properties_test.py @@ -45,7 +45,7 @@ class TestObject(QObject): valueChanged = Signal() def __init__(self, parent=None): - super(TestObject, self).__init__(parent) + super().__init__(parent) self._value = -1 self.valueChanged.connect(self._changed) self.getter_called = 0 @@ -75,7 +75,7 @@ class TestDerivedObject(QStringListModel): valueChanged = Signal() def __init__(self, parent=None): - super(TestDerivedObject, self).__init__(parent) + super().__init__(parent) self._value = -1 self.valueChanged.connect(self._changed) self.getter_called = 0 diff --git a/sources/pyside6/tests/pysidetest/property_python_test.py b/sources/pyside6/tests/pysidetest/property_python_test.py index 4b55ee311..6e19e92a0 100644 --- a/sources/pyside6/tests/pysidetest/property_python_test.py +++ b/sources/pyside6/tests/pysidetest/property_python_test.py @@ -75,7 +75,7 @@ class PropertyDel(PropertyBase): class BaseClass(QObject): def __init__(self): - QObject.__init__(self) + super().__init__() self._spam = 5 @@ -127,7 +127,7 @@ class PropertySubNewGetter(BaseClass): class PropertyNewGetter(QObject): def __init__(self): - QObject.__init__(self) + super().__init__() @Property(object) def spam(self): diff --git a/sources/pyside6/tests/pysidetest/signal_slot_warning.py b/sources/pyside6/tests/pysidetest/signal_slot_warning.py index ef4419b6d..429fb113a 100644 --- a/sources/pyside6/tests/pysidetest/signal_slot_warning.py +++ b/sources/pyside6/tests/pysidetest/signal_slot_warning.py @@ -48,7 +48,7 @@ class Whatever(QtCore.QObject): echoSignal = QtCore.Signal(str) def __init__(self): - super(Whatever, self).__init__() + super().__init__() self.echoSignal.connect(self.mySlot) def mySlot(self, v): diff --git a/sources/pyside6/tests/pysidetest/typedef_signal_test.py b/sources/pyside6/tests/pysidetest/typedef_signal_test.py index 7357caee0..8bab3eab5 100644 --- a/sources/pyside6/tests/pysidetest/typedef_signal_test.py +++ b/sources/pyside6/tests/pysidetest/typedef_signal_test.py @@ -41,7 +41,7 @@ from testbinding import TestObject class Receiver(QObject): def __init__(self): - QObject.__init__(self) + super().__init__() self.received = None def slot(self, value): diff --git a/sources/pyside6/tests/signals/bug_311.py b/sources/pyside6/tests/signals/bug_311.py index 449734c33..f05796563 100644 --- a/sources/pyside6/tests/signals/bug_311.py +++ b/sources/pyside6/tests/signals/bug_311.py @@ -43,7 +43,7 @@ from helper.usesqcoreapplication import UsesQCoreApplication class DerivedDate(QDate): def __init__(self,y,m,d): - super(DerivedDate,self).__init__(y,m,d) + super().__init__(y,m,d) class Emitter(QObject): dateSignal1 = Signal(QDate) diff --git a/sources/pyside6/tests/signals/lambda_test.py b/sources/pyside6/tests/signals/lambda_test.py index 3d23d0ea7..ec130edee 100644 --- a/sources/pyside6/tests/signals/lambda_test.py +++ b/sources/pyside6/tests/signals/lambda_test.py @@ -47,7 +47,7 @@ from helper.usesqcoreapplication import UsesQCoreApplication class Dummy(QObject): def __init__(self, *args): - super(Dummy, self).__init__(*args) + super().__init__(*args) class BasicCase(unittest.TestCase): diff --git a/sources/pyside6/tests/signals/qobject_sender_test.py b/sources/pyside6/tests/signals/qobject_sender_test.py index d8ceb55f8..15b04dda3 100644 --- a/sources/pyside6/tests/signals/qobject_sender_test.py +++ b/sources/pyside6/tests/signals/qobject_sender_test.py @@ -46,11 +46,11 @@ from helper.usesqcoreapplication import UsesQCoreApplication class ExtQTimer(QTimer): def __init__(self): - QTimer.__init__(self) + super().__init__() class Receiver(QObject): def __init__(self): - QObject.__init__(self) + super().__init__() self.the_sender = None def callback(self): diff --git a/sources/pyside6/tests/signals/ref04_test.py b/sources/pyside6/tests/signals/ref04_test.py index f395033c0..62f45ac73 100644 --- a/sources/pyside6/tests/signals/ref04_test.py +++ b/sources/pyside6/tests/signals/ref04_test.py @@ -45,7 +45,7 @@ class ExtQObject(QObject): mySignal = Signal() def __init__(self): - QObject.__init__(self) + super().__init__() class UserSignalTest(unittest.TestCase): diff --git a/sources/pyside6/tests/signals/ref05_test.py b/sources/pyside6/tests/signals/ref05_test.py index 3358c3521..e16f7e391 100644 --- a/sources/pyside6/tests/signals/ref05_test.py +++ b/sources/pyside6/tests/signals/ref05_test.py @@ -44,7 +44,7 @@ from helper.usesqcoreapplication import UsesQCoreApplication class ExtQObject(QObject): def __init__(self): - QObject.__init__(self) + super().__init__() self.counter = 0 @Slot('qreal') diff --git a/sources/pyside6/tests/signals/ref06_test.py b/sources/pyside6/tests/signals/ref06_test.py index 9d8495e38..f86ea4b74 100644 --- a/sources/pyside6/tests/signals/ref06_test.py +++ b/sources/pyside6/tests/signals/ref06_test.py @@ -45,7 +45,7 @@ class ExtQObject(QObject): signalbetween = Signal('qreal') def __init__(self): - QObject.__init__(self) + super().__init__() self.counter = 0 @Slot('qreal') diff --git a/sources/pyside6/tests/signals/signal_across_threads.py b/sources/pyside6/tests/signals/signal_across_threads.py index c16ec4db7..3ab58cf53 100644 --- a/sources/pyside6/tests/signals/signal_across_threads.py +++ b/sources/pyside6/tests/signals/signal_across_threads.py @@ -44,7 +44,7 @@ from helper.usesqcoreapplication import UsesQCoreApplication class ReceiverBase(QObject): def __init__(self, parent=None): - super(ReceiverBase, self).__init__(parent) + super().__init__(parent) self.senderThread = None @Slot() @@ -58,7 +58,7 @@ class Receiver(ReceiverBase): class TestThread(QThread): def __init__(self, parent=None): - super(TestThread, self).__init__(parent) + super().__init__(parent) def run(self): pass diff --git a/sources/pyside6/tests/signals/signal_signature_test.py b/sources/pyside6/tests/signals/signal_signature_test.py index 235488d83..9aaa6c58b 100644 --- a/sources/pyside6/tests/signals/signal_signature_test.py +++ b/sources/pyside6/tests/signals/signal_signature_test.py @@ -49,7 +49,7 @@ class Obj(QObject): dummySignalArgs = Signal(str) numberSignal = Signal(int) def __init__(self): - QObject.__init__(self) + super().__init__() self.signal = '' def connectNotify(self, signal): -- cgit v1.2.3