review exported names in collections stubs (#1197)

Fixes #709

I looked at dir(collections) in 2.7 and 3.6 and made sure the list of names matched the stubs.
This commit is contained in:
Jelle Zijlstra
2017-04-30 09:59:37 -07:00
committed by Guido van Rossum
parent b9e896d97c
commit b084bcd037
2 changed files with 30 additions and 15 deletions

View File

@@ -2,16 +2,28 @@
# Based on http://docs.python.org/2.7/library/collections.html
# TODO more abstract base classes (interfaces in mypy)
# NOTE: These are incomplete!
# These are not exported.
from typing import Any, Dict, Generic, TypeVar, Tuple, overload, Type, Optional, List, Union, Reversible
# These are exported.
from typing import (
Any, Container, Dict, Generic, TypeVar, Iterable, Tuple, Callable, Mapping, overload,
Iterator, Type, Sized, Optional, List, Set, Sequence, Union, Reversible,
MutableMapping, MutableSet, MutableSequence,
Callable as Callable,
Container as Container,
Hashable as Hashable,
ItemsView as ItemsView,
Iterable as Iterable,
Iterator as Iterator,
KeysView as KeysView,
Mapping as Mapping,
MappingView as MappingView,
MutableMapping as MutableMapping,
MutableSequence as MutableSequence,
MutableSet as MutableSet,
Sequence as Sequence,
AbstractSet as Set,
Sized as Sized,
ValuesView as ValuesView,
)
import typing
_T = TypeVar('_T')
_KT = TypeVar('_KT')