mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-12 02:42:29 +08:00
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:
committed by
Łukasz Langa
parent
37a854630c
commit
d43f3be914
@@ -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]: ...
|
||||
|
||||
Reference in New Issue
Block a user