diff --git a/pyproject.toml b/pyproject.toml index 6bf5967c8e..930d8764b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -113,7 +113,9 @@ invalid-assignment = "ignore" invalid-parameter-default = "ignore" missing-override-decorator = "ignore" invalid-yield = "ignore" +unsound-yield = "ignore" invalid-return-type = "ignore" +unsound-return-statement = "ignore" non-callable-init-subclass = "ignore" not-iterable = "ignore" possibly-missing-attribute = "ignore" diff --git a/requirements-tools.txt b/requirements-tools.txt index 1388c7c518..e8c204d040 100644 --- a/requirements-tools.txt +++ b/requirements-tools.txt @@ -1,5 +1,5 @@ black==26.3.1 ruff==0.16.0 poethepoet -ty==0.0.63 +ty==0.0.72 gersemi==0.28.0 diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_as_polyline.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_as_polyline.py index 05e2262d4a..a86d1d16bc 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_as_polyline.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_as_polyline.py @@ -47,6 +47,7 @@ def _create_layout(file: ifcopenshell.file, alignment: entity_instance, points: start_dist_along = 0.0 gradient = None + dir = None for p1, p2 in zip(points, points[1:]): x1, y1, z1 = p1.Coordinates x2, y2, z2 = p2.Coordinates @@ -86,6 +87,7 @@ def _create_layout(file: ifcopenshell.file, alignment: entity_instance, points: start_dist_along += length # zero length segment + assert dir is not None hsegment = file.createIfcAlignmentSegment( ifcopenshell.guid.new(), DesignParameters=file.createIfcAlignmentHorizontalSegment(