mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
typing
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from typing import Any
|
||||
from typing import Any, Union
|
||||
|
||||
# `std::vector<xxx>` usually translated to `tuple[xxx, ...]`.
|
||||
|
||||
@@ -832,12 +832,12 @@ class file:
|
||||
guid_map_: Any
|
||||
stream: Any
|
||||
def FreshId(self): ...
|
||||
def add(self, entity, id): ...
|
||||
def add(self, entity: entity_instance, id: int) -> entity_instance: ...
|
||||
def addEntities(self, entities): ...
|
||||
def batch(self): ...
|
||||
def build_inverses(self): ...
|
||||
def by_guid(self, guid): ...
|
||||
def by_id(self, id): ...
|
||||
def by_guid(self, guid: str) -> entity_instance: ...
|
||||
def by_id(self, id: int) -> entity_instance: ...
|
||||
def by_type(self, *args): ...
|
||||
def by_type_excl_subtypes(self, *args): ...
|
||||
@staticmethod
|
||||
@@ -848,9 +848,15 @@ class file:
|
||||
def getMaxId(self): ...
|
||||
def getTotalInverses(self, instance_id): ...
|
||||
def getUnit(self, unit_type): ...
|
||||
def get_inverse(self, e): ...
|
||||
def get_inverse_indices(self, *args): ...
|
||||
def get_total_inverses(self, e): ...
|
||||
def get_inverse(self, e: entity_instance) -> tuple[entity_instance, ...]: ...
|
||||
def get_inverse_indices(self, *args: Union[entity_instance, int]) -> tuple[int, ...]:
|
||||
"""Get the attribute indices for each inverse from `get_inverse`, that reference the provided entity..
|
||||
|
||||
:param args: entity or it's id. Maximum 1 entity at the time.
|
||||
"""
|
||||
...
|
||||
|
||||
def get_total_inverses(self, e: entity_instance) -> int: ...
|
||||
def good(self): ...
|
||||
@staticmethod
|
||||
def guid_map(*args): ...
|
||||
@@ -862,14 +868,14 @@ class file:
|
||||
def internal_guid_map(self): ...
|
||||
def load(self, entity_instance_name, entity, arg4, attribute_index): ...
|
||||
def recalculate_id_counter(self): ...
|
||||
def remove(self, entity): ...
|
||||
def remove(self, entity: entity_instance) -> None: ...
|
||||
@property
|
||||
def schema(self): ...
|
||||
def to_string(self): ...
|
||||
@staticmethod
|
||||
def traverse(instance, max_level): ...
|
||||
def traverse(instance: entity_instance, max_level: int) -> tuple[entity_instance, ...]: ...
|
||||
@staticmethod
|
||||
def traverse_breadth_first(instance, max_level): ...
|
||||
def traverse_breadth_first(instance: entity_instance, max_level: int) -> tuple[entity_instance, ...]: ...
|
||||
def try_read_semicolon(self): ...
|
||||
def types(self) -> tuple[str, ...]:
|
||||
"""Return a tuple of classes present in the file.
|
||||
|
||||
Reference in New Issue
Block a user