From b32ccbb66bb16965ecb8b4e266c4e45186636c1b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 29 Sep 2023 11:04:49 -0400 Subject: cleanup: Update codebase to expect Python 3.6 - Bump minimum version to Python 3.6. - Use f-strings in a lot of places. Change-Id: I2aa70197230fcec2eff8e7c8eb754f20c08075bb Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/389034 Tested-by: Jason R. Coombs Reviewed-by: Mike Frysinger Commit-Queue: Jason R. Coombs --- main.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index bd8d5135..604de76f 100755 --- a/main.py +++ b/main.py @@ -198,9 +198,8 @@ class _Repo: if short: commands = " ".join(sorted(self.commands)) wrapped_commands = textwrap.wrap(commands, width=77) - print( - "Available commands:\n %s" % ("\n ".join(wrapped_commands),) - ) + help_commands = "".join(f"\n {x}" for x in wrapped_commands) + print(f"Available commands:{help_commands}") print("\nRun `repo help ` for command-specific details.") print("Bug reports:", Wrapper().BUG_URL) else: @@ -236,7 +235,7 @@ class _Repo: if name in self.commands: return name, [] - key = "alias.%s" % (name,) + key = f"alias.{name}" alias = RepoConfig.ForRepository(self.repodir).GetString(key) if alias is None: alias = RepoConfig.ForUser().GetString(key) -- cgit v1.2.3-54-g00ecf