Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure minimums are same type as fields #146

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading