style(feedback): give domain errors docstrings instead of ... bodies

The single-line `class X: ...` exception stubs tripped
github-code-quality's "Statement has no effect" rule: a bare `...` is a
discarded expression statement. Replace each with a one-line docstring,
matching the empty-error convention used elsewhere (GoalWriteConflict,
ConflictError) and silencing the false positive. No behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
rayhpeng 2026-07-23 15:54:08 +08:00
parent ecc9f26f44
commit 02117a4d77

View File

@ -21,19 +21,24 @@ VALID_FEEDBACK_TAGS = frozenset(
)
class FeedbackError(Exception): ...
class FeedbackError(Exception):
"""Base error for the feedback domain."""
class InvalidRatingError(FeedbackError): ...
class InvalidRatingError(FeedbackError):
"""Raised when a rating is not +1 or -1."""
class InvalidTagError(FeedbackError): ...
class InvalidTagError(FeedbackError):
"""Raised when a feedback tag is not a known reason slug."""
class DuplicateFeedbackError(FeedbackError): ...
class DuplicateFeedbackError(FeedbackError):
"""Raised when a concurrent upsert conflicts on the same run's feedback."""
class RunNotFoundError(FeedbackError): ...
class RunNotFoundError(FeedbackError):
"""Raised when the run does not exist or does not belong to the thread."""
@dataclass(frozen=True)