diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-05-02 18:35:41 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-05-02 18:35:41 -0400 |
commit | bb73791b59f74b6621a87036c14a6be6a23e0e55 (patch) | |
tree | a99329d767e299b9e1ceb211cb74d7c4262311a3 /coverage/config.py | |
parent | b74461aef05559e17da555c20f4ce63c610e9307 (diff) | |
download | python-coveragepy-git-bb73791b59f74b6621a87036c14a6be6a23e0e55.tar.gz |
refactor: convert more %-formatting to f-strings
Diffstat (limited to 'coverage/config.py')
-rw-r--r-- | coverage/config.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/coverage/config.py b/coverage/config.py index 71f8fbd0..44bae957 100644 --- a/coverage/config.py +++ b/coverage/config.py @@ -443,7 +443,7 @@ class CoverageConfig: return # If we get here, we didn't find the option. - raise CoverageException("No such option: %r" % option_name) + raise CoverageException(f"No such option: {option_name!r}") def get_option(self, option_name): """Get an option from the configuration. @@ -471,7 +471,7 @@ class CoverageConfig: return self.plugin_options.get(plugin_name, {}).get(key) # If we get here, we didn't find the option. - raise CoverageException("No such option: %r" % option_name) + raise CoverageException(f"No such option: {option_name!r}") def post_process_file(self, path): """Make final adjustments to a file path to make it usable.""" @@ -545,7 +545,7 @@ def read_coverage_config(config_file, **kwargs): if config_read: break if specified_file: - raise CoverageException("Couldn't read '%s' as a config file" % fname) + raise CoverageException(f"Couldn't read {fname!r} as a config file") # $set_env.py: COVERAGE_DEBUG - Options for --debug. # 3) from environment variables: |