diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2022-08-02 21:03:33 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2022-08-02 21:13:43 -0400 |
| commit | e90b97304d50eb1246197014ca2d794987ce1934 (patch) | |
| tree | 23e9f77cedeeb30cd3765fd1e35862c2eb89cffb /setuptools/_distutils/cmd.py | |
| parent | 9b0cf7e1dfd8c3e11a47a9b3c7f4385745d50daf (diff) | |
| parent | c397f4c164e0a6f49a1ac3a70f5c80fe05785ed6 (diff) | |
| download | python-setuptools-git-e90b97304d50eb1246197014ca2d794987ce1934.tar.gz | |
Merge https://github.com/pypa/distutils into bugfix/distutils-164
Diffstat (limited to 'setuptools/_distutils/cmd.py')
| -rw-r--r-- | setuptools/_distutils/cmd.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/setuptools/_distutils/cmd.py b/setuptools/_distutils/cmd.py index 6f68801d..68a9267c 100644 --- a/setuptools/_distutils/cmd.py +++ b/setuptools/_distutils/cmd.py @@ -163,7 +163,7 @@ class Command: if option[-1] == "=": option = option[:-1] value = getattr(self, option) - self.announce(indent + "%s = %s" % (option, value), level=log.INFO) + self.announce(indent + "{} = {}".format(option, value), level=log.INFO) def run(self): """A command's raison d'etre: carry out the action it exists to @@ -215,7 +215,7 @@ class Command: return default elif not isinstance(val, str): raise DistutilsOptionError( - "'%s' must be a %s (got `%s`)" % (option, what, val) + "'{}' must be a {} (got `{}`)".format(option, what, val) ) return val @@ -243,7 +243,7 @@ class Command: ok = False if not ok: raise DistutilsOptionError( - "'%s' must be a list of strings (got %r)" % (option, val) + "'{}' must be a list of strings (got {!r})".format(option, val) ) def _ensure_tested_string(self, option, tester, what, error_fmt, default=None): @@ -424,7 +424,7 @@ class Command: raise TypeError("'infiles' must be a string, or a list or tuple of strings") if exec_msg is None: - exec_msg = "generating %s from %s" % (outfile, ', '.join(infiles)) + exec_msg = "generating {} from {}".format(outfile, ', '.join(infiles)) # If 'outfile' must be regenerated (either because it doesn't # exist, is out-of-date, or the 'force' flag is true) then |
