diff --git a/distutils/command/sdist.py b/distutils/command/sdist.py index b3bf0c32..24e1446a 100644 --- a/distutils/command/sdist.py +++ b/distutils/command/sdist.py @@ -76,7 +76,7 @@ def checking_metadata(self) -> bool: ( 'keep-temp', 'k', - "keep the distribution tree around after creating " + "archive file(s)", + "keep the distribution tree around after creating archive file(s)", ), ( 'dist-dir=', @@ -206,8 +206,7 @@ def get_file_list(self) -> None: if not template_exists: self.warn( - ("manifest template '%s' does not exist " + "(using default file list)") - % self.template + f"manifest template '{self.template}' does not exist (using default file list)" ) self.filelist.findall() diff --git a/distutils/core.py b/distutils/core.py index bd62546b..b023fea9 100644 --- a/distutils/core.py +++ b/distutils/core.py @@ -213,7 +213,7 @@ def run_commands(dist): if DEBUG: raise else: - raise SystemExit("error: " + str(msg)) + raise SystemExit(f"error: {msg}") return dist diff --git a/distutils/versionpredicate.py b/distutils/versionpredicate.py index fe31b0ed..12c95c67 100644 --- a/distutils/versionpredicate.py +++ b/distutils/versionpredicate.py @@ -129,7 +129,7 @@ def __init__(self, versionPredicateStr): def __str__(self): if self.pred: - seq = [cond + " " + str(ver) for cond, ver in self.pred] + seq = [f"{cond} {ver}" for cond, ver in self.pred] return self.name + " (" + ", ".join(seq) + ")" else: return self.name