chore: cleanup
This commit is contained in:
@@ -51,14 +51,14 @@ class GestureCommand(RIMessage):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
endpoint: Literal[ # pyright: ignore[reportIncompatibleVariableOverride] - We validate this stricter rule ourselves
|
endpoint: Literal[ # pyright: ignore[reportIncompatibleVariableOverride] - We validate this stricter rule ourselves
|
||||||
RIEndpoint.GESTURE_SINGLE, RIEndpoint.GESTURE_TAG, RIEndpoint.GESTURE_SINGLE
|
RIEndpoint.GESTURE_SINGLE, RIEndpoint.GESTURE_TAG
|
||||||
]
|
]
|
||||||
data: str
|
data: str
|
||||||
is_priority: bool = False
|
is_priority: bool = False
|
||||||
|
|
||||||
@model_validator(mode="after")
|
@model_validator(mode="after")
|
||||||
def check_endpoint(self):
|
def check_endpoint(self):
|
||||||
allowed = {RIEndpoint.GESTURE_SINGLE, RIEndpoint.GESTURE_TAG, RIEndpoint.GESTURE_SINGLE}
|
allowed = {RIEndpoint.GESTURE_SINGLE, RIEndpoint.GESTURE_TAG}
|
||||||
if self.endpoint not in allowed:
|
if self.endpoint not in allowed:
|
||||||
raise ValueError("endpoint must be GESTURE_SINGLE, GESTURE_TAG or GESTURE_BASIC")
|
raise ValueError("endpoint must be GESTURE_SINGLE, GESTURE_TAG or GESTURE_BASIC")
|
||||||
return self
|
return self
|
||||||
|
|||||||
Reference in New Issue
Block a user