This commit is contained in:
Andrej730
2024-08-30 16:56:13 +05:00
parent ccbb253d2c
commit 3c333c6b59
8 changed files with 17 additions and 11 deletions
+5 -2
View File
@@ -24,11 +24,14 @@ import zipfile
import functools
import ifcopenshell
from pathlib import Path
from typing import Optional, Any, Union, Callable, Generator, Literal
from typing import Optional, Any, Union, Callable, Generator, Literal, TYPE_CHECKING
from . import ifcopenshell_wrapper
from .entity_instance import entity_instance
if TYPE_CHECKING:
import ifcopenshell.util.schema
class Transaction:
def __init__(self, ifc_file):
@@ -406,7 +409,7 @@ class file:
return e
@property
def schema(self) -> Literal["IFC2X3", "IFC4", "IFC4X3"]:
def schema(self) -> ifcopenshell.util.schema.IFC_SCHEMA:
"""General IFC schema version: IFC2X3, IFC4, IFC4X3."""
prefixes = ("IFC", "X", "_ADD", "_TC")
reg = "".join(f"(?P<{s}>{s}\\d+)?" for s in prefixes)