Fix Ruff UP008 (super-call-with-parameters)

https://docs.astral.sh/ruff/rules/super-call-with-parameters/
This commit is contained in:
Andrej
2025-05-28 16:57:48 +05:00
parent 5ab14f1e4e
commit feebc701fa
5 changed files with 7 additions and 7 deletions
@@ -53,7 +53,7 @@ class External(svgwrite.container.Group):
if elem.tag.startswith(ns):
elem.tag = elem.tag[nsl:]
super(External, self).__init__(**extra)
super().__init__(**extra)
def get_xml(self):
return self.xml
+1 -1
View File
@@ -38,7 +38,7 @@ def run():
class GuiWidgetBimTester(QtWidgets.QWidget):
def __init__(self, args=None):
super(GuiWidgetBimTester, self).__init__()
super().__init__()
if args is not None and args != {}:
self.args = args
@@ -152,8 +152,8 @@ class entity_instance:
def __init__(self, e, file=None):
if isinstance(e, tuple):
e = ifcopenshell_wrapper.new_IfcBaseClass(*e)
super(entity_instance, self).__setattr__("wrapped_data", e)
super(entity_instance, self).__setattr__("method_list", None)
super().__setattr__("wrapped_data", e)
super().__setattr__("method_list", None)
# Make sure the file is not gc'ed while we have live instances
self.wrapped_data.file = file
@@ -339,7 +339,7 @@ class entity_instance:
self.wrapped_data.file.transaction.store_edit(self, idx, value)
if self.method_list is None:
super(entity_instance, self).__setattr__("method_list", _method_dict[self.is_a(True)])
super().__setattr__("method_list", _method_dict[self.is_a(True)])
method = self.method_list[idx]
@@ -141,7 +141,7 @@ class settings_mixin:
"""
def __init__(self, **kwargs):
super(settings_mixin, self).__init__()
super().__init__()
for k, v in kwargs.items():
self.set(getattr(self, k), v)
@@ -75,7 +75,7 @@ attribute_types = Union[simple_type, named_type, enumeration_type, select_type,
class ValidationError(Exception):
def __init__(self, message, attribute=None):
super(ValidationError, self).__init__(message)
super().__init__(message)
self.attribute = attribute