diff options
Diffstat (limited to 'sources/pyside6/tests/QtCore')
23 files changed, 31 insertions, 31 deletions
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): |