mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
ifcopenshell.validate - remove simple_spf dependency (689289b)
Moved it to `TYPE_CHECKING` since it's currently used just for typing. Was breaking validation in Bonsai since it doesn't provide all submodules with IfcOpenShell https://github.com/IfcOpenShell/IfcOpenShell/issues/6723#issuecomment-3016223786 Also added a simple test so github workflow would catch a simple error like this.
This commit is contained in:
@@ -42,6 +42,7 @@ options:
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
@@ -50,7 +51,7 @@ import types
|
||||
import argparse
|
||||
|
||||
from collections import namedtuple
|
||||
from typing import Union, Any, Optional
|
||||
from typing import Union, Any, Optional, TYPE_CHECKING
|
||||
from collections.abc import Iterator
|
||||
from logging import Logger, Handler
|
||||
|
||||
@@ -60,11 +61,13 @@ else:
|
||||
EllipsisType = type(...)
|
||||
|
||||
import ifcopenshell
|
||||
import ifcopenshell.simple_spf
|
||||
import ifcopenshell.ifcopenshell_wrapper
|
||||
import ifcopenshell.ifcopenshell_wrapper as W
|
||||
import ifcopenshell.express.rule_executor
|
||||
|
||||
if TYPE_CHECKING:
|
||||
import ifcopenshell.simple_spf
|
||||
|
||||
named_type = ifcopenshell.ifcopenshell_wrapper.named_type
|
||||
aggregation_type = ifcopenshell.ifcopenshell_wrapper.aggregation_type
|
||||
simple_type = ifcopenshell.ifcopenshell_wrapper.simple_type
|
||||
|
||||
Reference in New Issue
Block a user