mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Support dict(foo.split() for foo in bar) with bytes (#10072)
This commit is contained in:
@@ -1032,10 +1032,12 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
def __init__(self, __iterable: Iterable[tuple[_KT, _VT]]) -> None: ...
|
||||
@overload
|
||||
def __init__(self: dict[str, _VT], __iterable: Iterable[tuple[str, _VT]], **kwargs: _VT) -> None: ...
|
||||
# Next overload is for dict(string.split(sep) for string in iterable)
|
||||
# Next two overloads are for dict(string.split(sep) for string in iterable)
|
||||
# Cannot be Iterable[Sequence[_T]] or otherwise dict(["foo", "bar", "baz"]) is not an error
|
||||
@overload
|
||||
def __init__(self: dict[str, str], __iterable: Iterable[list[str]]) -> None: ...
|
||||
@overload
|
||||
def __init__(self: dict[bytes, bytes], __iterable: Iterable[list[bytes]]) -> None: ...
|
||||
def __new__(cls, *args: Any, **kwargs: Any) -> Self: ...
|
||||
def copy(self) -> dict[_KT, _VT]: ...
|
||||
def keys(self) -> dict_keys[_KT, _VT]: ...
|
||||
|
||||
Reference in New Issue
Block a user