def _check_dep_visibility(target, dep, targets):
 if (dep not in targets):
  console.error_exit(('Target %s:%s depends on %s:%s, but it is missing, exit...' % (target_id[0], target_id[1], dep[0], dep[1])))
 if (target[0] == dep[0]):
  return
 d = targets[dep]
 visibility = getattr(d, 'visibility', 'PUBLIC')
 if (visibility == 'PUBLIC'):
  return
 if (target not in visibility):
  console.error_exit(('%s:%s is not allowed to depend on %s because of visibility.' % (target[0], target[1], d.fullname)))

def _check_dep_visibility ( target , dep , targets ) : if ( dep not in targets ) : console . error_exit ( ( 'Target %s:%s depends on %s:%s, but it is missing, exit...' % ( target_id [ 0 ] , target_id [ 1 ] , dep [ 0 ] , dep [ 1 ] ) ) ) if ( target [ 0 ] == dep [ 0 ] ) : return d = targets [ dep ] visibility = getattr ( d , 'visibility' , 'PUBLIC' ) if ( visibility == 'PUBLIC' ) : return if ( target not in visibility ) : console . error_exit ( ( '%s:%s is not allowed to depend on %s because of visibility.' % ( target [ 0 ] , target [ 1 ] , d . fullname ) ) )
check whether target is able to depend on dep .