Mercurial > hg > configuration
changeset 80:35416ad14098
notes to self about how to make this better; still needs a little thought
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 09 Apr 2012 15:47:08 -0700 |
parents | fe31a57ac577 |
children | f3b2563b2a91 |
files | configuration/configuration.py |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/configuration/configuration.py Thu Mar 29 16:51:07 2012 -0700 +++ b/configuration/configuration.py Mon Apr 09 15:47:08 2012 -0700 @@ -115,11 +115,21 @@ if not hasattr(parser, 'parsed'): parser.parsed = set() parser.parsed.add(dest) + # TODO (see following comment) + # if self.type in ... ### plugins for option types ### TODO: this could use a bit of thought ### They should probably be classes +# class Option(object): +# def arguments(self, name, value): +# """return arguments appropriate for construction of an optparse.Option +# def take_action(self, ...): +# """do something appropriate based on type""" + def base_cli(name, value): + """base_cli for all option types""" + # CLI arguments args = value.get('flags', ['--%s' % name]) if not args: