Skip to content

Commit

Permalink
Python 3.8 uses Constant nodes in the AST
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Oct 4, 2018
1 parent 5aca5af commit cf7e871
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coverage/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ def _missing__NodeList(self, node):
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__"]:
Expand Down

0 comments on commit cf7e871

Please sign in to comment.