From 70ee7c6b8115afc47910a5fbd4bca651c49a3ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=9C=D0=B0=D1=80?= =?UTF-8?q?=D0=B8=D0=BD=D0=BA=D0=B5=D0=B2=D0=B8=D1=87?= Date: Fri, 5 Jun 2026 16:26:41 +0700 Subject: [PATCH] remove optional --- mm_search_mcp.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/mm_search_mcp.py b/mm_search_mcp.py index be29419..f1ba1ea 100644 --- a/mm_search_mcp.py +++ b/mm_search_mcp.py @@ -53,15 +53,15 @@ def _collect_matches( *, query: str, root: str, - user: Optional[str], - channel: Optional[str], - team: Optional[str], - after: Optional[dt.datetime], - before: Optional[dt.datetime], + user: str, + channel: str, + team: str, + after: dt.datetime, + before: dt.datetime, regex: bool, search_mode: SearchMode, - ignore_case: Optional[bool], - limit: Optional[int], + ignore_case: bool, + limit: int, db: str, no_index: bool, ) -> list[dict[str, Any]]: @@ -158,17 +158,17 @@ def _format_human(matches: list[dict[str, Any]], show_file: bool) -> str: @mcp.tool def mm_search( query: str, - root: Optional[str] = None, - user: Optional[str] = None, - channel: Optional[str] = None, - team: Optional[str] = None, - after: Optional[str] = None, - before: Optional[str] = None, + root: str = None, + user: str = None, + channel: str = None, + team: str = None, + after: str = None, + before: str = None, regex: bool = False, search_mode: SearchMode = "message", - ignore_case: Optional[bool] = None, - limit: Optional[int] = None, - db: Optional[str] = None, + ignore_case: bool = None, + limit: int = None, + db: str = None, no_index: bool = False, output: Literal["json", "human"] = "json", show_file: bool = False, @@ -235,8 +235,8 @@ def mm_search( @mcp.tool def mm_search_index_status( - db: Optional[str] = None, - root: Optional[str] = None, + db: str = None, + root: str = None, ) -> dict[str, Any]: """Report whether the sqlite index and export root are available.""" resolved_db = db or _env_db()