From 4f21054c2841809da5e1e600b1cc765811288a80 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 14 Jun 2021 16:05:19 -0400 Subject: commands: document the "common" class attribute Switch it to uppercase to make it clear it's a constant, and add documentation so its usage is clear. Change-Id: I6d281a66a90b5908b3131585c9945e88cfe815ea Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/309322 Reviewed-by: Raman Tenneti Tested-by: Mike Frysinger --- subcmds/help.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'subcmds/help.py') diff --git a/subcmds/help.py b/subcmds/help.py index 0989b999..821f6bf6 100644 --- a/subcmds/help.py +++ b/subcmds/help.py @@ -24,7 +24,7 @@ from wrapper import Wrapper class Help(PagedCommand, MirrorSafeCommand): - common = False + COMMON = False helpSummary = "Display detailed help on a command" helpUsage = """ %prog [--all|command] @@ -73,7 +73,7 @@ Displays detailed usage information about a command. commandNames = list(sorted([name for name, command in all_commands.items() - if command.common and gitc_supported(command)])) + if command.COMMON and gitc_supported(command)])) self._PrintCommands(commandNames) print( -- cgit v1.2.3-54-g00ecf