(targets)
Remove self dependencies from targets that have the prune_self_dependency
  variable set.
Remove self dependencies from targets that have the prune_self_dependency
  variable set.
Remove self dependencies from targets that have the prune_self_dependency variable set .
def RemoveSelfDependencies(targets):
  """Remove self dependencies from targets that have the prune_self_dependency
  variable set."""
  for target_name, target_dict in targets.items():
    for dependency_key in dependency_sections:
      dependencies = target_dict.get(dependency_key, [])
      if dependencies:
        for t in dependencies:
          if t == target_name:
            if targets[t].get('variables', {}).get('prune_self_dependency', 0):
              target_dict[dependency_key] = Filter(dependencies, target_name)
def RemoveSelfDependencies ( targets ) : for target_name , target_dict in targets . items ( ) : for dependency_key in dependency_sections : dependencies = target_dict . get ( dependency_key , [ ] ) if dependencies : for t in dependencies : if t == target_name : if targets [ t ] . get ( 'variables' , { } ) . get ( 'prune_self_dependency' , 0 ) : target_dict [ dependency_key ] = Filter ( dependencies , target_name )