mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +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
|
||||
import numpy as np
|
||||
import ifcopenshell
|
||||
from typing import Any
|
||||
from typing import Any, Union
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ class ClippingInfo:
|
||||
operand_type: str = "IfcHalfSpaceSolid"
|
||||
|
||||
@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:
|
||||
- IfcBooleanResult IFC entity
|
||||
- `ClippingInfo` instance
|
||||
|
||||
Reference in New Issue
Block a user