Skip to content

Commit de7562b

Browse files
fix(mcp): remove dead _bounded helper that referenced a deleted constant
607a86f dropped the name-length cap (_MAX_NAME_LENGTH) and its call site in _collect, in favor of returning names in full and rejecting oversized pages instead of truncating them — but left the now-unused _bounded function behind, still referencing the deleted constant. Nothing called it anymore, so it just sat there broken (flake8 F821). Co-authored-by: amir haim <215461772+amirbiron@users.noreply.github.com>
1 parent 87e3e3e commit de7562b

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

‎mcp_server/outline.py‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
_PYTHON_SUFFIXES = frozenset({".py", ".pyi"})
2727

2828

29-
3029
def extract_outline(text: str, path: str, symbol: str | None = None) -> dict[str, Any]:
3130
"""מפת הסימבולים של ``text``, או ``no_outline`` עם הסיבה.
3231
@@ -74,17 +73,6 @@ def extract_outline(text: str, path: str, symbol: str | None = None) -> dict[str
7473
return {"status": "ok", "symbols": rows, "total": len(rows)}
7574

7675

77-
def _bounded(name: str) -> str:
78-
"""שם חסום באורך, כדי שגודל הרשומה יהיה חסום.
79-
80-
בלי חסם, שום ערך של ``per_page`` אינו בטוח-בהוכחה מול תקציב הפלט —
81-
ואז נדרש חיתוך בזמן ריצה, שיחד עם עימוד אריתמטי מאבד סימבולים.
82-
"""
83-
if len(name) <= _MAX_NAME_LENGTH:
84-
return name
85-
return name[: _MAX_NAME_LENGTH - 1] + "\u2026"
86-
87-
8876
def _start_line(
8977
node: ast.FunctionDef | ast.AsyncFunctionDef | ast.ClassDef, lines: list[str]
9078
) -> int:

0 commit comments

Comments
 (0)