Skip to content

Commit 0841f90

Browse files
hukkinj11st1
authored andcommitted
Improve type annotation of Map.__init__
1 parent e0a07ab commit 0841f90

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

immutables/_map.pyi

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@ class MapItems(Generic[K, V]):
4141

4242

4343
class Map(Mapping[K, V]):
44+
@overload
45+
def __init__(self, **kw: V) -> None: ...
46+
@overload
4447
def __init__(
45-
self, col: Union[Mapping[K, V], Iterable[Tuple[K, V]]] = ..., **kw: V
46-
): ...
48+
self, col: Union[Mapping[K, V], Iterable[Tuple[K, V]]], **kw: V
49+
) -> None: ...
4750
def __reduce__(self) -> Tuple[Type[Map], Tuple[dict]]: ...
4851
def __len__(self) -> int: ...
4952
def __eq__(self, other: Any) -> bool: ...

0 commit comments

Comments
 (0)