From c3ddfbdae238d30e26d6092b665098c51c4bb306 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 24 Jan 2024 16:36:58 +0500 Subject: [PATCH] fix couple building docs errors / warnings --- src/blenderbim/blenderbim/tool/qto.py | 2 +- .../api/resource/calculate_resource_work.py | 2 +- .../ifcopenshell/util/element.py | 20 ++++++++++--------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/blenderbim/blenderbim/tool/qto.py b/src/blenderbim/blenderbim/tool/qto.py index 558fce008d..c0fa802212 100644 --- a/src/blenderbim/blenderbim/tool/qto.py +++ b/src/blenderbim/blenderbim/tool/qto.py @@ -181,7 +181,7 @@ class Qto(blenderbim.core.tool.Qto): "quantity_value" : XX, "quantity_type" : XX }] - :rtype list + :rtype: list Example: diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/calculate_resource_work.py b/src/ifcopenshell-python/ifcopenshell/api/resource/calculate_resource_work.py index a3df2a710b..ef777ed5df 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/resource/calculate_resource_work.py +++ b/src/ifcopenshell-python/ifcopenshell/api/resource/calculate_resource_work.py @@ -54,7 +54,7 @@ class Usecase: the work performed. :type resource: ifcopenshell.entity_instance.entity_instance :return None: - :rtype None: + :rtype: None: """ self.file = file self.settings = {"resource": resource} diff --git a/src/ifcopenshell-python/ifcopenshell/util/element.py b/src/ifcopenshell-python/ifcopenshell/util/element.py index 46206c3490..ae2be10471 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/element.py +++ b/src/ifcopenshell-python/ifcopenshell/util/element.py @@ -338,7 +338,7 @@ def get_type(element): :param element: The element occurrence :type: ifcopenshell.entity_instance.entity_instance :return: The related type element - :rtype ifcopenshell.entity_instance.entity_instance + :rtype: ifcopenshell.entity_instance.entity_instance Example: @@ -817,8 +817,9 @@ def get_aggregate(element): Example: .. code:: python - element = file.by_type("IfcBeam")[0] - aggregate = ifcopenshell.util.element.get_aggregate(element) + + element = file.by_type("IfcBeam")[0] + aggregate = ifcopenshell.util.element.get_aggregate(element) """ if hasattr(element, "Decomposes") and element.Decomposes: if element.Decomposes[0].is_a("IfcRelAggregates"): # IFC2X3 @@ -835,8 +836,9 @@ def get_nest(element): Example: .. code:: python - element = file.by_type("IfcBeam")[0] - aggregate = ifcopenshell.util.element.get_nest(element) + + element = file.by_type("IfcBeam")[0] + aggregate = ifcopenshell.util.element.get_nest(element) """ if hasattr(element, "Nests"): if element.Nests: @@ -856,9 +858,9 @@ def get_parts(element): Example: .. code:: python - element = file.by_type("IfcElementAssembly")[0] - parts = ifcopenshell.util.element.get_parts(element) + element = file.by_type("IfcElementAssembly")[0] + parts = ifcopenshell.util.element.get_parts(element) """ if hasattr(element, "IsDecomposedBy") and element.IsDecomposedBy: if element.IsDecomposedBy[0].is_a("IfcRelAggregates"): @@ -879,9 +881,9 @@ def get_components(element, include_ports=False): Example: .. code:: python - element = file.by_type("IfcElementAssembly")[0] - components = ifcopenshell.util.element.get_components(element) + element = file.by_type("IfcElementAssembly")[0] + components = ifcopenshell.util.element.get_components(element) """ if hasattr(element, "IsNestedBy"): if element.IsNestedBy: