mimetypes.guess_type() accepts PathLikes in 3.8+ (#6716)

This commit is contained in:
Nikita Sobolev
2021-12-28 13:34:49 +03:00
committed by GitHub
parent 4aa4cb9ae2
commit 06af4a8d88

View File

@@ -28,7 +28,10 @@ class MimeTypes:
types_map_inv: tuple[dict[str, str], dict[str, str]]
def __init__(self, filenames: tuple[str, ...] = ..., strict: bool = ...) -> None: ...
def guess_extension(self, type: str, strict: bool = ...) -> str | None: ...
def guess_type(self, url: str, strict: bool = ...) -> tuple[str | None, str | None]: ...
if sys.version_info >= (3, 8):
def guess_type(self, url: StrPath, strict: bool = ...) -> tuple[str | None, str | None]: ...
else:
def guess_type(self, url: str, strict: bool = ...) -> tuple[str | None, str | None]: ...
def guess_all_extensions(self, type: str, strict: bool = ...) -> list[str]: ...
def read(self, filename: str, strict: bool = ...) -> None: ...
def readfp(self, fp: IO[str], strict: bool = ...) -> None: ...