Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2024-12-13 15:50:27 +0100
committerCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2024-12-18 10:08:10 +0100
commit382a34586f73896d12063616eb8b31474c03f68a (patch)
treec33f9c01713fe2083351beade9d9536527712814
parent03a3e61b0cce28c44b68b032cff2e6b8fa869477 (diff)
Remove unnecessary use of 'object' in class constructionremoteobjectsdev
Considering we are not compatible with Python 2 anymore, we can drop the 'object' explicit inheritance in the class declaration. Pick-to: 6.8 Change-Id: Iac3a95aa9721c3ff1a755f457c0936ca157a8470 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--build_scripts/build_info_collector.py2
-rw-r--r--build_scripts/config.py2
-rw-r--r--build_scripts/options.py4
-rw-r--r--build_scripts/qtinfo.py2
-rw-r--r--build_scripts/setup_runner.py2
-rw-r--r--examples/widgets/itemviews/stardelegate/starrating.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part2.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part3.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part4.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part5.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part6.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part7.py2
-rw-r--r--examples/widgets/widgets/tetrix/tetrix.py2
-rw-r--r--sources/pyside6/doc/inheritance_graph.py2
-rw-r--r--sources/pyside6/tests/QtCore/bug_835.py2
-rw-r--r--sources/pyside6/tests/QtCore/classinfo_test.py2
-rw-r--r--sources/pyside6/tests/QtCore/mockclass_test.py2
-rw-r--r--sources/pyside6/tests/QtCore/qbytearray_operator_iadd_test.py2
-rw-r--r--sources/pyside6/tests/QtCore/qobject_inherits_test.py4
-rw-r--r--sources/pyside6/tests/QtQml/bug_825_old.py2
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_426.py2
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_836.py6
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_921.py2
-rw-r--r--sources/pyside6/tests/QtWidgets/import_test.py2
-rw-r--r--sources/pyside6/tests/QtWidgets/qvariant_test.py2
-rw-r--r--sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py4
-rw-r--r--sources/pyside6/tests/pysidetest/multiple_inheritance_test.py6
-rw-r--r--sources/pyside6/tests/pysidetest/property_python_test.py4
-rw-r--r--sources/pyside6/tests/registry/init_platform.py2
-rw-r--r--sources/pyside6/tests/util/helper/basicpyslotcase.py2
-rw-r--r--sources/pyside6/tests/util/helper/docmodifier.py2
-rw-r--r--sources/pyside6/tests/util/processtimer.py2
-rw-r--r--sources/shiboken6/libshiboken/embed/signature_bootstrap.py2
-rw-r--r--sources/shiboken6/shibokenmodule/Shiboken.pyi4
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py2
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/pyi_generator.py2
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py6
-rw-r--r--sources/shiboken6/tests/samplebinding/bug_704_test.py2
-rw-r--r--sources/shiboken6/tests/samplebinding/metaclass_test.py2
-rw-r--r--sources/shiboken6/tests/samplebinding/mixed_mi_test.py2
-rw-r--r--sources/shiboken6/tests/samplebinding/overload_sorting_test.py2
-rw-r--r--sources/shiboken6/tests/samplebinding/overload_test.py2
-rw-r--r--testing/blacklist.py2
-rw-r--r--testing/buildlog.py2
-rw-r--r--testing/parser.py2
-rw-r--r--testing/runner.py2
-rw-r--r--tools/leak_finder.py2
47 files changed, 59 insertions, 57 deletions
diff --git a/build_scripts/build_info_collector.py b/build_scripts/build_info_collector.py
index 62ec77dde..0c8becf49 100644
--- a/build_scripts/build_info_collector.py
+++ b/build_scripts/build_info_collector.py
@@ -130,7 +130,7 @@ def get_py_library(build_type, py_version, py_prefix, py_libdir, py_include_dir)
return py_library
-class BuildInfoCollectorMixin(object):
+class BuildInfoCollectorMixin:
build_base: str
build_lib: str
cmake: str
diff --git a/build_scripts/config.py b/build_scripts/config.py
index d446302de..f11fbb5e7 100644
--- a/build_scripts/config.py
+++ b/build_scripts/config.py
@@ -17,7 +17,7 @@ except ModuleNotFoundError:
import tomli as tomllib
-class Config(object, metaclass=Singleton):
+class Config(metaclass=Singleton):
def __init__(self):
# Constants
self._build_type_all = "all"
diff --git a/build_scripts/options.py b/build_scripts/options.py
index dae72faa2..5963a3982 100644
--- a/build_scripts/options.py
+++ b/build_scripts/options.py
@@ -41,7 +41,7 @@ def _warn_deprecated_option(option, replacement=None):
log.warning(w)
-class Options(object, metaclass=Singleton):
+class Options(metaclass=Singleton):
def __init__(self):
# Dictionary containing values of all the possible options.
@@ -181,7 +181,7 @@ class Options(object, metaclass=Singleton):
}
-class CommandMixin(object):
+class CommandMixin:
"""Mixin for the setuptools build/install commands handling the options."""
_static_class_finalized_once = False
diff --git a/build_scripts/qtinfo.py b/build_scripts/qtinfo.py
index 50231a942..352fad460 100644
--- a/build_scripts/qtinfo.py
+++ b/build_scripts/qtinfo.py
@@ -10,7 +10,7 @@ from .utils import (configure_cmake_project, parse_cmake_project_message_info,
platform_cmake_options)
-class QtInfo(object):
+class QtInfo:
_instance = None # singleton helpers
def __new__(cls): # __new__ always a classmethod
diff --git a/build_scripts/setup_runner.py b/build_scripts/setup_runner.py
index 8d79496a9..ec679801e 100644
--- a/build_scripts/setup_runner.py
+++ b/build_scripts/setup_runner.py
@@ -19,7 +19,7 @@ from build_scripts.utils import run_process
from build_scripts.log import log, LogLevel
-class SetupRunner(object):
+class SetupRunner:
def __init__(self, orig_argv):
self.invocations_list = []
diff --git a/examples/widgets/itemviews/stardelegate/starrating.py b/examples/widgets/itemviews/stardelegate/starrating.py
index a3576c69e..38faade64 100644
--- a/examples/widgets/itemviews/stardelegate/starrating.py
+++ b/examples/widgets/itemviews/stardelegate/starrating.py
@@ -12,7 +12,7 @@ from PySide6.QtCore import (QPointF, QSize, Qt)
PAINTING_SCALE_FACTOR = 20
-class StarRating(object):
+class StarRating:
""" Handle the actual painting of the stars themselves. """
def __init__(self, starCount=1, maxStarCount=5):
diff --git a/examples/widgets/tutorials/addressbook/part2.py b/examples/widgets/tutorials/addressbook/part2.py
index b91d08d8a..e4e509d7b 100644
--- a/examples/widgets/tutorials/addressbook/part2.py
+++ b/examples/widgets/tutorials/addressbook/part2.py
@@ -13,7 +13,7 @@ from PySide6.QtWidgets import (QApplication, QGridLayout,
class SortedDict(dict):
- class Iterator(object):
+ class Iterator:
def __init__(self, sorted_dict):
self._dict = sorted_dict
self._keys = sorted(self._dict.keys())
diff --git a/examples/widgets/tutorials/addressbook/part3.py b/examples/widgets/tutorials/addressbook/part3.py
index b6cf0598f..717e76282 100644
--- a/examples/widgets/tutorials/addressbook/part3.py
+++ b/examples/widgets/tutorials/addressbook/part3.py
@@ -13,7 +13,7 @@ from PySide6.QtWidgets import (QApplication, QGridLayout,
class SortedDict(dict):
- class Iterator(object):
+ class Iterator:
def __init__(self, sorted_dict):
self._dict = sorted_dict
self._keys = sorted(self._dict.keys())
diff --git a/examples/widgets/tutorials/addressbook/part4.py b/examples/widgets/tutorials/addressbook/part4.py
index 0a569adb7..3b9c565b5 100644
--- a/examples/widgets/tutorials/addressbook/part4.py
+++ b/examples/widgets/tutorials/addressbook/part4.py
@@ -13,7 +13,7 @@ from PySide6.QtWidgets import (QApplication, QGridLayout,
class SortedDict(dict):
- class Iterator(object):
+ class Iterator:
def __init__(self, sorted_dict):
self._dict = sorted_dict
self._keys = sorted(self._dict.keys())
diff --git a/examples/widgets/tutorials/addressbook/part5.py b/examples/widgets/tutorials/addressbook/part5.py
index 364a56a3f..062a81215 100644
--- a/examples/widgets/tutorials/addressbook/part5.py
+++ b/examples/widgets/tutorials/addressbook/part5.py
@@ -13,7 +13,7 @@ from PySide6.QtWidgets import (QApplication, QDialog, QGridLayout,
class SortedDict(dict):
- class Iterator(object):
+ class Iterator:
def __init__(self, sorted_dict):
self._dict = sorted_dict
self._keys = sorted(self._dict.keys())
diff --git a/examples/widgets/tutorials/addressbook/part6.py b/examples/widgets/tutorials/addressbook/part6.py
index a00fec3a2..926796c25 100644
--- a/examples/widgets/tutorials/addressbook/part6.py
+++ b/examples/widgets/tutorials/addressbook/part6.py
@@ -14,7 +14,7 @@ from PySide6.QtWidgets import (QApplication, QDialog, QFileDialog,
class SortedDict(dict):
- class Iterator(object):
+ class Iterator:
def __init__(self, sorted_dict):
self._dict = sorted_dict
self._keys = sorted(self._dict.keys())
diff --git a/examples/widgets/tutorials/addressbook/part7.py b/examples/widgets/tutorials/addressbook/part7.py
index dc560cd1a..ab86cf3c5 100644
--- a/examples/widgets/tutorials/addressbook/part7.py
+++ b/examples/widgets/tutorials/addressbook/part7.py
@@ -14,7 +14,7 @@ from PySide6.QtWidgets import (QApplication, QDialog, QFileDialog,
class SortedDict(dict):
- class Iterator(object):
+ class Iterator:
def __init__(self, sorted_dict):
self._dict = sorted_dict
self._keys = sorted(self._dict.keys())
diff --git a/examples/widgets/widgets/tetrix/tetrix.py b/examples/widgets/widgets/tetrix/tetrix.py
index 68a5033e7..130843b03 100644
--- a/examples/widgets/widgets/tetrix/tetrix.py
+++ b/examples/widgets/widgets/tetrix/tetrix.py
@@ -368,7 +368,7 @@ class TetrixBoard(QFrame):
y + self.square_height() - 1, x + self.square_width() - 1, y + 1)
-class TetrixPiece(object):
+class TetrixPiece:
coords_table = (
((0, 0), (0, 0), (0, 0), (0, 0)),
((0, -1), (0, 0), (-1, 0), (-1, 1)),
diff --git a/sources/pyside6/doc/inheritance_graph.py b/sources/pyside6/doc/inheritance_graph.py
index c45791ba5..2796226e1 100644
--- a/sources/pyside6/doc/inheritance_graph.py
+++ b/sources/pyside6/doc/inheritance_graph.py
@@ -32,7 +32,7 @@ def format_dict(d):
return result
-class InheritanceGraph(object):
+class InheritanceGraph:
"""
Given a list of classes, determines the set of classes that they inherit
from all the way to the root "object", and then is able to generate a
diff --git a/sources/pyside6/tests/QtCore/bug_835.py b/sources/pyside6/tests/QtCore/bug_835.py
index ffc599ee9..6bf4f261e 100644
--- a/sources/pyside6/tests/QtCore/bug_835.py
+++ b/sources/pyside6/tests/QtCore/bug_835.py
@@ -18,7 +18,7 @@ get_counter = 0
set_counter = 0
-class Descriptor(object):
+class Descriptor:
def __get__(self, obj, owner):
global get_counter
diff --git a/sources/pyside6/tests/QtCore/classinfo_test.py b/sources/pyside6/tests/QtCore/classinfo_test.py
index abd1c55b9..03f60db22 100644
--- a/sources/pyside6/tests/QtCore/classinfo_test.py
+++ b/sources/pyside6/tests/QtCore/classinfo_test.py
@@ -93,7 +93,7 @@ class TestClassInfo(unittest.TestCase):
pass
self.assertRaises(TypeError, make_info(), test_function)
- class NotAQObject(object):
+ class NotAQObject:
pass
self.assertRaises(TypeError, make_info(), NotAQObject)
diff --git a/sources/pyside6/tests/QtCore/mockclass_test.py b/sources/pyside6/tests/QtCore/mockclass_test.py
index 07dca7a6d..b588148d1 100644
--- a/sources/pyside6/tests/QtCore/mockclass_test.py
+++ b/sources/pyside6/tests/QtCore/mockclass_test.py
@@ -18,7 +18,7 @@ init_test_paths(False)
from PySide6.QtCore import QCoreApplication
-class Mock(object):
+class Mock:
def __init__(self):
self.called = False
self.return_value = None
diff --git a/sources/pyside6/tests/QtCore/qbytearray_operator_iadd_test.py b/sources/pyside6/tests/QtCore/qbytearray_operator_iadd_test.py
index cd14941bc..a319d604d 100644
--- a/sources/pyside6/tests/QtCore/qbytearray_operator_iadd_test.py
+++ b/sources/pyside6/tests/QtCore/qbytearray_operator_iadd_test.py
@@ -15,7 +15,7 @@ from PySide6.QtCore import QByteArray
from helper.docmodifier import DocModifier
-class BaseQByteArrayOperatorIAdd(object):
+class BaseQByteArrayOperatorIAdd:
'''Base class for QByteArray += operator tests.
Implementing classes should inherit from unittest.TestCase and implement
diff --git a/sources/pyside6/tests/QtCore/qobject_inherits_test.py b/sources/pyside6/tests/QtCore/qobject_inherits_test.py
index bdd927fe2..e1121abd7 100644
--- a/sources/pyside6/tests/QtCore/qobject_inherits_test.py
+++ b/sources/pyside6/tests/QtCore/qobject_inherits_test.py
@@ -44,7 +44,7 @@ class InheritsCase(unittest.TestCase):
# QObject.inherits(classname) should fail if classname isn't a
# QObject subclass
- class Parent(object):
+ class Parent:
# Dummy parent
pass
@@ -71,6 +71,8 @@ class InheritsCase(unittest.TestCase):
def testMultipleInheritance(self):
def declareClass():
+ # Note: 'object' cannot removed from this class declaration
+ # in order to make it work with QObject.
class Foo(object, QObject):
pass
diff --git a/sources/pyside6/tests/QtQml/bug_825_old.py b/sources/pyside6/tests/QtQml/bug_825_old.py
index e27cb14bc..e1a35d3d9 100644
--- a/sources/pyside6/tests/QtQml/bug_825_old.py
+++ b/sources/pyside6/tests/QtQml/bug_825_old.py
@@ -30,7 +30,7 @@ class MetaA(type):
pass
-class A(object):
+class A:
__metaclass__ = MetaA
diff --git a/sources/pyside6/tests/QtUiTools/bug_426.py b/sources/pyside6/tests/QtUiTools/bug_426.py
index 2f09afb73..d1dc7d9e3 100644
--- a/sources/pyside6/tests/QtUiTools/bug_426.py
+++ b/sources/pyside6/tests/QtUiTools/bug_426.py
@@ -16,7 +16,7 @@ from PySide6.QtWidgets import QApplication
from PySide6.QtUiTools import QUiLoader
-class Window(object):
+class Window:
def __init__(self):
loader = QUiLoader()
filePath = os.path.join(os.path.dirname(__file__), 'bug_426.ui')
diff --git a/sources/pyside6/tests/QtWidgets/bug_836.py b/sources/pyside6/tests/QtWidgets/bug_836.py
index b9d39d875..9486233e3 100644
--- a/sources/pyside6/tests/QtWidgets/bug_836.py
+++ b/sources/pyside6/tests/QtWidgets/bug_836.py
@@ -15,15 +15,15 @@ from PySide6.QtCore import QTimer
from PySide6.QtWidgets import QApplication, QFrame
-class Mixin1(object):
+class Mixin1:
pass
-class Mixin2(object):
+class Mixin2:
pass
-class Mixin3(object):
+class Mixin3:
pass
diff --git a/sources/pyside6/tests/QtWidgets/bug_921.py b/sources/pyside6/tests/QtWidgets/bug_921.py
index 5e9dcd05a..ef84219c4 100644
--- a/sources/pyside6/tests/QtWidgets/bug_921.py
+++ b/sources/pyside6/tests/QtWidgets/bug_921.py
@@ -24,7 +24,7 @@ class Signaller(QObject):
s3 = Signal()
-class Window(object):
+class Window:
def __init__(self, s):
self._window = QMainWindow()
diff --git a/sources/pyside6/tests/QtWidgets/import_test.py b/sources/pyside6/tests/QtWidgets/import_test.py
index 0b60241f0..cb810c025 100644
--- a/sources/pyside6/tests/QtWidgets/import_test.py
+++ b/sources/pyside6/tests/QtWidgets/import_test.py
@@ -1,2 +1,2 @@
-class PysideImportTest2(object):
+class PysideImportTest2:
pass
diff --git a/sources/pyside6/tests/QtWidgets/qvariant_test.py b/sources/pyside6/tests/QtWidgets/qvariant_test.py
index 0e1ecc2c9..74731e914 100644
--- a/sources/pyside6/tests/QtWidgets/qvariant_test.py
+++ b/sources/pyside6/tests/QtWidgets/qvariant_test.py
@@ -28,7 +28,7 @@ class MyItem(QGraphicsRectItem):
return value
-class Sequence(object):
+class Sequence:
# Having the __getitem__ method on a class transform the Python
# type to a PySequence.
# Before the patch: aa75437f9119d997dd290471ac3e2cc88ca88bf1
diff --git a/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py b/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py
index 3209f749f..7e1ddbb17 100644
--- a/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py
+++ b/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py
@@ -20,7 +20,7 @@ init_test_paths(False)
from PySide6.QtCore import QObject, Signal, Slot
-class Mixin(object):
+class Mixin:
mixinSignal = Signal()
def __init__(self, *args, **kwargs):
@@ -39,7 +39,7 @@ class MixinTwo(Mixin):
self.mixinTwoSlotCalled = True
-class MixinThree(object):
+class MixinThree:
mixinThreeSignal = Signal()
def __init__(self, *args, **kwargs):
diff --git a/sources/pyside6/tests/pysidetest/multiple_inheritance_test.py b/sources/pyside6/tests/pysidetest/multiple_inheritance_test.py
index a9808cfa3..fee2eea8d 100644
--- a/sources/pyside6/tests/pysidetest/multiple_inheritance_test.py
+++ b/sources/pyside6/tests/pysidetest/multiple_inheritance_test.py
@@ -22,7 +22,7 @@ def xprint(*args, **kw):
# This is the original testcase of PYSIDE-1564
-class Age(object):
+class Age:
def __init__(self, age=0, **kwds):
super().__init__(**kwds)
@@ -117,7 +117,7 @@ class II(G, H, QtWidgets.QLabel):
# PYSIDE-2294: Friedemann's test adapted.
# We need to ignore positional args in mixin classes.
-class Ui_X_MainWindow(object): # Emulating uic
+class Ui_X_MainWindow: # Emulating uic
def setupUi(self, MainWindow):
MainWindow.resize(400, 300)
self.lbl = QLabel(self)
@@ -160,7 +160,7 @@ class AdditionalMultipleInheritanceTest(UsesQApplication):
# PYSIDE-2654: Additional missing init test.
# This must work if no __init__ is defined (Ui_Form)
-class Ui_Form(object):
+class Ui_Form:
pass
diff --git a/sources/pyside6/tests/pysidetest/property_python_test.py b/sources/pyside6/tests/pysidetest/property_python_test.py
index e26f07bb9..faf509f1f 100644
--- a/sources/pyside6/tests/pysidetest/property_python_test.py
+++ b/sources/pyside6/tests/pysidetest/property_python_test.py
@@ -89,7 +89,7 @@ class SubClass(BaseClass):
raise PropertyDel(self._spam)
-class PropertyDocBase(object):
+class PropertyDocBase:
_spam = 1
def _get_spam(self):
@@ -188,7 +188,7 @@ class PropertyTests(unittest.TestCase):
@unittest.skipIf(sys.flags.optimize >= 2,
"Docstrings are omitted with -O2 and above")
def test_property_decorator_doc_writable(self):
- class PropertyWritableDoc(object):
+ class PropertyWritableDoc:
@Property(object)
def spam(self):
diff --git a/sources/pyside6/tests/registry/init_platform.py b/sources/pyside6/tests/registry/init_platform.py
index 0a040d0fc..e911f2182 100644
--- a/sources/pyside6/tests/registry/init_platform.py
+++ b/sources/pyside6/tests/registry/init_platform.py
@@ -104,7 +104,7 @@ from shibokensupport.signature.lib.enum_sig import SimplifyingEnumerator # noqa
sourcepath = os.path.splitext(__file__)[0] + ".py"
-class Formatter(object):
+class Formatter:
"""
Formatter is formatting the signature listing of an enumerator.
diff --git a/sources/pyside6/tests/util/helper/basicpyslotcase.py b/sources/pyside6/tests/util/helper/basicpyslotcase.py
index 80da149bd..b495eaead 100644
--- a/sources/pyside6/tests/util/helper/basicpyslotcase.py
+++ b/sources/pyside6/tests/util/helper/basicpyslotcase.py
@@ -5,7 +5,7 @@ from __future__ import annotations
import gc
-class BasicPySlotCase(object):
+class BasicPySlotCase:
'''Base class that tests python slots and signal emissions.
Python slots are defined as any callable passed to QObject.connect().
diff --git a/sources/pyside6/tests/util/helper/docmodifier.py b/sources/pyside6/tests/util/helper/docmodifier.py
index b6de62abb..ee95d9a0f 100644
--- a/sources/pyside6/tests/util/helper/docmodifier.py
+++ b/sources/pyside6/tests/util/helper/docmodifier.py
@@ -59,7 +59,7 @@ class DocModifier(type):
if __name__ == '__main__':
# tests
- class BaseTest(object):
+ class BaseTest:
__metaclass__ = DocModifier
def testBase(self):
diff --git a/sources/pyside6/tests/util/processtimer.py b/sources/pyside6/tests/util/processtimer.py
index 8187901c6..905405585 100644
--- a/sources/pyside6/tests/util/processtimer.py
+++ b/sources/pyside6/tests/util/processtimer.py
@@ -15,7 +15,7 @@ class TimeoutException(Exception):
return repr(self.msg)
-class ProcessTimer(object):
+class ProcessTimer:
'''Timeout function for controlling a subprocess.Popen instance.
Naive implementation using busy loop, see later other means
diff --git a/sources/shiboken6/libshiboken/embed/signature_bootstrap.py b/sources/shiboken6/libshiboken/embed/signature_bootstrap.py
index b0ba77107..7458500b3 100644
--- a/sources/shiboken6/libshiboken/embed/signature_bootstrap.py
+++ b/sources/shiboken6/libshiboken/embed/signature_bootstrap.py
@@ -167,7 +167,7 @@ def prepare_zipfile():
return sys.meta_path, EmbeddableZipImporter(vzip)
-class EmbeddableZipImporter(object):
+class EmbeddableZipImporter:
def __init__(self, zip_file):
def p2m(filename):
diff --git a/sources/shiboken6/shibokenmodule/Shiboken.pyi b/sources/shiboken6/shibokenmodule/Shiboken.pyi
index 6a1a63217..26fe9396e 100644
--- a/sources/shiboken6/shibokenmodule/Shiboken.pyi
+++ b/sources/shiboken6/shibokenmodule/Shiboken.pyi
@@ -13,12 +13,12 @@ Shiboken, except for defaults which are replaced by "...".
from shiboken6 import Shiboken
-class Object(object):
+class Object:
def __init__(self) -> None: ...
-class VoidPtr(object):
+class VoidPtr:
def __init__(self, value: int) -> None: ...
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
index 13508af1f..9dbddca2f 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
@@ -44,7 +44,7 @@ def signal_check(thing):
return thing and type(thing) in (Signal, SignalInstance)
-class ExactEnumerator(object):
+class ExactEnumerator:
"""
ExactEnumerator enumerates all signatures in a module as they are.
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/pyi_generator.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/pyi_generator.py
index ef0f32dc6..cff546005 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/pyi_generator.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/pyi_generator.py
@@ -30,7 +30,7 @@ from shibokensupport.signature.lib.tool import build_brace_pattern
indent = " " * 4
-class Writer(object):
+class Writer:
def __init__(self, outfile, *args):
self.outfile = outfile
self.history = [True, True]
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
index 5b7749388..af0fc6c0a 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
@@ -24,7 +24,7 @@ from typing import TypeVar, Generic
from _imp import is_builtin
-class ellipsis(object):
+class ellipsis:
def __repr__(self):
return "..."
@@ -126,7 +126,7 @@ class KeywordOnly(_NotCalled):
# Parameterized primitive variables
-class _Parameterized(object):
+class _Parameterized:
def __init__(self, type):
self.type = type
self.__name__ = self.__class__.__name__
@@ -149,7 +149,7 @@ class ArrayLikeVariable(_Parameterized):
StringList = ArrayLikeVariable(str)
-class Reloader(object):
+class Reloader:
"""
Reloder class
diff --git a/sources/shiboken6/tests/samplebinding/bug_704_test.py b/sources/shiboken6/tests/samplebinding/bug_704_test.py
index d0cfe4038..76fa84653 100644
--- a/sources/shiboken6/tests/samplebinding/bug_704_test.py
+++ b/sources/shiboken6/tests/samplebinding/bug_704_test.py
@@ -15,7 +15,7 @@ init_paths()
from sample import ObjectType
-class NewStyle(object):
+class NewStyle:
def name(self):
return "NewStyle"
diff --git a/sources/shiboken6/tests/samplebinding/metaclass_test.py b/sources/shiboken6/tests/samplebinding/metaclass_test.py
index c233e7e12..cbde1b579 100644
--- a/sources/shiboken6/tests/samplebinding/metaclass_test.py
+++ b/sources/shiboken6/tests/samplebinding/metaclass_test.py
@@ -18,7 +18,7 @@ class MetaA(type):
pass
-class A(object):
+class A:
__metaclass__ = MetaA
diff --git a/sources/shiboken6/tests/samplebinding/mixed_mi_test.py b/sources/shiboken6/tests/samplebinding/mixed_mi_test.py
index b3ee886d4..50e4970ce 100644
--- a/sources/shiboken6/tests/samplebinding/mixed_mi_test.py
+++ b/sources/shiboken6/tests/samplebinding/mixed_mi_test.py
@@ -17,7 +17,7 @@ init_paths()
from sample import ObjectType
-class Base(object):
+class Base:
'''Base Python class'''
def __init__(self):
diff --git a/sources/shiboken6/tests/samplebinding/overload_sorting_test.py b/sources/shiboken6/tests/samplebinding/overload_sorting_test.py
index 462a44eff..df4fdc010 100644
--- a/sources/shiboken6/tests/samplebinding/overload_sorting_test.py
+++ b/sources/shiboken6/tests/samplebinding/overload_sorting_test.py
@@ -18,7 +18,7 @@ from sample import (CustomOverloadSequence, ImplicitBase, ImplicitConv,
ImplicitTarget, SortedOverload)
-class Dummy(object):
+class Dummy:
pass
diff --git a/sources/shiboken6/tests/samplebinding/overload_test.py b/sources/shiboken6/tests/samplebinding/overload_test.py
index f87e4ef57..95a313df0 100644
--- a/sources/shiboken6/tests/samplebinding/overload_test.py
+++ b/sources/shiboken6/tests/samplebinding/overload_test.py
@@ -179,7 +179,7 @@ class OverloadTest(unittest.TestCase):
# Overload.acceptSequence(void*)
overload = Overload()
- class Foo(object):
+ class Foo:
pass
foo = Foo()
diff --git a/testing/blacklist.py b/testing/blacklist.py
index 513b511c5..68a00e8f3 100644
--- a/testing/blacklist.py
+++ b/testing/blacklist.py
@@ -16,7 +16,7 @@ from .buildlog import builds
from .helper import decorate
-class BlackList(object):
+class BlackList:
def __init__(self, blname):
if not blname:
f = StringIO()
diff --git a/testing/buildlog.py b/testing/buildlog.py
index 7bff6a201..90ff436d8 100644
--- a/testing/buildlog.py
+++ b/testing/buildlog.py
@@ -23,7 +23,7 @@ LogEntry = namedtuple("LogEntry", ["log_dir", "build_dir", "build_classifiers"])
is_ci = os.environ.get("QTEST_ENVIRONMENT", "") == "ci"
-class BuildLog(object):
+class BuildLog:
"""
This class is a convenience wrapper around a list of log entries.
diff --git a/testing/parser.py b/testing/parser.py
index cc889021c..abf00ef3f 100644
--- a/testing/parser.py
+++ b/testing/parser.py
@@ -121,7 +121,7 @@ def _parse_tests(test_log):
return result
-class TestParser(object):
+class TestParser:
def __init__(self, test_log):
self._results = _parse_tests(test_log)
diff --git a/testing/runner.py b/testing/runner.py
index 198f760ce..ad1e01d65 100644
--- a/testing/runner.py
+++ b/testing/runner.py
@@ -23,7 +23,7 @@ sys.path.append(build_scripts_dir)
from build_scripts.utils import detect_clang
-class TestRunner(object):
+class TestRunner:
def __init__(self, log_entry, project, index):
self.log_entry = log_entry
built_path = log_entry.build_dir
diff --git a/tools/leak_finder.py b/tools/leak_finder.py
index e5140c102..fb3505be3 100644
--- a/tools/leak_finder.py
+++ b/tools/leak_finder.py
@@ -80,7 +80,7 @@ except AttributeError:
have_debug = False
-class LeakFinder(object):
+class LeakFinder:
def __init__(self):
self.all, self.refs = self._make_snapshot()