Skip to content

Commit 069392a

Browse files
authored
Don't use TYPE_CHECKING because it's not in the Python 3.5.1 stdlib (#3008)
1 parent 1b56c66 commit 069392a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mypy/build.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
from os.path import dirname, basename
2222

2323
from typing import (AbstractSet, Dict, Iterable, Iterator, List,
24-
NamedTuple, Optional, Set, Tuple, Union, TYPE_CHECKING)
25-
if TYPE_CHECKING:
24+
NamedTuple, Optional, Set, Tuple, Union)
25+
# Can't use TYPE_CHECKING because it's not in the Python 3.5.1 stdlib
26+
MYPY = False
27+
if MYPY:
2628
from typing import Deque
2729

2830
from mypy.nodes import (MypyFile, Node, ImportBase, Import, ImportFrom, ImportAll)

0 commit comments

Comments
 (0)