diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2018-05-23 18:36:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-23 18:36:45 +0200 |
commit | 2c655de34603e5a0f88b369d3e4b68556fdb0641 (patch) | |
tree | 2dc879f74c672643f37ae084bcb389e64c3ed97d /astroid/builder.py | |
parent | 5d17f5b1cbb875cc2ca28cee0942f3f92fb2a01d (diff) | |
download | astroid-git-2c655de34603e5a0f88b369d3e4b68556fdb0641.tar.gz |
Add support for type comments (#548)
Diffstat (limited to 'astroid/builder.py')
-rw-r--r-- | astroid/builder.py | 7 |
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 |