util.unit.py - black format

This commit is contained in:
Andrej730
2024-03-11 13:25:11 +05:00
parent a4a965e7ab
commit 38bbaa0a8f
@@ -669,7 +669,8 @@ def format_length(
def is_attr_type( def is_attr_type(
content_type: ifcopenshell.ifcopenshell_wrapper.named_type | ifcopenshell.ifcopenshell_wrapper.type_declaration, content_type: ifcopenshell.ifcopenshell_wrapper.named_type | ifcopenshell.ifcopenshell_wrapper.type_declaration,
ifc_unit_type_name: str) -> ifcopenshell.ifcopenshell_wrapper.type_declaration | None: ifc_unit_type_name: str,
) -> ifcopenshell.ifcopenshell_wrapper.type_declaration | None:
cur_decl = content_type cur_decl = content_type
while hasattr(cur_decl, "declared_type") is True: while hasattr(cur_decl, "declared_type") is True:
cur_decl = cur_decl.declared_type() cur_decl = cur_decl.declared_type()
@@ -693,8 +694,9 @@ def is_attr_type(
return None return None
def iter_element_and_attributes_per_type(ifc_file: ifcopenshell.file, attr_type_name: str) -> Iterable[ def iter_element_and_attributes_per_type(
Tuple[ifcopenshell.entity_instance, ifcopenshell.ifcopenshell_wrapper.attribute, Any, str]]: ifc_file: ifcopenshell.file, attr_type_name: str
) -> Iterable[Tuple[ifcopenshell.entity_instance, ifcopenshell.ifcopenshell_wrapper.attribute, Any, str]]:
schema = ifcopenshell.ifcopenshell_wrapper.schema_by_name(ifc_file.schema) schema = ifcopenshell.ifcopenshell_wrapper.schema_by_name(ifc_file.schema)
for element in ifc_file: for element in ifc_file: