mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-07-28 03:20:57 +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.
22 lines
518 B
Python
22 lines
518 B
Python
from typing import Sequence
|
|
|
|
from docx.blkcntnr import BlockItemContainer
|
|
from docx.oxml.table import CT_Tbl
|
|
from docx.shared import Parented
|
|
from docx.text.paragraph import Paragraph
|
|
|
|
class _Cell:
|
|
@property
|
|
def paragraphs(self) -> Sequence[Paragraph]: ...
|
|
|
|
class _Row:
|
|
@property
|
|
def cells(self) -> Sequence[_Cell]: ...
|
|
|
|
class _Rows(Sequence[_Row]): ...
|
|
|
|
class Table(Parented):
|
|
def __init__(self, tbl: CT_Tbl, parent: BlockItemContainer) -> None: ...
|
|
@property
|
|
def rows(self) -> _Rows: ...
|