mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
minor fix to support union typing before python 3.10 #3774
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import ifcopenshell
|
import ifcopenshell
|
||||||
from typing import Any
|
from typing import Any, Union
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ class ClippingInfo:
|
|||||||
operand_type: str = "IfcHalfSpaceSolid"
|
operand_type: str = "IfcHalfSpaceSolid"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def parse(cls, raw_data: Any) -> ifcopenshell.entity_instance | ClippingInfo | None:
|
def parse(cls, raw_data: Any) -> Union[ifcopenshell.entity_instance, ClippingInfo, None]:
|
||||||
"""`raw_data` can be either:
|
"""`raw_data` can be either:
|
||||||
- IfcBooleanResult IFC entity
|
- IfcBooleanResult IFC entity
|
||||||
- `ClippingInfo` instance
|
- `ClippingInfo` instance
|
||||||
|
|||||||
Reference in New Issue
Block a user