file.get_inverse: document with_attribute_indices overload

This commit is contained in:
Andrej730
2026-07-14 18:42:42 +05:00
parent d772b24bd6
commit 1b1da821f1
2 changed files with 35 additions and 2 deletions
+13 -2
View File
@@ -911,9 +911,16 @@ class file:
self,
inst: ifcopenshell.entity_instance,
allow_duplicate: Literal[True],
with_attribute_indices: bool = False,
with_attribute_indices: Literal[False] = False,
) -> list[ifcopenshell.entity_instance]: ...
@overload
def get_inverse(
self,
inst: ifcopenshell.entity_instance,
allow_duplicate: Literal[True],
with_attribute_indices: Literal[True],
) -> list[tuple[ifcopenshell.entity_instance, int]]: ...
@overload
def get_inverse(
self,
inst: ifcopenshell.entity_instance,
@@ -925,7 +932,11 @@ class file:
inst: ifcopenshell.entity_instance,
allow_duplicate: bool = False,
with_attribute_indices: bool = False,
) -> Union[list[ifcopenshell.entity_instance], set[ifcopenshell.entity_instance]]:
) -> (
list[ifcopenshell.entity_instance]
| set[ifcopenshell.entity_instance]
| list[tuple[ifcopenshell.entity_instance, int]]
):
"""Return a list of entities that reference this entity
Warning: this is a slow function, especially when there is a large