Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ast_rag/mcp/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
from pathlib import Path
from typing import Optional

from mcp.server.fastmcp import FastMCP
try:
# mcp >= 2.0 renamed FastMCP to MCPServer and moved it to mcp.server
from mcp.server import MCPServer as FastMCP
except ImportError: # pragma: no cover - mcp < 2.0
from mcp.server.fastmcp import FastMCP

from ast_rag.models import ProjectConfig, StandardResult
from ast_rag.repositories import create_driver, apply_schema
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ ast_rag = ["../schema/*.cql"]
target-version = "py310"
line-length = 100

[tool.ruff.lint]
# Pin the rule set explicitly. Without this ruff applies whatever its current
# default happens to be, so a new ruff release changes what CI enforces with no
# code change -- which is what took CI red on 2026-07-27 (321 of the 496 new
# findings were UP045 alone). These four are the rules the tree is clean under.
select = ["E4", "E7", "E9", "F"]

[tool.mypy]
python_version = "3.10"
strict = false
Expand Down
5 changes: 4 additions & 1 deletion tests/test_unsupported_language.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ def test_supported_extensions_covers_all_mapped(self) -> None:
def test_supported_extensions_grouped_by_language(self) -> None:
mapping = supported_extensions()
assert mapping["java"] == [".java"]
assert mapping["typescript"] == [".ts", ".tsx"]
# cd75313 moved .tsx onto a dedicated TSX grammar and added .jsx to it,
# so .tsx is no longer grouped under "typescript".
assert mapping["typescript"] == [".ts"]
assert mapping["tsx"] == [".jsx", ".tsx"]
assert ".cpp" in mapping["cpp"]
assert ".h" in mapping["cpp"]

Expand Down
Loading