Skip to content

fix: quote pip version specifier in ci.yml & move asyncio import to module level#9

Open
salem221094 wants to merge 3 commits into
HKUDS:mainfrom
salem221094:fix/ci-lint-errors-v3
Open

fix: quote pip version specifier in ci.yml & move asyncio import to module level#9
salem221094 wants to merge 3 commits into
HKUDS:mainfrom
salem221094:fix/ci-lint-errors-v3

Conversation

@salem221094
Copy link
Copy Markdown

What broke

CI run #24933019577 failed due to two bugs introduced in the feat/mcp-server merge (PR #6).

Bug 1 — Shell interprets >= as a redirect in ci.yml

# Before (broken)
- run: pip install ruff>=0.4

# After (fixed)
- run: pip install "ruff>=0.4"

Without quotes, bash treats >= as an output redirect, so ruff never installs and the lint job fails immediately.

Bug 2 — import asyncio inside function body in mcp_server.py

# Before (broken)
def serve() -> None:
    ...
    import asyncio   # ← ruff I001/E402 violation
    asyncio.run(_run())

# After (fixed)
import asyncio
import json
import logging

Ruff's isort (I) rules require all stdlib imports at the top of the file.

Changes

  • .github/workflows/ci.yml — 1 line: quote the pip install argument
  • catchme/mcp_server.py — 1 line: move import asyncio to module-level

…odule level

- .github/workflows/ci.yml: quote `ruff>=0.4` so shell doesn't treat >= as redirect
- catchme/mcp_server.py: move `import asyncio` to module-level (ruff I001/E402)
Add blank line between third-party mcp imports and relative import,
and sort the relative import alphabetically (_load_all_trees, _node_index, retrieve).
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.

1 participant