mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 20:45:49 +08:00
[mimetypes] Functions working with files accept Paths (#15071)
This commit is contained in:
committed by
GitHub
parent
fbcce8e4ec
commit
8dcca56fec
@@ -25,15 +25,15 @@ if sys.version_info >= (3, 13):
|
||||
def guess_type(url: StrPath, strict: bool = True) -> tuple[str | None, str | None]: ...
|
||||
def guess_all_extensions(type: str, strict: bool = True) -> list[str]: ...
|
||||
def guess_extension(type: str, strict: bool = True) -> str | None: ...
|
||||
def init(files: Sequence[str] | None = None) -> None: ...
|
||||
def read_mime_types(file: str) -> dict[str, str] | None: ...
|
||||
def init(files: Sequence[StrPath] | None = None) -> None: ...
|
||||
def read_mime_types(file: StrPath) -> dict[str, str] | None: ...
|
||||
def add_type(type: str, ext: str, strict: bool = True) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
def guess_file_type(path: StrPath, *, strict: bool = True) -> tuple[str | None, str | None]: ...
|
||||
|
||||
inited: bool
|
||||
knownfiles: list[str]
|
||||
knownfiles: list[StrPath]
|
||||
suffix_map: dict[str, str]
|
||||
encodings_map: dict[str, str]
|
||||
types_map: dict[str, str]
|
||||
@@ -44,12 +44,12 @@ class MimeTypes:
|
||||
encodings_map: dict[str, str]
|
||||
types_map: tuple[dict[str, str], dict[str, str]]
|
||||
types_map_inv: tuple[dict[str, str], dict[str, str]]
|
||||
def __init__(self, filenames: tuple[str, ...] = (), strict: bool = True) -> None: ...
|
||||
def __init__(self, filenames: tuple[StrPath, ...] = (), strict: bool = True) -> None: ...
|
||||
def add_type(self, type: str, ext: str, strict: bool = True) -> None: ...
|
||||
def guess_extension(self, type: str, strict: bool = True) -> str | None: ...
|
||||
def guess_type(self, url: StrPath, strict: bool = True) -> tuple[str | None, str | None]: ...
|
||||
def guess_all_extensions(self, type: str, strict: bool = True) -> list[str]: ...
|
||||
def read(self, filename: str, strict: bool = True) -> None: ...
|
||||
def read(self, filename: StrPath, strict: bool = True) -> None: ...
|
||||
def readfp(self, fp: IO[str], strict: bool = True) -> None: ...
|
||||
def read_windows_registry(self, strict: bool = True) -> None: ...
|
||||
if sys.version_info >= (3, 13):
|
||||
|
||||
Reference in New Issue
Block a user