summaryrefslogtreecommitdiff
path: root/astroid
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2019-07-09 12:13:43 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2019-07-09 12:13:43 +0200
commitbe8a2e141d87c6c4fc3e8505d9482837c8d74cf7 (patch)
tree8dea68be75e68789f58c3fff24a8a24a4f805e15 /astroid
parent83a345623c904c10df3bcf1579c0fddd705f0b30 (diff)
downloadastroid-git-be8a2e141d87c6c4fc3e8505d9482837c8d74cf7.tar.gz
Fallback to the builtin ast on Python 3.8 when typed_ast is not available
Diffstat (limited to 'astroid')
-rw-r--r--astroid/_ast.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/astroid/_ast.py b/astroid/_ast.py
index da95f1de..027b4603 100644
--- a/astroid/_ast.py
+++ b/astroid/_ast.py
@@ -12,6 +12,12 @@ except ImportError:
pass
+PY38 = sys.version_info[:2] >= (3, 8)
+if PY38:
+ # On Python 3.8, typed_ast was merged back into `ast`
+ _ast_py3 = ast
+
+
FunctionType = namedtuple("FunctionType", ["argtypes", "returns"])