mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
ifcopenshell.api.run to use explicit kwargs instead of unpacking
This commit is contained in:
@@ -100,10 +100,8 @@ def add_work_schedule(
|
||||
if work_plan:
|
||||
ifcopenshell.api.aggregate.assign_object(
|
||||
file,
|
||||
**{
|
||||
"products": [work_schedule],
|
||||
"relating_object": work_plan,
|
||||
}
|
||||
products=[work_schedule],
|
||||
relating_object=work_plan,
|
||||
)
|
||||
elif file.schema != "IFC2X3":
|
||||
# TODO: this is an ambiguity by buildingSMART
|
||||
|
||||
@@ -101,7 +101,7 @@ def assign_process(
|
||||
related_objects = list(operates_on.RelatedObjects)
|
||||
related_objects.append(related_object)
|
||||
operates_on.RelatedObjects = related_objects
|
||||
ifcopenshell.api.owner.update_owner_history(file, **{"element": operates_on})
|
||||
ifcopenshell.api.owner.update_owner_history(file, element=operates_on)
|
||||
else:
|
||||
operates_on = file.create_entity(
|
||||
"IfcRelAssignsToProcess",
|
||||
|
||||
@@ -77,7 +77,7 @@ def assign_product(
|
||||
related_objects = list(referenced_by.RelatedObjects)
|
||||
related_objects.append(related_object)
|
||||
referenced_by.RelatedObjects = related_objects
|
||||
ifcopenshell.api.owner.update_owner_history(file, **{"element": referenced_by})
|
||||
ifcopenshell.api.owner.update_owner_history(file, element=referenced_by)
|
||||
else:
|
||||
referenced_by = file.create_entity(
|
||||
"IfcRelAssignsToProduct",
|
||||
|
||||
@@ -94,7 +94,7 @@ class Usecase:
|
||||
related_objects = list(referenced_by.RelatedObjects)
|
||||
related_objects.append(related_object)
|
||||
referenced_by.RelatedObjects = related_objects
|
||||
ifcopenshell.api.owner.update_owner_history(self.file, **{"element": referenced_by})
|
||||
ifcopenshell.api.owner.update_owner_history(self.file, element=referenced_by)
|
||||
else:
|
||||
referenced_by = self.file.create_entity(
|
||||
"IfcRelDefinesByObject",
|
||||
|
||||
@@ -166,7 +166,7 @@ class Usecase:
|
||||
related_objects = list(referenced_by.RelatedObjects)
|
||||
related_objects.append(related_object)
|
||||
referenced_by.RelatedObjects = related_objects
|
||||
ifcopenshell.api.owner.update_owner_history(self.file, **{"element": referenced_by})
|
||||
ifcopenshell.api.owner.update_owner_history(self.file, element=referenced_by)
|
||||
else:
|
||||
referenced_by = self.file.create_entity(
|
||||
"IfcRelDefinesByObject",
|
||||
|
||||
Reference in New Issue
Block a user