diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2018-10-03 21:30:27 -0400 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2018-10-06 12:20:10 -0400 |
| commit | 1f7a74b1446fc18bb9287b25351d490a1c6d60c7 (patch) | |
| tree | eb089fdc99ccc40a52f900ee2dd58a26c5586362 /coverage/parser.py | |
| parent | ccc92dd34dfb4fcb0a2696c5e6cb534e4123c0e9 (diff) | |
| download | python-coveragepy-git-1f7a74b1446fc18bb9287b25351d490a1c6d60c7.tar.gz | |
Python 3.8 uses Constant nodes in the AST
(cherry picked from commit cf7e8717d73e638d92838f8534712351dda9e0f1)
Diffstat (limited to 'coverage/parser.py')
| -rw-r--r-- | coverage/parser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coverage/parser.py b/coverage/parser.py index 849d0e33..9fa37f6b 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__"]: |
