Open DaJansenGit opened 2 weeks ago
A good example is this:
def get_ifc_types(self, relevant_elements: List[Type[ProductBased]]) \
-> Set[str]:
"""Extract used ifc types from list of elements."""
relevant_ifc_types = []
for ele in relevant_elements:
relevant_ifc_types.extend(ele.ifc_types.keys())
return set(relevant_ifc_types)
In some cases it might make sense to use TYPE_CHECKING to prevent circular imports
from typing import TYPE_CHECKING
if TYPE_CHECKING:
import ...
please check google to find out why and how this works ;)
at least in core (bim2sim main without plugins)