mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
ifcopenshell.api.run to use explicit kwargs instead of unpacking
This commit is contained in:
@@ -64,7 +64,7 @@ def assign_flow_control(
|
||||
related_flow_controls = set(assignment.RelatedControlElements)
|
||||
related_flow_controls.add(related_flow_control)
|
||||
assignment.RelatedControlElements = list(related_flow_controls)
|
||||
ifcopenshell.api.owner.update_owner_history(file, **{"element": assignment})
|
||||
ifcopenshell.api.owner.update_owner_history(file, element=assignment)
|
||||
return assignment
|
||||
|
||||
assignment = file.create_entity(
|
||||
|
||||
@@ -83,7 +83,7 @@ class Usecase:
|
||||
related_objects = set(rel.RelatedObjects) or set()
|
||||
related_objects.add(self.port)
|
||||
rel.RelatedObjects = list(related_objects)
|
||||
ifcopenshell.api.owner.update_owner_history(self.file, **{"element": rel})
|
||||
ifcopenshell.api.owner.update_owner_history(self.file, element=rel)
|
||||
else:
|
||||
rel = self.file.create_entity(
|
||||
"IfcRelNests",
|
||||
|
||||
@@ -64,4 +64,4 @@ def unassign_flow_control(
|
||||
related_flow_controls = list(assignment.RelatedControlElements)
|
||||
related_flow_controls.remove(related_flow_control)
|
||||
assignment.RelatedControlElements = related_flow_controls
|
||||
ifcopenshell.api.owner.update_owner_history(file, **{"element": assignment})
|
||||
ifcopenshell.api.owner.update_owner_history(file, element=assignment)
|
||||
|
||||
@@ -74,7 +74,7 @@ class Usecase:
|
||||
related_objects = set(rel.RelatedObjects) or set()
|
||||
related_objects.remove(port)
|
||||
rel.RelatedObjects = list(related_objects)
|
||||
ifcopenshell.api.owner.update_owner_history(self.file, **{"element": rel})
|
||||
ifcopenshell.api.owner.update_owner_history(self.file, element=rel)
|
||||
|
||||
def execute_ifc2x3(self) -> None:
|
||||
for rel in self.element.HasPorts or []:
|
||||
|
||||
Reference in New Issue
Block a user