From 02117a4d7740cefa39dcd141166d8f6f20985761 Mon Sep 17 00:00:00 2001 From: rayhpeng Date: Thu, 23 Jul 2026 15:54:08 +0800 Subject: [PATCH] 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 --- .../harness/deerflow/domain/feedback/model.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/backend/packages/harness/deerflow/domain/feedback/model.py b/backend/packages/harness/deerflow/domain/feedback/model.py index 277c0c3cb..482d10320 100644 --- a/backend/packages/harness/deerflow/domain/feedback/model.py +++ b/backend/packages/harness/deerflow/domain/feedback/model.py @@ -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)