Skip to content

Commit d17f723

Browse files
lamenezesgvanrossum
authored andcommitted
Add missing imports from collections.abc (#818)
Fixes #817
1 parent d184840 commit d17f723

File tree

2 files changed

+42
-3
lines changed

2 files changed

+42
-3
lines changed

stdlib/3/collections/__init__.pyi

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,29 @@
66

77
# These are not exported.
88
from typing import (
9-
TypeVar, Iterable, Generic, Iterator, Dict, overload,
10-
Mapping, List, Tuple, Callable, Sized, Any, Type,
11-
Optional, Union
9+
TypeVar, Generic, Dict, overload, List, Tuple,
10+
Callable, Any, Type, Optional, Union
1211
)
1312
# These are exported.
1413
# TODO reexport more.
1514
from typing import (
1615
Container as Container,
16+
Hashable as Hashable,
17+
Iterable as Iterable,
18+
Iterator as Iterator,
19+
Sized as Sized,
20+
Generator as Generator,
21+
ByteString as ByteString,
22+
Awaitable as Awaitable,
23+
Coroutine as Coroutine,
24+
AsyncIterable as AsyncIterable,
25+
AsyncIterator as AsyncIterator,
26+
Reversible as Reversible,
27+
Mapping as Mapping,
28+
MappingView as MappingView,
29+
ItemsView as ItemsView,
30+
KeysView as KeysView,
31+
ValuesView as ValuesView,
1732
MutableMapping as MutableMapping,
1833
Sequence as Sequence,
1934
MutableSequence as MutableSequence,

stdlib/3/collections/abc.pyi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,33 @@ import sys
66
if sys.version_info >= (3, 3):
77
from . import (
88
Container as Container,
9+
Hashable as Hashable,
10+
Iterable as Iterable,
11+
Iterator as Iterator,
12+
Sized as Sized,
13+
Mapping as Mapping,
914
MutableMapping as MutableMapping,
1015
Sequence as Sequence,
1116
MutableSequence as MutableSequence,
1217
Set as Set,
1318
MutableSet as MutableSet,
19+
MappingView as MappingView,
20+
ItemsView as ItemsView,
21+
KeysView as KeysView,
22+
ValuesView as ValuesView,
23+
)
24+
25+
if sys.version_info >= (3, 5):
26+
from . import (
27+
Generator as Generator,
28+
ByteString as ByteString,
29+
Awaitable as Awaitable,
30+
Coroutine as Coroutine,
31+
AsyncIterable as AsyncIterable,
32+
AsyncIterator as AsyncIterator,
33+
)
34+
35+
if sys.version_info >= (3, 6):
36+
from . import (
37+
Reversible as Reversible,
1438
)

0 commit comments

Comments
 (0)