implementation: Remove the duplicate filtering logic

Co-authored-by: qodo-merge-for-open-source[bot] <189517486+qodo-merge-for-open-source[bot]@users.noreply.github.com>
This commit is contained in:
diana-jung 2025-11-26 18:04:09 +09:00 committed by GitHub
parent 1315fa651b
commit d80e229bdf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -562,8 +562,7 @@ class PRCodeSuggestions:
async def push_inline_code_suggestions(self, data): async def push_inline_code_suggestions(self, data):
code_suggestions = [] code_suggestions = []
score_threshold = max(1, int(get_settings().pr_code_suggestions.suggestions_score_threshold)) if not data['code_suggestions']:
filtered_suggestions = [d for d in data['code_suggestions'] if int(d.get('score', 0)) >= score_threshold]
if not filtered_suggestions: if not filtered_suggestions:
get_logger().info('No suggestions found to improve this PR.') get_logger().info('No suggestions found to improve this PR.')