From 4c4ba2e0bc9ec663fa3772d2b088f736345a65a1 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 1 May 2021 18:18:11 -0400 Subject: refactor: pyupgrade --py36-plus coverage/*.py --- coverage/misc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'coverage/misc.py') 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') -- cgit v1.2.1