From cf7e8717d73e638d92838f8534712351dda9e0f1 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 3 Oct 2018 21:30:27 -0400 Subject: Python 3.8 uses Constant nodes in the AST --- coverage/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coverage/parser.py') diff --git a/coverage/parser.py b/coverage/parser.py index bb99cf0d..2eae4eb5 100644 --- a/coverage/parser.py +++ b/coverage/parser.py @@ -722,7 +722,7 @@ class AstArcAnalyzer(object): def is_constant_expr(self, node): """Is this a compile-time constant?""" node_name = node.__class__.__name__ - if node_name in ["NameConstant", "Num"]: + if node_name in ["Constant", "NameConstant", "Num"]: return "Num" elif node_name == "Name": if node.id in ["True", "False", "None", "__debug__"]: -- cgit v1.2.1