mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Packaging cleanup: normalize print calls.
Namely: use default arguments instead of explicit empty string; use multiple arguments instead of building strings.
This commit is contained in:
parent
04fc999c05
commit
3cab2f150c
4 changed files with 19 additions and 17 deletions
|
|
@ -509,14 +509,14 @@ Common commands: (see '--help-commands' for more)
|
|||
options = self.global_options
|
||||
parser.set_option_table(options)
|
||||
parser.print_help(self.common_usage + "\nGlobal options:")
|
||||
print('')
|
||||
print()
|
||||
|
||||
if display_options:
|
||||
parser.set_option_table(self.display_options)
|
||||
parser.print_help(
|
||||
"Information display options (just display " +
|
||||
"information, ignore any commands)")
|
||||
print('')
|
||||
print()
|
||||
|
||||
for command in self.commands:
|
||||
if isinstance(command, type) and issubclass(command, Command):
|
||||
|
|
@ -529,7 +529,7 @@ Common commands: (see '--help-commands' for more)
|
|||
else:
|
||||
parser.set_option_table(cls.user_options)
|
||||
parser.print_help("Options for %r command:" % cls.__name__)
|
||||
print('')
|
||||
print()
|
||||
|
||||
print(gen_usage(self.script_name))
|
||||
|
||||
|
|
@ -544,7 +544,7 @@ Common commands: (see '--help-commands' for more)
|
|||
# we ignore "foo bar").
|
||||
if self.help_commands:
|
||||
self.print_commands()
|
||||
print('')
|
||||
print()
|
||||
print(gen_usage(self.script_name))
|
||||
return 1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue