From 0d261e52ed747d98817f6a6b94fa9663f9d87cd2 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Mon, 14 Apr 2025 15:49:58 +0200 Subject: [PATCH] add removed imports Signed-off-by: Michele Dolfi --- docling/datamodel/base_models.py | 4 +++- docling/datamodel/document.py | 26 +++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/docling/datamodel/base_models.py b/docling/datamodel/base_models.py index db013f50..5fd04949 100644 --- a/docling/datamodel/base_models.py +++ b/docling/datamodel/base_models.py @@ -10,7 +10,9 @@ from docling_core.types.doc import ( TableCell, ) from docling_core.types.doc.page import SegmentedPdfPage, TextCell -from docling_core.types.io import ( + +# DO NOT REMOVE; explicitly exposed from this location +from docling_core.types.io import ( # noqa: F401 DocumentStream, ) from PIL.Image import Image diff --git a/docling/datamodel/document.py b/docling/datamodel/document.py index 14ddd2fd..37c264f0 100644 --- a/docling/datamodel/document.py +++ b/docling/datamodel/document.py @@ -17,10 +17,34 @@ from typing import ( ) import filetype -from docling_core.types.doc import ( + +# DO NOT REMOVE; explicitly exposed from this location +from docling_core.types.doc import ( # noqa: F401 + DocItem, DocItemLabel, DoclingDocument, + PictureItem, + SectionHeaderItem, + TableItem, + TextItem, ) +from docling_core.types.doc.document import ListItem # noqa: F401 +from docling_core.types.legacy_doc.base import ( # noqa: F401 + BaseText, + Figure, + GlmTableCell, + PageDimensions, + PageReference, + Prov, + Ref, +) +from docling_core.types.legacy_doc.base import Table as DsSchemaTable # noqa: F401 +from docling_core.types.legacy_doc.base import TableCell # noqa: F401 +from docling_core.types.legacy_doc.document import ( # noqa: F401 + CCSDocumentDescription as DsDocumentDescription, +) +from docling_core.types.legacy_doc.document import CCSFileInfoObject as DsFileInfoObject # noqa: F401 +from docling_core.types.legacy_doc.document import ExportedCCSDocument as DsDocument # noqa: F401 from docling_core.utils.file import resolve_source_to_stream from docling_core.utils.legacy import docling_document_to_legacy from pydantic import BaseModel