unstructured/typings/docx/document.pyi
Roman Isecke b265d8874b
refactoring linting (#1739)
### Description
Currently linting only takes place over the base unstructured directory
but we support python files throughout the repo. It makes sense for all
those files to also abide by the same linting rules so the entire repo
was set to be inspected when the linters are run. Along with that
autoflake was added as a linter which has a lot of added benefits such
as removing unused imports for you that would currently break flake and
require manual intervention.

The only real relevant changes in this PR are in the `Makefile`,
`setup.cfg`, and `requirements/test.in`. The rest is the result of
running the linters.
2023-10-17 12:45:12 +00:00

23 lines
669 B
Python

from typing import IO
from docx.blkcntnr import BlockItemContainer
from docx.oxml.document import CT_Document
from docx.section import Sections
from docx.settings import Settings
from docx.styles.style import ParagraphStyle
from docx.text.paragraph import Paragraph
class Document(BlockItemContainer):
def add_paragraph(
self,
text: str = "",
style: ParagraphStyle | str | None = None,
) -> Paragraph: ...
@property
def element(self) -> CT_Document: ...
def save(self, path_or_stream: str | IO[bytes]) -> None: ...
@property
def sections(self) -> Sections: ...
@property
def settings(self) -> Settings: ...