From 0841f90dc323f3cc8f075d8531683e7308371a24 Mon Sep 17 00:00:00 2001 From: Taneli Hukkinen Date: Fri, 8 May 2020 16:38:24 +0200 Subject: Improve type annotation of Map.__init__ --- immutables/_map.pyi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/immutables/_map.pyi b/immutables/_map.pyi index bea69f3..ff5f895 100644 --- a/immutables/_map.pyi +++ b/immutables/_map.pyi @@ -41,9 +41,12 @@ class MapItems(Generic[K, V]): class Map(Mapping[K, V]): + @overload + def __init__(self, **kw: V) -> None: ... + @overload def __init__( - self, col: Union[Mapping[K, V], Iterable[Tuple[K, V]]] = ..., **kw: V - ): ... + self, col: Union[Mapping[K, V], Iterable[Tuple[K, V]]], **kw: V + ) -> None: ... def __reduce__(self) -> Tuple[Type[Map], Tuple[dict]]: ... def __len__(self) -> int: ... def __eq__(self, other: Any) -> bool: ... -- cgit v1.2.3