1 from typing import Callable, Pattern
8 replace_whitespace: bool
9 fix_sentence_endings: bool
11 break_long_words: bool
12 break_on_hyphens: bool
17 # Attributes not present in documentation
18 sentence_end_re: Pattern[str]
19 wordsep_re: Pattern[str]
20 wordsep_simple_re: Pattern[str]
22 unicode_whitespace_trans: dict[int, int]
24 x: str # leaked loop variable
28 initial_indent: str = ...,
29 subsequent_indent: str = ...,
30 expand_tabs: bool = ...,
31 replace_whitespace: bool = ...,
32 fix_sentence_endings: bool = ...,
33 break_long_words: bool = ...,
34 drop_whitespace: bool = ...,
35 break_on_hyphens: bool = ...,
38 max_lines: int | None = ...,
39 placeholder: str = ...,
41 # Private methods *are* part of the documented API for subclasses.
42 def _munge_whitespace(self, text: str) -> str: ...
43 def _split(self, text: str) -> list[str]: ...
44 def _fix_sentence_endings(self, chunks: list[str]) -> None: ...
45 def _handle_long_word(self, reversed_chunks: list[str], cur_line: list[str], cur_len: int, width: int) -> None: ...
46 def _wrap_chunks(self, chunks: list[str]) -> list[str]: ...
47 def _split_chunks(self, text: str) -> list[str]: ...
48 def wrap(self, text: str) -> list[str]: ...
49 def fill(self, text: str) -> str: ...
55 initial_indent: str = ...,
56 subsequent_indent: str = ...,
57 expand_tabs: bool = ...,
59 replace_whitespace: bool = ...,
60 fix_sentence_endings: bool = ...,
61 break_long_words: bool = ...,
62 break_on_hyphens: bool = ...,
63 drop_whitespace: bool = ...,
65 placeholder: str = ...,
71 initial_indent: str = ...,
72 subsequent_indent: str = ...,
73 expand_tabs: bool = ...,
75 replace_whitespace: bool = ...,
76 fix_sentence_endings: bool = ...,
77 break_long_words: bool = ...,
78 break_on_hyphens: bool = ...,
79 drop_whitespace: bool = ...,
81 placeholder: str = ...,
87 initial_indent: str = ...,
88 subsequent_indent: str = ...,
89 expand_tabs: bool = ...,
91 replace_whitespace: bool = ...,
92 fix_sentence_endings: bool = ...,
93 break_long_words: bool = ...,
94 break_on_hyphens: bool = ...,
95 drop_whitespace: bool = ...,
96 # Omit `max_lines: int = None`, it is forced to 1 here.
97 placeholder: str = ...,
99 def dedent(text: str) -> str: ...
100 def indent(text: str, prefix: str, predicate: Callable[[str], bool] | None = ...) -> str: ...