1import sys
2from typing import IO, Dict, List, Optional, Sequence, Text, Tuple
3
4def guess_type(url: Text, strict: bool = ...) -> Tuple[Optional[str], Optional[str]]: ...
5def guess_all_extensions(type: str, strict: bool = ...) -> List[str]: ...
6def guess_extension(type: str, strict: bool = ...) -> Optional[str]: ...
7def init(files: Optional[Sequence[str]] = ...) -> None: ...
8def read_mime_types(file: str) -> Optional[Dict[str, str]]: ...
9def add_type(type: str, ext: str, strict: bool = ...) -> None: ...
10
11inited: bool
12knownfiles: List[str]
13suffix_map: Dict[str, str]
14encodings_map: Dict[str, str]
15types_map: Dict[str, str]
16common_types: Dict[str, str]
17
18class MimeTypes:
19    suffix_map: Dict[str, str]
20    encodings_map: Dict[str, str]
21    types_map: Tuple[Dict[str, str], Dict[str, str]]
22    types_map_inv: Tuple[Dict[str, str], Dict[str, str]]
23    def __init__(self, filenames: Tuple[str, ...] = ..., strict: bool = ...) -> None: ...
24    def guess_extension(self, type: str, strict: bool = ...) -> Optional[str]: ...
25    def guess_type(self, url: str, strict: bool = ...) -> Tuple[Optional[str], Optional[str]]: ...
26    def guess_all_extensions(self, type: str, strict: bool = ...) -> List[str]: ...
27    def read(self, filename: str, strict: bool = ...) -> None: ...
28    def readfp(self, fp: IO[str], strict: bool = ...) -> None: ...
29    if sys.platform == "win32":
30        def read_windows_registry(self, strict: bool = ...) -> None: ...
31