summaryrefslogtreecommitdiff
path: root/astroid/builder.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2018-05-23 18:36:45 +0200
committerGitHub <noreply@github.com>2018-05-23 18:36:45 +0200
commit2c655de34603e5a0f88b369d3e4b68556fdb0641 (patch)
tree2dc879f74c672643f37ae084bcb389e64c3ed97d /astroid/builder.py
parent5d17f5b1cbb875cc2ca28cee0942f3f92fb2a01d (diff)
downloadastroid-git-2c655de34603e5a0f88b369d3e4b68556fdb0641.tar.gz
Add support for type comments (#548)
Diffstat (limited to 'astroid/builder.py')
-rw-r--r--astroid/builder.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/astroid/builder.py b/astroid/builder.py
index 2522ef01..320d23a3 100644
--- a/astroid/builder.py
+++ b/astroid/builder.py
@@ -16,8 +16,9 @@ import re
import os
import sys
import textwrap
-import _ast
+
+from astroid._ast import _parse
from astroid import bases
from astroid import exceptions
from astroid import manager
@@ -37,10 +38,6 @@ _TRANSIENT_FUNCTION = '__'
_STATEMENT_SELECTOR = '#@'
-def _parse(string):
- return compile(string, "<string>", 'exec', _ast.PyCF_ONLY_AST)
-
-
if sys.version_info >= (3, 0):
from tokenize import detect_encoding