From 8911e0712a6672bea0aa4d28e48d5b442b44bd79 Mon Sep 17 00:00:00 2001 From: stumpylog <797416+stumpylog@users.noreply.github.com> Date: Fri, 11 Sep 2026 12:09:01 -0700 Subject: [PATCH] Don't cover these, they exist for defensive, but there's no other current diagnostic --- src/documents/search/_query.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/documents/search/_query.py b/src/documents/search/_query.py index b38a1121e..2d0cdfa26 100644 --- a/src/documents/search/_query.py +++ b/src/documents/search/_query.py @@ -54,8 +54,12 @@ def _user_facing_emit_message(d: Diagnostic) -> str: return f"The wildcard pattern for field {field!r} is too complex." if d.kind is DiagnosticKind.SCHEMA_FIELD_MISSING: return f"Field {field!r} is not available in the search index." - logger.warning("Unmapped emit diagnostic %s: %s", d.kind, d.message) - return "The search query could not be executed." + logger.warning( + "Unmapped emit diagnostic %s: %s", + d.kind, + d.message, + ) # pragma: no cover + return "The search query could not be executed." # pragma: no cover def _map_emit_error(e: QueryError) -> SearchQueryError: