fix: DOCXToDocument converter - use forward reference to Paragraph (#8260)

* docx paragraph forward ref

* fix
This commit is contained in:
Stefano Fiorucci 2024-08-21 12:37:43 +02:00 committed by GitHub
parent 471f07c8fe
commit aca8f09f7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -137,7 +137,7 @@ class DOCXToDocument:
return {"documents": documents}
def _extract_paragraphs_with_page_breaks(self, paragraphs: List[Paragraph]) -> List[str]:
def _extract_paragraphs_with_page_breaks(self, paragraphs: List["Paragraph"]) -> List[str]:
"""
Extracts paragraphs from a DOCX file, including page breaks.

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Use a forward reference for the `Paragraph` class in the `DOCXToDocument` converter
to prevent import errors.