fix(ci): satisfy ruff lint and format checks on main - #241
Conversation
The lint job has been failing on main since 9a1e5ab. "ruff check ." reported F811: server.py imported json on both line 1 and line 5. The duplicate is a no-op at runtime, but F811 is the rule that catches genuine silent redefinitions, so remove it rather than suppress it. "ruff format --check docs-agent-mcp/mcp-server tests" reported three files. Reformatted with the pinned ruff 0.15.9, scoped to exactly the two directories CI checks, so the never-format-checked docs-agent-mcp/pipelines tree is left untouched. Formatting changes only; no behaviour change. Verified locally against a live Milvus + TEI stack: all three MCP tools return identical relevance scores before and after, and smoke_tools.py exits 0. Signed-off-by: Kcodess2807 <karnatakarush@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Fixes #236. Flagging the overlap with #235, which formats
This PR covers all four so the job goes green in a single pass. Formatting was scoped to exactly the two directories CI checks, so Happy to close this in favour of #235 if the maintainers would rather land the fixes incrementally. |
ArshVermaGit
left a comment
There was a problem hiding this comment.
Looks good overall. The changes are focused on fixing the Ruff lint/format checks without changing runtime behavior. The verification results also show the existing test suite remains intact. No concerns from my side.
Fixes #236.
What
The
Lint and formatjob in.github/workflows/tests.ymlis currently failing onmain. This fixes both of its steps.Reproducible on a clean checkout of
mainwith the pinnedruff==0.15.9:1.
ruff check .server.pyimportsjsonon both line 1 and line 5. The duplicate is a no-op at runtime, so there is no user-visible impact — butF811is the rule that catches genuine silent redefinitions (a shadowed import, or two same-named tests where the second quietly replaces the first), so it is removed rather than suppressed.2.
ruff format --check docs-agent-mcp/mcp-server testsserver.py,tests/test_docs_pipeline.py,tests/test_mcp_server.py.Scope
Formatting was applied to exactly the two directories CI checks:
Deliberately not
ruff format ..docs-agent-mcp/pipelines/has never been format-checked by CI, and reformatting it here would bury a small fix in a large unrelated diff and conflict with in-flight pipeline work.ruff 0.15.9was used to match the pin in the workflow, since 0.16 widened the default rule set (see the note inpyproject.toml).Verification
All three CI jobs, locally:
ruff check .ruff format --check docs-agent-mcp/mcp-server testscompileallpytestBecause
server.pyis reformatted, the MCP server was also exercised against a live Milvus + TEI stack with all three collections populated.smoke_tools.pyexits 0 and every tool returns byte-identical relevance scores before and after:No behaviour change.