summaryrefslogtreecommitdiff
path: root/coverage/misc.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-05-01 18:18:11 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-05-02 07:38:19 -0400
commit4c4ba2e0bc9ec663fa3772d2b088f736345a65a1 (patch)
treea03a2672bfe64141b46243274243377d86c73bb8 /coverage/misc.py
parent236bc9317d208b24b418c9c167f22410613f4ade (diff)
downloadpython-coveragepy-git-4c4ba2e0bc9ec663fa3772d2b088f736345a65a1.tar.gz
refactor: pyupgrade --py36-plus coverage/*.py
Diffstat (limited to 'coverage/misc.py')
-rw-r--r--coverage/misc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/coverage/misc.py b/coverage/misc.py
index 6f104ac0..52583589 100644
--- a/coverage/misc.py
+++ b/coverage/misc.py
@@ -196,7 +196,7 @@ def filename_suffix(suffix):
return suffix
-class Hasher(object):
+class Hasher:
"""Hashes Python data into md5."""
def __init__(self):
self.md5 = hashlib.md5()
@@ -253,7 +253,7 @@ def _needs_to_implement(that, func_name):
)
-class DefaultValue(object):
+class DefaultValue:
"""A sentinel object to use for unusual default-value needs.
Construct with a string that will be used as the repr, for display in help
@@ -307,7 +307,7 @@ def substitute_variables(text, variables):
elif word in variables:
return variables[word]
elif match.group('strict'):
- msg = "Variable {} is undefined: {!r}".format(word, text)
+ msg = f"Variable {word} is undefined: {text!r}"
raise CoverageException(msg)
else:
return match.group('defval')