massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2and3 / mimetypes.pyi
1 # Stubs for mimetypes\r
2 \r
3 from typing import Dict, IO, List, Optional, Sequence, Text, Tuple\r
4 import sys\r
5 \r
6 def guess_type(url: Text,\r
7                strict: bool = ...) -> Tuple[Optional[str], Optional[str]]: ...\r
8 def guess_all_extensions(type: str, strict: bool = ...) -> List[str]: ...\r
9 def guess_extension(type: str, strict: bool = ...) -> Optional[str]: ...\r
10 \r
11 def init(files: Optional[Sequence[str]] = ...) -> None: ...\r
12 def read_mime_types(filename: str) -> Optional[Dict[str, str]]: ...\r
13 def add_type(type: str, ext: str, strict: bool = ...) -> None: ...\r
14 \r
15 inited = ...  # type: bool\r
16 knownfiles = ...  # type: List[str]\r
17 suffix_map = ...  # type: Dict[str, str]\r
18 encodings_map = ...  # type: Dict[str, str]\r
19 types_map = ...  # type: Dict[str, str]\r
20 common_types = ...  # type: Dict[str, str]\r
21 \r
22 class MimeTypes:\r
23     suffix_map = ...  # type: Dict[str, str]\r
24     encodings_map = ...  # type: Dict[str, str]\r
25     types_map = ...  # type: Tuple[Dict[str, str], Dict[str, str]]\r
26     types_map_inv = ...  # type: Tuple[Dict[str, str], Dict[str, str]]\r
27     def __init__(self, filenames: Tuple[str, ...] = ...,\r
28                  strict: bool = ...) -> None: ...\r
29     def guess_extension(self, type: str,\r
30                         strict: bool = ...) -> Optional[str]: ...\r
31     def guess_type(self, url: str,\r
32                    strict: bool = ...) -> Tuple[Optional[str], Optional[str]]: ...\r
33     def guess_all_extensions(self, type: str,\r
34                              strict: bool = ...) -> List[str]: ...\r
35     def read(self, filename: str, strict: bool = ...) -> None: ...\r
36     def readfp(self, fp: IO[str], strict: bool = ...) -> None: ...\r
37     if sys.platform == 'win32':\r
38         def read_windows_registry(self, strict: bool = ...) -> None: ...\r