Skip to content

Commit 9c82297

Browse files
committed
fix(mimetypes): update init functions to accept Iterables of file paths
1 parent 281be89 commit 9c82297

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/mimetypes.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22
from _typeshed import StrPath
3-
from collections.abc import Sequence
3+
from collections.abc import Iterable
44
from typing import IO
55

66
__all__ = [
@@ -25,7 +25,7 @@ if sys.version_info >= (3, 13):
2525
def guess_type(url: StrPath, strict: bool = True) -> tuple[str | None, str | None]: ...
2626
def guess_all_extensions(type: str, strict: bool = True) -> list[str]: ...
2727
def guess_extension(type: str, strict: bool = True) -> str | None: ...
28-
def init(files: Sequence[StrPath] | None = None) -> None: ...
28+
def init(files: Iterable[StrPath] | None = None) -> None: ...
2929
def read_mime_types(file: StrPath) -> dict[str, str] | None: ...
3030
def add_type(type: str, ext: str, strict: bool = True) -> None: ...
3131

@@ -44,7 +44,7 @@ class MimeTypes:
4444
encodings_map: dict[str, str]
4545
types_map: tuple[dict[str, str], dict[str, str]]
4646
types_map_inv: tuple[dict[str, str], dict[str, str]]
47-
def __init__(self, filenames: tuple[StrPath, ...] = (), strict: bool = True) -> None: ...
47+
def __init__(self, filenames: Iterable[StrPath] = (), strict: bool = True) -> None: ...
4848
def add_type(self, type: str, ext: str, strict: bool = True) -> None: ...
4949
def guess_extension(self, type: str, strict: bool = True) -> str | None: ...
5050
def guess_type(self, url: StrPath, strict: bool = True) -> tuple[str | None, str | None]: ...

0 commit comments

Comments
 (0)