massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / third_party / 2and3 / click / utils.pyi
1 from typing import Any, Callable, Iterator, IO, List, Optional, TypeVar, Union, Text\r
2 \r
3 _T = TypeVar('_T')\r
4 _Decorator = Callable[[_T], _T]\r
5 \r
6 \r
7 def _posixify(name: str) -> str:\r
8     ...\r
9 \r
10 \r
11 def safecall(func: _T) -> _T:\r
12     ...\r
13 \r
14 \r
15 def make_str(value: Any) -> str:\r
16     ...\r
17 \r
18 \r
19 def make_default_short_help(help: str, max_length: int = ...):\r
20     ...\r
21 \r
22 \r
23 class LazyFile:\r
24     name: str\r
25     mode: str\r
26     encoding: Optional[str]\r
27     errors: str\r
28     atomic: bool\r
29 \r
30     def __init__(\r
31         self,\r
32         filename: str,\r
33         mode: str = ...,\r
34         encoding: Optional[str] = ...,\r
35         errors: str = ...,\r
36         atomic: bool = ...\r
37     ) -> None:\r
38         ...\r
39 \r
40     def open(self) -> IO:\r
41         ...\r
42 \r
43     def close(self) -> None:\r
44         ...\r
45 \r
46     def close_intelligently(self) -> None:\r
47         ...\r
48 \r
49     def __enter__(self) -> 'LazyFile':\r
50         ...\r
51 \r
52     def __exit__(self, exc_type, exc_value, tb):\r
53         ...\r
54 \r
55     def __iter__(self) -> Iterator:\r
56         ...\r
57 \r
58 \r
59 class KeepOpenFile:\r
60     _file: IO\r
61 \r
62     def __init__(self, file: IO) -> None:\r
63         ...\r
64 \r
65     def __enter__(self) -> 'KeepOpenFile':\r
66         ...\r
67 \r
68     def __exit__(self, exc_type, exc_value, tb):\r
69         ...\r
70 \r
71     def __iter__(self) -> Iterator:\r
72         ...\r
73 \r
74 \r
75 def echo(\r
76     message: Optional[Union[bytes, Text]] = ...,\r
77     file: Optional[IO] = ...,\r
78     nl: bool = ...,\r
79     err: bool = ...,\r
80     color: Optional[bool] = ...,\r
81 ) -> None:\r
82     ...\r
83 \r
84 \r
85 def get_binary_stream(name: str) -> IO[bytes]:\r
86     ...\r
87 \r
88 \r
89 def get_text_stream(\r
90     name: str, encoding: Optional[str] = ..., errors: str = ...\r
91 ) -> IO[str]:\r
92     ...\r
93 \r
94 \r
95 def open_file(\r
96     filename: str,\r
97     mode: str = ...,\r
98     encoding: Optional[str] = ...,\r
99     errors: str = ...,\r
100     lazy: bool = ...,\r
101     atomic: bool = ...\r
102 ) -> Union[IO, LazyFile, KeepOpenFile]:\r
103     ...\r
104 \r
105 \r
106 def get_os_args() -> List[str]:\r
107     ...\r
108 \r
109 \r
110 def format_filename(filename: str, shorten: bool = ...) -> str:\r
111     ...\r
112 \r
113 \r
114 def get_app_dir(\r
115     app_name: str, roaming: bool = ..., force_posix: bool = ...\r
116 ) -> str:\r
117     ...\r