diff --git a/third_party/2.7/six/__init__.pyi b/third_party/2.7/six/__init__.pyi index 5f5383bbc..aadf05660 100644 --- a/third_party/2.7/six/__init__.pyi +++ b/third_party/2.7/six/__init__.pyi @@ -4,7 +4,7 @@ from __future__ import print_function from typing import ( Any, AnyStr, Callable, Iterable, Mapping, Optional, - Pattern, Tuple, TypeVar, Union, overload, + Pattern, Tuple, TypeVar, Union, overload, ValuesView, KeysView, ItemsView ) import typing @@ -56,10 +56,9 @@ def itervalues(d: Mapping[_K, _V]) -> typing.Iterator[_V]: ... def iteritems(d: Mapping[_K, _V]) -> typing.Iterator[Tuple[_K, _V]]: ... #def iterlists -# TODO fix return types - python2 typing doesn't include KeysView etc yet. -def viewkeys(d: Mapping[_K, _V]) -> Iterable[_K]: ... -def viewvalues(d: Mapping[_K, _V]) -> Iterable[_V]: ... -def viewitems(d: Mapping[_K, _V]) -> Iterable[Tuple[_K, _V]]: ... +def viewkeys(d: Mapping[_K, _V]) -> KeysView[_K]: ... +def viewvalues(d: Mapping[_K, _V]) -> ValuesView[_V]: ... +def viewitems(d: Mapping[_K, _V]) -> ItemsView[_K, _V]: ... def b(s: str) -> binary_type: ... def u(s: str) -> text_type: ...