mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-30 14:04:27 +00:00
minor typing fix
Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>
This commit is contained in:
parent
23d1a080ce
commit
e1cb823cab
@ -40,7 +40,7 @@
|
||||
"from dataclasses import dataclass\n",
|
||||
"from pathlib import Path\n",
|
||||
"from tempfile import mkdtemp\n",
|
||||
"from typing import Any, Iterator, Optional\n",
|
||||
"from typing import Any, Iterator, Optional, Union\n",
|
||||
"\n",
|
||||
"import lancedb\n",
|
||||
"import semchunk\n",
|
||||
@ -94,7 +94,7 @@
|
||||
" tokenizer: Any\n",
|
||||
" max_tokens: PositiveInt\n",
|
||||
"\n",
|
||||
" def _count_tokens(self, text: Optional[list[str]]):\n",
|
||||
" def _count_tokens(self, text: Optional[Union[str, list[str]]]):\n",
|
||||
" if text is None:\n",
|
||||
" return 0\n",
|
||||
" elif isinstance(text, list):\n",
|
||||
|
Loading…
Reference in New Issue
Block a user