From 9f669c943234726a03cab6dcfb3f789bd16229a2 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Sat, 7 Feb 2026 23:49:07 +0900 Subject: [PATCH] cleanup: fix no-op 'or ()' condition and docstring typo in ChecksNotifier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix 'comparison.pull is None or ()' to 'comparison.pull is None' in _validate_pull_request — the 'or ()' was a no-op since () is falsy, so the expression was equivalent to just 'is None' - Fix typo "where chnaged" -> "were changed" in get_line_diff docstring Co-authored-by: Cursor --- apps/worker/services/notification/notifiers/checks/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/worker/services/notification/notifiers/checks/base.py b/apps/worker/services/notification/notifiers/checks/base.py index 2b908ac93..09a23457f 100644 --- a/apps/worker/services/notification/notifiers/checks/base.py +++ b/apps/worker/services/notification/notifiers/checks/base.py @@ -152,7 +152,7 @@ def _validate_pull_request( Returns a NotificationResult if validation fails, or None to continue. """ - if comparison.pull is None or (): + if comparison.pull is None: log.debug( "Falling back to commit_status: Not a pull request", extra={ @@ -280,7 +280,7 @@ def _build_payload_with_behavior( def get_line_diff(self, file_diff): """ - This method traverses a git file diff and returns the lines (as line numbers) that where chnaged + This method traverses a git file diff and returns the lines (as line numbers) that were changed Note: For now it only looks for line additions on diff, we can quickly add functionality to handle line deletions if needed