mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 18:43:26 +00:00
typing
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user