mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-06-26 20:17:52 +00:00
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 <jaraco@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Jason R. Coombs <jaraco@google.com>
This commit is contained in:
7
main.py
7
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 <command>` 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)
|
||||
|
Reference in New Issue
Block a user