Skip to content

Commit

Permalink
Ensure minimums are same type as fields (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondJoseph authored Oct 9, 2024
1 parent e1220f5 commit 4deecf8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scanspec/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class Circle(Region[Axis]):
y_axis: Axis = Field(description="The name matching the y axis of the spec")
x_middle: float = Field(description="The central x point of the circle")
y_middle: float = Field(description="The central y point of the circle")
radius: float = Field(description="Radius of the circle", gt=0)
radius: float = Field(description="Radius of the circle", gt=0.0)

def axis_sets(self) -> list[set[Axis]]: # noqa: D102
return [{self.x_axis, self.y_axis}]
Expand Down Expand Up @@ -348,10 +348,10 @@ class Ellipse(Region[Axis]):
x_middle: float = Field(description="The central x point of the ellipse")
y_middle: float = Field(description="The central y point of the ellipse")
x_radius: float = Field(
description="The radius along the x axis of the ellipse", gt=0
description="The radius along the x axis of the ellipse", gt=0.0
)
y_radius: float = Field(
description="The radius along the y axis of the ellipse", gt=0
description="The radius along the y axis of the ellipse", gt=0.0
)
angle: float = Field(description="The angle of the ellipse (degrees)", default=0.0)

Expand Down

0 comments on commit 4deecf8

Please sign in to comment.