Add collections import in typing for type aliases to always work (#1456)

* Add collections import in typing for type aliases to always work

* Add mypy issue number to the comment
This commit is contained in:
Ivan Levkivskyi
2017-07-03 19:01:19 +02:00
committed by Jelle Zijlstra
parent 83d5ba157c
commit 97737ce8c2
2 changed files with 2 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
from abc import abstractmethod, ABCMeta
from types import CodeType, FrameType, TracebackType
import collections # Needed by aliases like DefaultDict, see mypy issue 2986
# Definitions of special type checking related constructs. Their definitions
# are not used, so their value does not matter.

View File

@@ -3,6 +3,7 @@
import sys
from abc import abstractmethod, ABCMeta
from types import CodeType, FrameType, TracebackType
import collections # Needed by aliases like DefaultDict, see mypy issue 2986
# Definitions of special type checking related constructs. Their definition
# are not used, so their value does not matter.