parameters: (files)
return_statement: return result
docstring: Build a list of dependencies from a list of files.
  
    Description:
      Takes a list of files, extracts their provides and requires, and builds
      out a list of dependency objects.
  
    Args:
      files: a list of files to be parsed for goog.provides and goog.requires.
  
    Returns:
      A list of dependency objects, one for each file in the files argument.
docstring_summary: Build a list of dependencies from a list of files.
docstring_tokens: Build a list of dependencies from a list of files .
function: def BuildDependenciesFromFiles(files):
    """Build a list of dependencies from a list of files.
  
    Description:
      Takes a list of files, extracts their provides and requires, and builds
      out a list of dependency objects.
  
    Args:
      files: a list of files to be parsed for goog.provides and goog.requires.
  
    Returns:
      A list of dependency objects, one for each file in the files argument.
    """
    result = []
    filenames = set()
    for filename in files:
      if filename in filenames:
        continue
  
      # Python 3 requires the file encoding to be specified
      if (sys.version_info[0] < 3):
        file_handle = open(filename, 'r')
      else:
        file_handle = open(filename, 'r', encoding='utf8')
  
      try:
        dep = CreateDependencyInfo(filename, file_handle)
        result.append(dep)
      finally:
        file_handle.close()
  
      filenames.add(filename)
  
    return result
function_tokens: def BuildDependenciesFromFiles ( files ) : result = [ ] filenames = set ( ) for filename in files : if filename in filenames : continue # Python 3 requires the file encoding to be specified if ( sys . version_info [ 0 ] < 3 ) : file_handle = open ( filename , 'r' ) else : file_handle = open ( filename , 'r' , encoding = 'utf8' ) try : dep = CreateDependencyInfo ( filename , file_handle ) result . append ( dep ) finally : file_handle . close ( ) filenames . add ( filename ) return result