1 # Stubs for mimetypes
\r
3 from typing import Dict, IO, List, Optional, Sequence, Text, Tuple
\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
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
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
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