parameters: (args)
return_statement: return filenames
docstring: Parses the command line arguments.
  
    This may set the output format and verbosity level as side-effects.
  
    Args:
      args: The command line arguments:
  
    Returns:
      The list of filenames to lint.
docstring_summary: Parses the command line arguments.
docstring_tokens: Parses the command line arguments .
function: def ParseArguments(args):
    """Parses the command line arguments.
  
    This may set the output format and verbosity level as side-effects.
  
    Args:
      args: The command line arguments:
  
    Returns:
      The list of filenames to lint.
    """
    try:
      (opts, filenames) = getopt.getopt(args, '', ['help', 'output=', 'verbose=',
                                                   'filter='])
    except getopt.GetoptError:
      PrintUsage('Invalid arguments.')
  
    verbosity = _VerboseLevel()
    output_format = _OutputFormat()
    filters = ''
  
    for (opt, val) in opts:
      if opt == '--help':
        PrintUsage(None)
      elif opt == '--output':
        if not val in ('emacs', 'vs7'):
          PrintUsage('The only allowed output formats are emacs and vs7.')
        output_format = val
      elif opt == '--verbose':
        verbosity = int(val)
      elif opt == '--filter':
        filters = val
        if not filters:
          PrintCategories()
  
    if not filenames:
      PrintUsage('No files were specified.')
  
    _SetOutputFormat(output_format)
    _SetVerboseLevel(verbosity)
    _SetFilters(filters)
  
    return filenames
function_tokens: def ParseArguments ( args ) : try : ( opts , filenames ) = getopt . getopt ( args , '' , [ 'help' , 'output=' , 'verbose=' , 'filter=' ] ) except getopt . GetoptError : PrintUsage ( 'Invalid arguments.' ) verbosity = _VerboseLevel ( ) output_format = _OutputFormat ( ) filters = '' for ( opt , val ) in opts : if opt == '--help' : PrintUsage ( None ) elif opt == '--output' : if not val in ( 'emacs' , 'vs7' ) : PrintUsage ( 'The only allowed output formats are emacs and vs7.' ) output_format = val elif opt == '--verbose' : verbosity = int ( val ) elif opt == '--filter' : filters = val if not filters : PrintCategories ( ) if not filenames : PrintUsage ( 'No files were specified.' ) _SetOutputFormat ( output_format ) _SetVerboseLevel ( verbosity ) _SetFilters ( filters ) return filenames