summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/main.py b/main.py
index bd8d5135..604de76f 100755
--- a/main.py
+++ b/main.py
@@ -198,9 +198,8 @@ class _Repo:
198 if short: 198 if short:
199 commands = " ".join(sorted(self.commands)) 199 commands = " ".join(sorted(self.commands))
200 wrapped_commands = textwrap.wrap(commands, width=77) 200 wrapped_commands = textwrap.wrap(commands, width=77)
201 print( 201 help_commands = "".join(f"\n {x}" for x in wrapped_commands)
202 "Available commands:\n %s" % ("\n ".join(wrapped_commands),) 202 print(f"Available commands:{help_commands}")
203 )
204 print("\nRun `repo help <command>` for command-specific details.") 203 print("\nRun `repo help <command>` for command-specific details.")
205 print("Bug reports:", Wrapper().BUG_URL) 204 print("Bug reports:", Wrapper().BUG_URL)
206 else: 205 else:
@@ -236,7 +235,7 @@ class _Repo:
236 if name in self.commands: 235 if name in self.commands:
237 return name, [] 236 return name, []
238 237
239 key = "alias.%s" % (name,) 238 key = f"alias.{name}"
240 alias = RepoConfig.ForRepository(self.repodir).GetString(key) 239 alias = RepoConfig.ForRepository(self.repodir).GetString(key)
241 if alias is None: 240 if alias is None:
242 alias = RepoConfig.ForUser().GetString(key) 241 alias = RepoConfig.ForUser().GetString(key)