parameters: (self, *args, **kw)
docstring: Add an option to the parser.
  
      This accepts the same arguments as OptionParser.add_option, plus the
      following:
        regenerate: can be set to False to prevent this option from being included
                    in regeneration.
        env_name: name of environment variable that additional values for this
                  option come from.
        type: adds type='path', to tell the regenerator that the values of
              this option need to be made relative to options.depth
docstring_summary: Add an option to the parser.
docstring_tokens: Add an option to the parser .
function: def add_option(self, *args, **kw):
      """Add an option to the parser.
  
      This accepts the same arguments as OptionParser.add_option, plus the
      following:
        regenerate: can be set to False to prevent this option from being included
                    in regeneration.
        env_name: name of environment variable that additional values for this
                  option come from.
        type: adds type='path', to tell the regenerator that the values of
              this option need to be made relative to options.depth
      """
      env_name = kw.pop('env_name', None)
      if 'dest' in kw and kw.pop('regenerate', True):
        dest = kw['dest']
  
        # The path type is needed for regenerating, for optparse we can just treat
        # it as a string.
        type = kw.get('type')
        if type == 'path':
          kw['type'] = 'string'
  
        self.__regeneratable_options[dest] = {
            'action': kw.get('action'),
            'type': type,
            'env_name': env_name,
            'opt': args[0],
          }
  
      optparse.OptionParser.add_option(self, *args, **kw)
function_tokens: def add_option ( self , * args , * * kw ) : env_name = kw . pop ( 'env_name' , None ) if 'dest' in kw and kw . pop ( 'regenerate' , True ) : dest = kw [ 'dest' ] # The path type is needed for regenerating, for optparse we can just treat # it as a string. type = kw . get ( 'type' ) if type == 'path' : kw [ 'type' ] = 'string' self . __regeneratable_options [ dest ] = { 'action' : kw . get ( 'action' ) , 'type' : type , 'env_name' : env_name , 'opt' : args [ 0 ] , } optparse . OptionParser . add_option ( self , * args , * * kw )