From 25b0a155b0f563d46e5d85b30f1abb3e21eaed3a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 22 Jun 2026 14:04:58 -0400 Subject: [PATCH] =?UTF-8?q?Remove=20None=20guard=20and=20test=20=E2=80=94?= =?UTF-8?q?=20type=20system=20guarantees=20document=20is=20not=20None?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- haiku_rag_slim/haiku/rag/chunkers/docling_local.py | 3 --- tests/test_chunker.py | 7 ------- 2 files changed, 10 deletions(-) diff --git a/haiku_rag_slim/haiku/rag/chunkers/docling_local.py b/haiku_rag_slim/haiku/rag/chunkers/docling_local.py index 42bfaffe..9ab36b88 100644 --- a/haiku_rag_slim/haiku/rag/chunkers/docling_local.py +++ b/haiku_rag_slim/haiku/rag/chunkers/docling_local.py @@ -177,7 +177,4 @@ class DoclingLocalChunker(DocumentChunker): Returns: List of Chunk containing content and structured metadata. """ - if document is None: - return [] - return await asyncio.to_thread(self._chunk_sync, document) diff --git a/tests/test_chunker.py b/tests/test_chunker.py index 39003d0a..e59681a0 100644 --- a/tests/test_chunker.py +++ b/tests/test_chunker.py @@ -55,13 +55,6 @@ async def test_local_chunker(qa_corpus: list[dict[str, str]]): assert abs(total_tokens - original_tokens) <= original_tokens * 0.1 -@pytest.mark.asyncio -async def test_local_chunker_none_document(): - """Test DoclingLocalChunker returns empty list for None document.""" - chunker = DoclingLocalChunker() - assert await chunker.chunk(None) == [] - - @pytest.mark.asyncio async def test_local_chunker_custom_config(): """Test DoclingLocalChunker with custom configuration."""