More cleaning up of forward type hints to fix import errors

This commit is contained in:
Dion Moult
2024-05-07 14:58:12 +10:00
parent 89c4cbeb05
commit 424a06f6c8
5 changed files with 12 additions and 18 deletions
@@ -30,7 +30,7 @@ class Clipping:
operand_type: str = "IfcHalfSpaceSolid"
@classmethod
def parse(cls, raw_data: Any) -> Union[ifcopenshell.entity_instance, Clipping, None]:
def parse(cls, raw_data: Any) -> Union[ifcopenshell.entity_instance, "Clipping", None]:
"""Parse various formats into a clipping object
`raw_data` can be either:
@@ -23,12 +23,12 @@ import ifcopenshell.util.schema
import ifcopenshell.util.type
from ifcopenshell.entity_instance import entity_instance
from functools import lru_cache
from typing import List, Generator, Optional
from typing import List, Optional
templates: dict[str, PsetQto] = {}
templates: dict[str, "PsetQto"] = {}
def get_template(schema: str) -> PsetQto:
def get_template(schema: str) -> "PsetQto":
global templates
if schema not in templates:
templates[schema] = PsetQto(schema)