parameters: (c)
return_statement: return desc
docstring: Descripe what type of value is expected for the given config item
docstring_summary: Descripe what type of value is expected for the given config item
docstring_tokens: Descripe what type of value is expected for the given config item
function: def typedesc(c):
      '''Descripe what type of value is expected for the given config item'''
      checks = c.flags
      cmin = str(checks.get('min', ''))
      cmax = str(checks.get('max', ''))
      choices = checks.get('choices', [])
      ctype = gettype(c)
      desc = {
          'boolean' : 'a boolean flag',
          'format'  : 'a format string',
          'int'     : 'an integer',
          'list'    : 'a list',
          'category': 'a set of related configuration options defined below',
          'string'  : 'a string'}[ctype]
      if cmin and cmax:
          desc += ' between ' + cmin + ' and ' + cmax
      elif cmin:
          desc += ' greater than or equal to ' + cmin
      elif cmax:
          desc += ' no more than ' + cmax
      if choices:
          if ctype == 'list':
              desc += ', with values chosen from the following options: '
          else:
              desc += ', chosen from the following options: '
          desc += ', '.join('\\c "' + c + '"' for c in choices)
      elif ctype == 'list':
          desc += ' of strings'
      return desc
function_tokens: def typedesc ( c ) : checks = c . flags cmin = str ( checks . get ( 'min' , '' ) ) cmax = str ( checks . get ( 'max' , '' ) ) choices = checks . get ( 'choices' , [ ] ) ctype = gettype ( c ) desc = { 'boolean' : 'a boolean flag' , 'format' : 'a format string' , 'int' : 'an integer' , 'list' : 'a list' , 'category' : 'a set of related configuration options defined below' , 'string' : 'a string' } [ ctype ] if cmin and cmax : desc += ' between ' + cmin + ' and ' + cmax elif cmin : desc += ' greater than or equal to ' + cmin elif cmax : desc += ' no more than ' + cmax if choices : if ctype == 'list' : desc += ', with values chosen from the following options: ' else : desc += ', chosen from the following options: ' desc += ', ' . join ( '\\c "' + c + '"' for c in choices ) elif ctype == 'list' : desc += ' of strings' return desc