third_party/google_input_tools/update.py
def expand_directories(refs):
  """Expands any directory references into inputs.

  Description:
    Looks for any directories in the provided references.  Found directories
    are recursively searched for .js files.

  Args:
    refs: a list of directories.

  Returns:
    Pair of maps, where the first maps each namepace to the filename that
    provides the namespace, and the second maps a filename to prerequisite
    namespaces.
  """
  providers = {}
  requirements = {}
  for ref in refs:
    if os.path.isdir(ref):
      for (root, _, files) in os.walk(ref):
        for name in files:
          if name.endswith('js'):
            filename = os.path.join(root, name)
            provides, requires = process_file(filename)
            for p in provides:
              providers[p] = filename
            requirements[filename] = []
            for r in requires:
              requirements[filename].append(r)
  return providers, requirements
Expands any directory references into inputs.

  Description:
    Looks for any directories in the provided references.  Found directories
    are recursively searched for .js files.

  Args:
    refs: a list of directories.

  Returns:
    Pair of maps, where the first maps each namepace to the filename that
    provides the namespace, and the second maps a filename to prerequisite
    namespaces.
  
Expands any directory references into inputs.
Description:
Looks for any directories in the provided references.  Found directories
are recursively searched for .js files.
Expands any directory references into inputs . Description : Looks for any directories in the provided references . Found directories are recursively searched for . js files .
def expand_directories(refs):
  providers = {}
  requirements = {}
  for ref in refs:
    if os.path.isdir(ref):
      for (root, _, files) in os.walk(ref):
        for name in files:
          if name.endswith('js'):
            filename = os.path.join(root, name)
            provides, requires = process_file(filename)
            for p in provides:
              providers[p] = filename
            requirements[filename] = []
            for r in requires:
              requirements[filename].append(r)
  return providers, requirements
def expand_directories ( refs ) : providers = { } requirements = { } for ref in refs : if os . path . isdir ( ref ) : for ( root , _ , files ) in os . walk ( ref ) : for name in files : if name . endswith ( 'js' ) : filename = os . path . join ( root , name ) provides , requires = process_file ( filename ) for p in provides : providers [ p ] = filename requirements [ filename ] = [ ] for r in requires : requirements [ filename ] . append ( r ) return providers , requirements
Expands any directory references into inputs.
Expands any directory references into inputs .
"""Expands any directory references into inputs.

  Description:
    Looks for any directories in the provided references.  Found directories
    are recursively searched for .js files.

  Args:
    refs: a list of directories.

  Returns:
    Pair of maps, where the first maps each namepace to the filename that
    provides the namespace, and the second maps a filename to prerequisite
    namespaces.
  """
Pair of maps, where the first maps each namepace to the filename that
provides the namespace, and the second maps a filename to prerequisite
namespaces.
Pair of maps where the first maps each namepace to the filename that provides the namespace and the second maps a filename to prerequisite namespaces .
refs
a list of directories.
a list of directories .