Skip to content

Commit 98bb70e

Browse files
committed
chore: remove unused param
1 parent 85edc99 commit 98bb70e

2 files changed

Lines changed: 6 additions & 11 deletions

File tree

src/deepset_mcp/tools/tokonomics/decorators.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ def _add_str_to_type(annotation: Any) -> Any:
4949
return annotation | str
5050

5151

52-
def _enhance_docstring_for_references(original: str, param_info: dict[str, dict[str, Any]], func_name: str) -> str:
52+
def _enhance_docstring_for_references(original: str, func_name: str) -> str:
5353
"""Create complete docstring for LLM tool with reference support.
5454
5555
:param original: Original docstring.
56-
:param param_info: Parameter modification info (unused but kept for compatibility).
5756
:param func_name: Function name for examples.
5857
:return: Complete docstring for LLM tool.
5958
"""
@@ -270,7 +269,7 @@ async def async_wrapper(*args: Any, **kwargs: Any) -> Any:
270269

271270
# Update signature and docstring
272271
async_wrapper.__signature__ = new_sig # type: ignore[attr-defined]
273-
async_wrapper.__doc__ = _enhance_docstring_for_references(func.__doc__ or "", param_info, func.__name__)
272+
async_wrapper.__doc__ = _enhance_docstring_for_references(func.__doc__ or "", func.__name__)
274273
return async_wrapper # type: ignore[return-value]
275274
else:
276275

@@ -313,7 +312,7 @@ def sync_wrapper(*args: Any, **kwargs: Any) -> Any:
313312

314313
# Update signature and docstring
315314
sync_wrapper.__signature__ = new_sig # type: ignore[attr-defined]
316-
sync_wrapper.__doc__ = _enhance_docstring_for_references(func.__doc__ or "", param_info, func.__name__)
315+
sync_wrapper.__doc__ = _enhance_docstring_for_references(func.__doc__ or "", func.__name__)
317316
return sync_wrapper # type: ignore[return-value]
318317

319318
return decorator

test/unit/tools/tokonomics/test_decorators.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,8 @@ def test_add_str_to_type_other_type(self) -> None:
9090
def test_enhance_docstring_for_references(self) -> None:
9191
"""Test docstring enhancement for referenceable functions."""
9292
original = "Original docstring."
93-
param_info = {
94-
"data": {"original": "dict", "modified": "dict | str", "accepts_str": False},
95-
"text": {"original": "str", "modified": "str", "accepts_str": True},
96-
}
9793

98-
result = _enhance_docstring_for_references(original, param_info, "test_func")
94+
result = _enhance_docstring_for_references(original, "test_func")
9995

10096
assert "Original docstring." in result
10197
assert "All parameters accept object references" in result
@@ -106,7 +102,7 @@ def test_enhance_docstring_for_references(self) -> None:
106102

107103
def test_enhance_docstring_for_references_empty_original(self) -> None:
108104
"""Test docstring enhancement with empty original docstring."""
109-
result = _enhance_docstring_for_references("", {}, "test_func")
105+
result = _enhance_docstring_for_references("", "test_func")
110106

111107
assert "test_func function." in result
112108
assert "All parameters accept object references" in result
@@ -148,7 +144,7 @@ def test_enhance_docstring_for_references_preserves_original(self) -> None:
148144
:raises RuntimeError: If processing fails
149145
"""
150146

151-
result = _enhance_docstring_for_references(original, {}, "test_func")
147+
result = _enhance_docstring_for_references(original, "test_func")
152148

153149
# Check that all original content is preserved exactly
154150
assert "Process data and return results." in result

0 commit comments

Comments
 (0)