diff options
author | Johan Dahlin <johan@src.gnome.org> | 2007-05-01 16:15:03 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2007-05-01 16:15:03 +0000 |
commit | 4ddb6f3b99d4b98eb81eb6e0940aba48b5841947 (patch) | |
tree | a217491fc316ccc2b061f847aecd6362197222a0 | |
parent | 0365276d46d5079a8464db5dec60e1617cd087b3 (diff) | |
download | pygobject-4ddb6f3b99d4b98eb81eb6e0940aba48b5841947.tar.gz pygobject-4ddb6f3b99d4b98eb81eb6e0940aba48b5841947.tar.xz pygobject-4ddb6f3b99d4b98eb81eb6e0940aba48b5841947.zip |
Rewrap to fit in 79 characters
svn path=/trunk/; revision=664
-rw-r--r-- | gobject/option.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gobject/option.py b/gobject/option.py index bffa16c..ce869d1 100644 --- a/gobject/option.py +++ b/gobject/option.py @@ -84,7 +84,8 @@ class Option(optparse.Option): raise ValueError("%s at least one long option name.") if len(self._long_opts) < len(self._short_opts): - raise ValueError("%s at least more long option names than short option names.") + raise ValueError( + "%s at least more long option names than short option names.") if not self.help: raise ValueError("%s needs a help message.", self._long_opts[0]) @@ -126,7 +127,8 @@ class OptionGroup(optparse.OptionGroup): """A group of command line options. Arguements: - name: The groups name, used to create the --help-{name} option + name: The groups name, used to create the + --help-{name} option description: Shown as title of the groups help view help_description: Shown as help to the --help-{name} option option_list: The options used in this group, must be option.Option() @@ -197,7 +199,8 @@ class OptionGroup(optparse.OptionGroup): default = self.defaults.get(option.dest) if isinstance(default, basestring): opt_str = option.get_opt_string() - self.defaults[option.dest] = option.check_value(opt_str, default) + self.defaults[option.dest] = option.check_value( + opt_str, default) self.values = optparse.Values(self.defaults) class OptionParser(optparse.OptionParser): @@ -226,8 +229,10 @@ class OptionParser(optparse.OptionParser): if 'option_class' not in kwargs: kwargs['option_class'] = Option self.help_enabled = kwargs.pop('help_enabled', True) - self.ignore_unknown_options = kwargs.pop('ignore_unknown_options', False) - optparse.OptionParser.__init__(self, add_help_option=False, *args, **kwargs) + self.ignore_unknown_options = kwargs.pop('ignore_unknown_options', + False) + optparse.OptionParser.__init__(self, add_help_option=False, + *args, **kwargs) def set_usage(self, usage): if usage is None: |