(files)
return result
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.
Build a list of dependencies from a list of files.
Build a list of dependencies from a list of files .
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
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