test(integration): address round-4 review — type hints & small robustness
- Type the new helper signatures (CLAUDE.md A5): `mcp_client: Any` in document_is_searchable and `nc_mcp_client: Any` in _top_score. - _top_score: guard the results list directly (`if not results`) instead of via total_found, so max() can't hit an empty sequence. - _get_with_retry: replace `raise last_exc # type: ignore` with an explicit `assert last_exc is not None` then raise — clearer intent, no suppressor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
367afa0402
commit
7c13c6e49a
@@ -6,12 +6,13 @@ the single-user sampling tests can import it.
|
||||
|
||||
import json
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def document_is_searchable(
|
||||
mcp_client, search_term: str, note_id: int | None = None
|
||||
mcp_client: Any, search_term: str, note_id: int | None = None
|
||||
) -> bool:
|
||||
"""Return True once a freshly-created document is retrievable.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user