Proper class names (#272)

* towards proper class names

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* mypy

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* I have generated the latest API!

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jess Frazelle
2024-09-10 15:24:19 -07:00
committed by GitHub
parent 65d40767fa
commit 4ee77bb1cf
21 changed files with 1286 additions and 1266 deletions

View File

@ -9,7 +9,7 @@ from ..models.point2d import Point2d
from ..models.point3d import Point3d
class line(BaseModel):
class OptionLine(BaseModel):
"""A straight line segment. Goes from the current path \"pen\" to the given endpoint."""
end: Point3d
@ -21,7 +21,7 @@ class line(BaseModel):
model_config = ConfigDict(protected_namespaces=())
class arc(BaseModel):
class OptionArc(BaseModel):
"""A circular arc segment. Arcs can be drawn clockwise when start > end."""
center: Point2d
@ -39,7 +39,7 @@ class arc(BaseModel):
model_config = ConfigDict(protected_namespaces=())
class bezier(BaseModel):
class OptionBezier(BaseModel):
"""A cubic bezier curve segment. Start at the end of the current line, go through control point 1 and 2, then end at a given point."""
control1: Point3d
@ -55,7 +55,7 @@ class bezier(BaseModel):
model_config = ConfigDict(protected_namespaces=())
class tangential_arc(BaseModel):
class OptionTangentialArc(BaseModel):
"""Adds a tangent arc from current pen position with the given radius and angle."""
offset: Angle
@ -67,7 +67,7 @@ class tangential_arc(BaseModel):
model_config = ConfigDict(protected_namespaces=())
class tangential_arc_to(BaseModel):
class OptionTangentialArcTo(BaseModel):
"""Adds a tangent arc from current pen position to the new position. Arcs will choose a clockwise or counter-clockwise direction based on the arc end position."""
angle_snap_increment: Optional[Angle] = None
@ -82,11 +82,11 @@ class tangential_arc_to(BaseModel):
PathSegment = RootModel[
Annotated[
Union[
line,
arc,
bezier,
tangential_arc,
tangential_arc_to,
OptionLine,
OptionArc,
OptionBezier,
OptionTangentialArc,
OptionTangentialArcTo,
],
Field(discriminator="type"),
]