ifcopenshell.api.run to use explicit kwargs instead of unpacking

This commit is contained in:
Andrej
2025-06-10 11:02:54 +05:00
parent a37d46ca3d
commit 1608677d40
52 changed files with 118 additions and 147 deletions
@@ -84,7 +84,7 @@ def assign_control(
related_objects = set(controls.RelatedObjects)
related_objects.add(related_object)
controls.RelatedObjects = list(related_objects)
ifcopenshell.api.owner.update_owner_history(file, **{"element": controls})
ifcopenshell.api.owner.update_owner_history(file, element=controls)
else:
controls = file.create_entity(
"IfcRelAssignsToControl",
@@ -63,5 +63,5 @@ def unassign_control(
related_objects = list(rel.RelatedObjects)
related_objects.remove(related_object)
rel.RelatedObjects = related_objects
ifcopenshell.api.owner.update_owner_history(file, **{"element": rel})
ifcopenshell.api.owner.update_owner_history(file, element=rel)
return rel