# HG changeset patch # User Jeff Hammel # Date 1334011628 25200 # Node ID 35416ad140982c11eba0a2d6b96d683f53429e94 # Parent fe31a57ac5771d07aecd2a90a91378a9ba2e382b notes to self about how to make this better; still needs a little thought diff -r fe31a57ac577 -r 35416ad14098 configuration/configuration.py --- 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: