diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-07-28 17:29:52 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-07-28 17:29:52 -0400 |
commit | c5c1ba084b0b548ff8869cbc086e81608c329eb6 (patch) | |
tree | 6b2457d8a63aaccd0099b1e5fc2592caf7e44ac5 /coverage/inorout.py | |
parent | 82213596f5301981ea59c3067f8738ff9dd54bbc (diff) | |
download | python-coveragepy-git-c5c1ba084b0b548ff8869cbc086e81608c329eb6.tar.gz |
refactor: convert %-strings to f-strings
Diffstat (limited to 'coverage/inorout.py')
-rw-r--r-- | coverage/inorout.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/coverage/inorout.py b/coverage/inorout.py index 32eb9079..a161fa61 100644 --- a/coverage/inorout.py +++ b/coverage/inorout.py @@ -369,8 +369,7 @@ class InOrOut: if not disp.has_dynamic_filename: if not disp.source_filename: raise CoverageException( - "Plugin %r didn't set source_filename for %r" % - (plugin, disp.original_filename) + f"Plugin {plugin!r} didn't set source_filename for {disp.original_filename!r}" ) reason = self.check_include_omit_etc(disp.source_filename, frame) if reason: @@ -487,7 +486,7 @@ class InOrOut: """ mod = sys.modules.get(pkg) if mod is None: - self.warn("Module %s was never imported." % pkg, slug="module-not-imported") + self.warn(f"Module {pkg} was never imported.", slug="module-not-imported") return if module_is_namespace(mod): @@ -496,7 +495,7 @@ class InOrOut: return if not module_has_file(mod): - self.warn("Module %s has no Python source." % pkg, slug="module-not-python") + self.warn(f"Module {pkg} has no Python source.", slug="module-not-python") return # The module was in sys.modules, and seems like a module with code, but |