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