Remove None guard and test — type system guarantees document is not None

This commit is contained in:
Chris McDonough 2026-06-22 14:04:58 -04:00
parent 256fd66b46
commit 25b0a155b0
2 changed files with 0 additions and 10 deletions

View file

@ -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)

View file

@ -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."""