Skip to content

Commit

Permalink
chore: add missing type hint for HybridChunker.chunk
Browse files Browse the repository at this point in the history
Signed-off-by: Eugene <[email protected]>
  • Loading branch information
Fogapod committed Dec 18, 2024
1 parent f464be5 commit 73fcda7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docling_core/transforms/chunker/hybrid_chunker.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""Hybrid chunker implementation leveraging both doc structure & token awareness."""

import warnings
from typing import Iterable, Iterator, Optional, Union
from typing import Any, Iterable, Iterator, Optional, Union

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

return output_chunks

def chunk(self, dl_doc: DoclingDocument, **kwargs) -> Iterator[BaseChunk]:
def chunk(self, dl_doc: DoclingDocument, **kwargs: Any) -> Iterator[BaseChunk]:
r"""Chunk the provided document.
Args:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ module = [
"jsonref.*",
"jsonschema.*",
"requests.*",
"semchunk.*",
"tabulate.*",
"transformers.*",
"yaml.*",
Expand Down

0 comments on commit 73fcda7

Please sign in to comment.