Unify stdlib/{2,3}/typing.pyi

Also fix signature of IO.seek, IO.truncate, IO.write, and MutableMapping.update
Fixes #1016

Note: I couldn't put typing.pyi in 2and3 because of an import cycle when adding `import sys` to 2/typing.pyi
This commit is contained in:
David Euresti
2017-03-19 09:43:40 -07:00
committed by Łukasz Langa
parent 37a854630c
commit d43f3be914
8 changed files with 55 additions and 36 deletions
+2 -2
View File
@@ -125,9 +125,9 @@ class Counter(Dict[_T, int], Generic[_T]):
# Dict.update. Not sure if we should use '# type: ignore' instead
# and omit the type from the union.
@overload
def update(self, m: Mapping[_T, int]) -> None: ...
def update(self, m: Mapping[_T, int], **kwargs: int) -> None: ...
@overload
def update(self, m: Union[Iterable[_T], Iterable[Tuple[_T, int]]]) -> None: ...
def update(self, m: Union[Iterable[_T], Iterable[Tuple[_T, int]]], **kwargs: int) -> None: ...
def __add__(self, other: typing.Counter[_T]) -> typing.Counter[_T]: ...
def __sub__(self, other: typing.Counter[_T]) -> typing.Counter[_T]: ...