From 64aed6a7668bb197e572dc777c8cb082d67477ae Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sun, 9 Aug 2026 14:11:49 +0200 Subject: [PATCH] try fix stub --- .../ifcopenshell/ifcopenshell_wrapper.pyi | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/ifcopenshell_wrapper.pyi b/src/ifcopenshell-python/ifcopenshell/ifcopenshell_wrapper.pyi index 42457006f8..40ef1bfc1d 100644 --- a/src/ifcopenshell-python/ifcopenshell/ifcopenshell_wrapper.pyi +++ b/src/ifcopenshell-python/ifcopenshell/ifcopenshell_wrapper.pyi @@ -18,7 +18,7 @@ from typing import Any, Literal, Sequence, Union -from typing_extensions import Self +from typing_extensions import Self, Unpack import ifcopenshell.util.schema from ifcopenshell.entity_instance import entity_instance_mixin @@ -119,7 +119,10 @@ class native(representation): def size(self): ... class native_element(element): - def __init__(self, id, parent_id, name, type, guid, context, trsf, geometry, product): ... + def __init__( + self, + *args: Unpack[tuple[int, int, str, str, str, str, matrix4, native, entity_instance]], + ): ... def calculate_projected_surface_area(self, along_x, along_y, along_z): ... @property def geometry(self) -> native: ... @@ -142,7 +145,7 @@ class conversion_result: def style_ptr(self): ... class conversion_result_shape: - def serialize(self, place, arg3): ... + def serialize(self, *args: matrix4 | str) -> str | None: ... def triangulate(self, *args): ... def __init__(self, *args, **kwargs): ... def add(self, arg2): ... @@ -167,7 +170,6 @@ class conversion_result_shape: def num_vertices(self): ... def plane_equation(self): ... def position(self): ... - def serialize(self): ... def serialize_obj(self): ... def set_box(self, b): ... def solid(self): ... @@ -387,7 +389,7 @@ class RocksDbSerializer: def writeHeader(self) -> None: ... class serialization(representation): - def __init__(self, brep): ... + def __init__(self, native_geometry: native): ... @property def brep_data(self): ... @property @@ -396,11 +398,22 @@ class serialization(representation): def surface_styles(self): ... class serialized_element(element): - def __init__(self, shape_model): ... + def __init__(self, *args: Unpack[tuple[native_element]]): ... @property def geometry(self) -> serialization: ... class settings: + CURVES: Literal[0] + SURFACES_AND_SOLIDS: Literal[1] + CURVES_SURFACES_AND_SOLIDS: Literal[2] + TRIANGULATED: Literal[0] + NATIVE: Literal[1] + SERIALIZED: Literal[2] + MAXSTEPSIZE: Literal[0] + MINSTEPS: Literal[1] + TRIANGLE_MESH: Literal[0] + POLYHEDRON_WITHOUT_HOLES: Literal[1] + POLYHEDRON_WITH_HOLES: Literal[2] def get_(self, name): ... def get_type(self, name): ... def set_(self, *args): ... @@ -993,8 +1006,7 @@ class geom_item(item): surface_style: Any class geometry_conversion_result: - breps: Any - elements: Any + def __init__(self, *args: Self): ... index: Any item: Any products: Any