Skip to content

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

Closed
salem221094 wants to merge 4 commits into
HKUDS:mainfrom
salem221094:fix/ci-lint-errors-v2
Closed

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

Conversation

@salem221094

Copy link
Copy Markdown
Contributor

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) — import buried at bottom of serve() body
def serve() -> None:
    ...
    import asyncio          # ← ruff I001 / E402 violation
    asyncio.run(_run())

# After (fixed) — import at module level
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 — quote the pip install argument
  • catchme/mcp_server.py — move import asyncio to module-level imports

Closes #7

- .github/workflows/ci.yml: pip install "ruff>=0.4" (was unquoted, shell treated >= as redirect)
- catchme/mcp_server.py: move `import asyncio` to top-level (ruff I/E402 violation)
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