From c649701150854f5b0f9b12ce827f0ca77f3985c8 Mon Sep 17 00:00:00 2001 From: diegoferigo Date: Thu, 12 Sep 2024 15:55:25 +0200 Subject: [PATCH] Fix typing in Geometry dataclass for Python < 3.12 --- src/rod/sdf/geometry.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rod/sdf/geometry.py b/src/rod/sdf/geometry.py index 767b2a7..de55d58 100644 --- a/src/rod/sdf/geometry.py +++ b/src/rod/sdf/geometry.py @@ -1,7 +1,8 @@ from __future__ import annotations import dataclasses -from typing import ClassVar +import types +from typing import ClassVar, Union import mashumaro @@ -116,7 +117,7 @@ class Sphere(Element): @dataclasses.dataclass class Geometry(Element): - GeometryType: ClassVar = ( + GeometryType: ClassVar[types.UnionType] = ( Box | Capsule | Cylinder | Ellipsoid | Heightmap | Mesh | Plane | Sphere )