Skip to content

Commit 73fcda7

Browse files
committed
chore: add missing type hint for HybridChunker.chunk
Signed-off-by: Eugene <[email protected]>
1 parent f464be5 commit 73fcda7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docling_core/transforms/chunker/hybrid_chunker.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""Hybrid chunker implementation leveraging both doc structure & token awareness."""
77

88
import warnings
9-
from typing import Iterable, Iterator, Optional, Union
9+
from typing import Any, Iterable, Iterator, Optional, Union
1010

1111
from pydantic import BaseModel, ConfigDict, PositiveInt, TypeAdapter, model_validator
1212
from typing_extensions import Self
@@ -258,7 +258,7 @@ def _merge_chunks_with_matching_metadata(self, chunks: list[DocChunk]):
258258

259259
return output_chunks
260260

261-
def chunk(self, dl_doc: DoclingDocument, **kwargs) -> Iterator[BaseChunk]:
261+
def chunk(self, dl_doc: DoclingDocument, **kwargs: Any) -> Iterator[BaseChunk]:
262262
r"""Chunk the provided document.
263263
264264
Args:

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ module = [
127127
"jsonref.*",
128128
"jsonschema.*",
129129
"requests.*",
130+
"semchunk.*",
130131
"tabulate.*",
131132
"transformers.*",
132133
"yaml.*",

0 commit comments

Comments
 (0)