mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Standardize whitespace in function calls.
This commit is contained in:
parent
449f5568b7
commit
071ed76732
4 changed files with 145 additions and 147 deletions
|
@ -150,10 +150,10 @@ class FancyGetopt:
|
||||||
|
|
||||||
|
|
||||||
def _grok_option_table (self):
|
def _grok_option_table (self):
|
||||||
"""Populate the various data structures that keep tabs on
|
"""Populate the various data structures that keep tabs on the
|
||||||
the option table. Called by 'getopt()' before it can do
|
option table. Called by 'getopt()' before it can do anything
|
||||||
anything worthwhile."""
|
worthwhile.
|
||||||
|
"""
|
||||||
self.long_opts = []
|
self.long_opts = []
|
||||||
self.short_opts = []
|
self.short_opts = []
|
||||||
self.short2long.clear()
|
self.short2long.clear()
|
||||||
|
@ -239,8 +239,8 @@ class FancyGetopt:
|
||||||
(args, object). If 'object' is supplied, it is modified in place
|
(args, object). If 'object' is supplied, it is modified in place
|
||||||
and 'getopt()' just returns 'args'; in both cases, the returned
|
and 'getopt()' just returns 'args'; in both cases, the returned
|
||||||
'args' is a modified copy of the passed-in 'args' list, which is
|
'args' is a modified copy of the passed-in 'args' list, which is
|
||||||
left untouched."""
|
left untouched.
|
||||||
|
"""
|
||||||
if args is None:
|
if args is None:
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
if object is None:
|
if object is None:
|
||||||
|
@ -301,8 +301,8 @@ class FancyGetopt:
|
||||||
def get_option_order (self):
|
def get_option_order (self):
|
||||||
"""Returns the list of (option, value) tuples processed by the
|
"""Returns the list of (option, value) tuples processed by the
|
||||||
previous run of 'getopt()'. Raises RuntimeError if
|
previous run of 'getopt()'. Raises RuntimeError if
|
||||||
'getopt()' hasn't been called yet."""
|
'getopt()' hasn't been called yet.
|
||||||
|
"""
|
||||||
if self.option_order is None:
|
if self.option_order is None:
|
||||||
raise RuntimeError, "'getopt()' hasn't been called yet"
|
raise RuntimeError, "'getopt()' hasn't been called yet"
|
||||||
else:
|
else:
|
||||||
|
@ -311,8 +311,8 @@ class FancyGetopt:
|
||||||
|
|
||||||
def generate_help (self, header=None):
|
def generate_help (self, header=None):
|
||||||
"""Generate help text (a list of strings, one per suggested line of
|
"""Generate help text (a list of strings, one per suggested line of
|
||||||
output) from the option table for this FancyGetopt object."""
|
output) from the option table for this FancyGetopt object.
|
||||||
|
"""
|
||||||
# Blithely assume the option table is good: probably wouldn't call
|
# Blithely assume the option table is good: probably wouldn't call
|
||||||
# 'generate_help()' unless you've already called 'getopt()'.
|
# 'generate_help()' unless you've already called 'getopt()'.
|
||||||
|
|
||||||
|
@ -398,7 +398,6 @@ class FancyGetopt:
|
||||||
file = sys.stdout
|
file = sys.stdout
|
||||||
for line in self.generate_help(header):
|
for line in self.generate_help(header):
|
||||||
file.write(line + "\n")
|
file.write(line + "\n")
|
||||||
# print_help ()
|
|
||||||
|
|
||||||
# class FancyGetopt
|
# class FancyGetopt
|
||||||
|
|
||||||
|
|
|
@ -213,7 +213,6 @@ class FileList:
|
||||||
|
|
||||||
def include_pattern (self, pattern,
|
def include_pattern (self, pattern,
|
||||||
anchor=1, prefix=None, is_regex=0):
|
anchor=1, prefix=None, is_regex=0):
|
||||||
|
|
||||||
"""Select strings (presumably filenames) from 'self.files' that
|
"""Select strings (presumably filenames) from 'self.files' that
|
||||||
match 'pattern', a Unix-style wildcard (glob) pattern. Patterns
|
match 'pattern', a Unix-style wildcard (glob) pattern. Patterns
|
||||||
are not quite the same as implemented by the 'fnmatch' module: '*'
|
are not quite the same as implemented by the 'fnmatch' module: '*'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue