diff --git a/src/ifcopenshell-python/ifcopenshell/__init__.py b/src/ifcopenshell-python/ifcopenshell/__init__.py index c5b30b2c17..115914a40b 100644 --- a/src/ifcopenshell-python/ifcopenshell/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/__init__.py @@ -249,7 +249,7 @@ def open( kwargs = {"mmap": mmap} if logger is not None: kwargs["logger"] = logger - f = ifcopenshell_wrapper.open(str(path.absolute()), **kwargs) # ty: ignore[unknown-argument] + f = ifcopenshell_wrapper.open(str(path.absolute()), **kwargs) else: f = ifcopenshell_wrapper.open(str(path.absolute()), False, *optional_logger_args(logger)) diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/update_end_point.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/update_end_point.py index 0349a99783..a772a16c77 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/update_end_point.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/update_end_point.py @@ -19,6 +19,7 @@ import numpy as np import ifcopenshell +import ifcopenshell.api.alignment import ifcopenshell.util.placement from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/update_fallback_position.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/update_fallback_position.py index 431d19fc86..c13b7a725f 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/update_fallback_position.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/update_fallback_position.py @@ -18,6 +18,7 @@ import ifcopenshell import ifcopenshell.util.placement +import ifcopenshell.util.unit from ifcopenshell import entity_instance diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_item_quantity.py b/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_item_quantity.py index e5722f809a..fabe7da38d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_item_quantity.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_item_quantity.py @@ -281,7 +281,7 @@ class FormulaEvaluator(ast.NodeVisitor): def visit_BinOp(self, node): left = self.visit(node.left) right = self.visit(node.right) - return OPERATORS[type(node.op)](left, right) + return OPERATORS[type(node.op)](left, right) # ty: ignore[too-many-positional-arguments] def visit_Name(self, node): return self.values[node.id] diff --git a/src/ifcopenshell-python/ifcopenshell/util/alignment.py b/src/ifcopenshell-python/ifcopenshell/util/alignment.py index 76fc9203f3..1c73f39af4 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/alignment.py +++ b/src/ifcopenshell-python/ifcopenshell/util/alignment.py @@ -56,7 +56,7 @@ def append_zero_length_segments(file: ifcopenshell.file) -> ifcopenshell.file: for alignment in alignments: layouts = ifcopenshell.api.alignment.get_alignment_layouts(alignment) for layout in layouts: - ifcopenshell.api.alignment.add_zero_length_segment(patched_file, layout, include_referent=False) + ifcopenshell.api.alignment.add_zero_length_segment(patched_file, layout) curve = ifcopenshell.api.alignment.get_layout_curve(layout) if curve: ifcopenshell.api.alignment.add_zero_length_segment(patched_file, curve) diff --git a/src/ifcopenshell-python/test/api/alignment/test_create_representation.py b/src/ifcopenshell-python/test/api/alignment/test_create_representation.py index b491158b3b..0fd0b2dc41 100644 --- a/src/ifcopenshell-python/test/api/alignment/test_create_representation.py +++ b/src/ifcopenshell-python/test/api/alignment/test_create_representation.py @@ -21,8 +21,12 @@ import math import pytest import ifcopenshell +import ifcopenshell.api.aggregate import ifcopenshell.api.alignment +import ifcopenshell.api.context +import ifcopenshell.api.spatial import ifcopenshell.api.unit +import ifcopenshell.util.unit def test_create_representation():