summaryrefslogtreecommitdiff
path: root/coverage/env.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-06-06 12:40:47 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-06-06 12:42:07 -0400
commitcb09207f6f291696714f5550aacd1e9a3a0e81e1 (patch)
tree026f8d44180c494e614708a2861326c8ca489407 /coverage/env.py
parent95c582fd8038a7158ff96baff4186f5fb601afd4 (diff)
downloadpython-coveragepy-git-cb09207f6f291696714f5550aacd1e9a3a0e81e1.tar.gz
feat: soft keywords are shown in bold in the HTML report
The match and case soft keywords are shown in bold when they are keywords, and not when they are not. The underscore soft keyword is ignored, because it is harder to get right, and because it doesn't look that much different in bold anyway.
Diffstat (limited to 'coverage/env.py')
-rw-r--r--coverage/env.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/coverage/env.py b/coverage/env.py
index 89abbb2e..c300f802 100644
--- a/coverage/env.py
+++ b/coverage/env.py
@@ -105,6 +105,10 @@ class PYBEHAVIOR:
# Match-case construct.
match_case = (PYVERSION >= (3, 10))
+ # Some words are keywords in some places, identifiers in other places.
+ soft_keywords = (PYVERSION >= (3, 10))
+
+
# Coverage.py specifics.
# Are we using the C-implemented trace function?