Skip to content

Fix: replace unused loop variable round_idx with _ in stream_response#434

Open
arohi06 wants to merge 1 commit intoGenAI-Security-Project:mainfrom
arohi06:fix-unused-round-idx
Open

Fix: replace unused loop variable round_idx with _ in stream_response#434
arohi06 wants to merge 1 commit intoGenAI-Security-Project:mainfrom
arohi06:fix-unused-round-idx

Conversation

@arohi06
Copy link
Copy Markdown

@arohi06 arohi06 commented Mar 29, 2026

Fix: Remove unused loop variable round_idx

This PR replaces the unused loop variable round_idx with _ in ChatAssistantBase.stream_response to follow Python conventions and improve code clarity.

Changes:

  • Updated loop from for round_idx in range(max_tool_rounds) to for _ in range(max_tool_rounds)

Why:

  • round_idx was defined but never used
  • Using _ clearly indicates an intentionally unused variable
  • Avoids confusion for future contributors and satisfies linting rules

Result:

  • Cleaner and more readable code
  • No functional changes

Please let me know if any changes are required. Thanks!
Closes #414

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug_193_EVALUATE: CHAT-L3-QA-003 — Loop variable round_idx defined but never used in stream_response

1 participant