mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-08-04 14:57:01 +00:00

Reviewers: I recommend reviewing commit-by-commit or just looking at the final version of `partition/docx.py` as View File. This refactor solves a few problems but mostly lays the groundwork to allow us to refine further aspects such as page-break detection, list-item detection, and moving python-docx internals upstream to that library so our work doesn't depend on that domain-knowledge.
20 lines
591 B
Python
20 lines
591 B
Python
# pyright: reportPrivateUsage = false
|
|
|
|
from typing import Optional, Sequence
|
|
|
|
from docx.blkcntnr import BlockItemContainer
|
|
from docx.oxml.text.paragraph import CT_P
|
|
from docx.oxml.xmlchemy import BaseOxmlElement
|
|
from docx.styles.style import _ParagraphStyle
|
|
from docx.text.run import Run
|
|
|
|
class Paragraph(BlockItemContainer):
|
|
_p: CT_P
|
|
def __init__(self, p: BaseOxmlElement, parent: BlockItemContainer) -> None: ...
|
|
@property
|
|
def runs(self) -> Sequence[Run]: ...
|
|
@property
|
|
def style(self) -> Optional[_ParagraphStyle]: ...
|
|
@property
|
|
def text(self) -> str: ...
|