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

fix(api): rename TouchTipParams -> LiquidClassTouchTipParams to avoid name conflict #16848

Merged
merged 2 commits into from
Nov 15, 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
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,13 @@ def _validate_params(
return v


class TouchTipParams(BaseModel):
class LiquidClassTouchTipParams(BaseModel):
"""Parameters for touch-tip."""

# Note: Do not call this `TouchTipParams`, because that class name is used by the
# unrelated touchTip command in PE. Both classes are exported to things like the
# command schema JSON files, so the classes can't have the same name.

zOffset: _Number = Field(
...,
description="Offset from the top of the well for touch-tip, in millimeters.",
Expand All @@ -101,14 +105,14 @@ class TouchTipProperties(BaseModel):
"""Shared properties for the touch-tip function."""

enable: bool = Field(..., description="Whether touch-tip is enabled.")
params: Optional[TouchTipParams] = Field(
params: Optional[LiquidClassTouchTipParams] = Field(
None, description="Parameters for the touch-tip function."
)

@validator("params")
def _validate_params(
cls, v: Optional[TouchTipParams], values: Dict[str, Any]
) -> Optional[TouchTipParams]:
cls, v: Optional[LiquidClassTouchTipParams], values: Dict[str, Any]
) -> Optional[LiquidClassTouchTipParams]:
if v is None and values["enable"]:
raise ValueError(
"If enable is true parameters for touch tip must be defined."
Expand Down
Loading