massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 3 / textwrap.pyi
1 from typing import Callable, List, Optional, Dict, Pattern\r
2 \r
3 class TextWrapper:\r
4     width: int = ...\r
5     initial_indent: str = ...\r
6     subsequent_indent: str = ...\r
7     expand_tabs: bool = ...\r
8     replace_whitespace: bool = ...\r
9     fix_sentence_endings: bool = ...\r
10     drop_whitespace: bool = ...\r
11     break_long_words: bool = ...\r
12     break_on_hyphens: bool = ...\r
13     tabsize: int = ...\r
14     max_lines: Optional[int] = ...\r
15     placeholder: str = ...\r
16 \r
17     # Attributes not present in documentation\r
18     sentence_end_re: Pattern[str] = ...\r
19     wordsep_re: Pattern[str] = ...\r
20     wordsep_simple_re: Pattern[str] = ...\r
21     whitespace_trans: str = ...\r
22     unicode_whitespace_trans: Dict[int, int] = ...\r
23     uspace: int = ...\r
24     x: int = ...\r
25 \r
26     def __init__(\r
27             self,\r
28             width: int = ...,\r
29             initial_indent: str = ...,\r
30             subsequent_indent: str = ...,\r
31             expand_tabs: bool = ...,\r
32             replace_whitespace: bool = ...,\r
33             fix_sentence_endings: bool = ...,\r
34             break_long_words: bool = ...,\r
35             drop_whitespace: bool = ...,\r
36             break_on_hyphens: bool = ...,\r
37             tabsize: int = ...,\r
38             *,\r
39             max_lines: Optional[int] = ...,\r
40             placeholder: str = ...) -> None:\r
41         ...\r
42 \r
43     # Private methods *are* part of the documented API for subclasses.\r
44     def _munge_whitespace(self, text: str) -> str: ...\r
45     def _split(self, text: str) -> List[str]: ...\r
46     def _fix_sentence_endings(self, chunks: List[str]) -> None: ...\r
47     def _handle_long_word(self, reversed_chunks: List[str], cur_line: List[str], cur_len: int, width: int) -> None: ...\r
48     def _wrap_chunks(self, chunks: List[str]) -> List[str]: ...\r
49     def _split_chunks(self, text: str) -> List[str]: ...\r
50 \r
51     def wrap(self, text: str) -> List[str]: ...\r
52     def fill(self, text: str) -> str: ...\r
53 \r
54 \r
55 def wrap(\r
56         text: str = ...,\r
57         width: int = ...,\r
58         *,\r
59         initial_indent: str = ...,\r
60         subsequent_indent: str = ...,\r
61         expand_tabs: bool = ...,\r
62         tabsize: int = ...,\r
63         replace_whitespace: bool = ...,\r
64         fix_sentence_endings: bool = ...,\r
65         break_long_words: bool = ...,\r
66         break_on_hyphens: bool = ...,\r
67         drop_whitespace: bool = ...,\r
68         max_lines: int = ...,\r
69         placeholder: str = ...\r
70 ) -> List[str]:\r
71     ...\r
72 \r
73 def fill(\r
74         text: str,\r
75         width: int = ...,\r
76         *,\r
77         initial_indent: str = ...,\r
78         subsequent_indent: str = ...,\r
79         expand_tabs: bool = ...,\r
80         tabsize: int = ...,\r
81         replace_whitespace: bool = ...,\r
82         fix_sentence_endings: bool = ...,\r
83         break_long_words: bool = ...,\r
84         break_on_hyphens: bool = ...,\r
85         drop_whitespace: bool = ...,\r
86         max_lines: int = ...,\r
87         placeholder: str = ...\r
88 ) -> str:\r
89     ...\r
90 \r
91 def shorten(\r
92         text: str,\r
93         width: int,\r
94         *,\r
95         initial_indent: str = ...,\r
96         subsequent_indent: str = ...,\r
97         expand_tabs: bool = ...,\r
98         tabsize: int = ...,\r
99         replace_whitespace: bool = ...,\r
100         fix_sentence_endings: bool = ...,\r
101         break_long_words: bool = ...,\r
102         break_on_hyphens: bool = ...,\r
103         drop_whitespace: bool = ...,\r
104         # Omit `max_lines: int = None`, it is forced to 1 here.\r
105         placeholder: str = ...\r
106 ) -> str:\r
107     ...\r
108 \r
109 def dedent(text: str) -> str:\r
110     ...\r
111 \r
112 def indent(text: str, prefix: str, predicate: Callable[[str], bool] = ...) -> str:\r
113     ...\r