mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Fix Ruff UP008 (super-call-with-parameters)
https://docs.astral.sh/ruff/rules/super-call-with-parameters/
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user