mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Enable typing.DefaultDict as an alias for collections.defaultdict (#139)
This commit is contained in:
committed by
Guido van Rossum
parent
5f76369093
commit
db3cc2e8da
@@ -1,6 +1,7 @@
|
||||
# Stubs for typing (Python 2.7)
|
||||
|
||||
from abc import abstractmethod, ABCMeta
|
||||
import collections
|
||||
|
||||
# Definitions of special type checking related constructs. Their definition
|
||||
# are not used, so their value does not matter.
|
||||
@@ -27,6 +28,7 @@ Union = TypeAlias(object)
|
||||
Optional = TypeAlias(object)
|
||||
List = TypeAlias(object)
|
||||
Dict = TypeAlias(object)
|
||||
DefaultDict = collections.defaultdict
|
||||
Set = TypeAlias(object)
|
||||
|
||||
# Predefined type variables.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Stubs for typing
|
||||
|
||||
from abc import abstractmethod, ABCMeta
|
||||
import collections
|
||||
|
||||
# Definitions of special type checking related constructs. Their definition
|
||||
# are not used, so their value does not matter.
|
||||
@@ -28,6 +29,7 @@ Union = TypeAlias(object)
|
||||
Optional = TypeAlias(object)
|
||||
List = TypeAlias(object)
|
||||
Dict = TypeAlias(object)
|
||||
DefaultDict = collections.defaultdict
|
||||
Set = TypeAlias(object)
|
||||
|
||||
# Predefined type variables.
|
||||
|
||||
Reference in New Issue
Block a user