Resolve Python CodeQL quality alerts - #20
Merged
Liang-Chun Tsai (ltsai-dev) merged 4 commits intoAug 19, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Liang-Chun Tsai (ltsai-dev)
requested review from
a team
and
a lite review from Copilot
August 18, 2026 21:54
Copilot started reviewing on behalf of
Liang-Chun Tsai (ltsai-dev)
August 18, 2026 21:55
View session
There was a problem hiding this comment.
Pull request overview
This PR cleans up Python files by removing six unused imports that were flagged by CodeQL (py/unused-import), with the stated intent of keeping runtime behavior unchanged.
Changes:
- Removed an unused
loggingimport from the test runner utility. - Removed unused
sslandPathimports from the base LLM session module. - Removed unused imports/constants from AOAI session and test utilities (
httpx,USER_PROMPT_TPL,json).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
thinkingbox/common/testrunner.py |
Drops an unused logging import. |
thinkingbox/common/llm_session_base.py |
Drops unused ssl and Path imports. |
thinkingbox/common/aoai_responses_session.py |
Drops an unused httpx import and cleans up spacing. |
tests/test_rubrics_judge.py |
Drops an unused USER_PROMPT_TPL import from the test module. |
tests/mcp_test_tool.py |
Drops an unused json import from the MCP test tool. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c685bf42-ecb9-40bc-aaaf-dfe2d501bfd4
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c685bf42-ecb9-40bc-aaaf-dfe2d501bfd4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
py/unused-importBaseExceptioncatches, unused test variables, and an unnecessary lambdaAddresses code-scanning alerts #1-#7 and #41-#58. OpenSSF Scorecard findings are intentionally excluded because they concern repository policy, workflow pinning, fuzzing, and project governance rather than Python code defects.
Validation
git diff --checkLocal pytest and pre-commit execution remain unavailable because the environment cannot download missing dependencies due to a PyPI TLS handshake failure; CI runs both checks.