Skip to content

Commit

Permalink
Fix typing in Geometry dataclass for Python < 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoferigo committed Sep 12, 2024
1 parent b3d9e13 commit c649701
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rod/sdf/geometry.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from __future__ import annotations

import dataclasses
from typing import ClassVar
import types
from typing import ClassVar, Union

import mashumaro

Expand Down Expand Up @@ -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
)

Expand Down

0 comments on commit c649701

Please sign in to comment.