2 from _typeshed import StrPath
3 from typing import IO, Sequence, Tuple
5 if sys.version_info >= (3, 8):
6 def guess_type(url: StrPath, strict: bool = ...) -> tuple[str | None, str | None]: ...
9 def guess_type(url: str, strict: bool = ...) -> tuple[str | None, str | None]: ...
11 def guess_all_extensions(type: str, strict: bool = ...) -> list[str]: ...
12 def guess_extension(type: str, strict: bool = ...) -> str | None: ...
13 def init(files: Sequence[str] | None = ...) -> None: ...
14 def read_mime_types(file: str) -> dict[str, str] | None: ...
15 def add_type(type: str, ext: str, strict: bool = ...) -> None: ...
19 suffix_map: dict[str, str]
20 encodings_map: dict[str, str]
21 types_map: dict[str, str]
22 common_types: dict[str, str]
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 = ...) -> str | None: ...
31 def guess_type(self, url: str, strict: bool = ...) -> tuple[str | None, str | None]: ...
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: ...