parameters: (ianaZones, ianaLinks, icuZones, icuLinks)
return_statement: return sorted(result, key=itemgetter(0))
docstring: Find incorrect ICU link entries.
docstring_summary: Find incorrect ICU link entries.
docstring_tokens: Find incorrect ICU link entries .
function: def findIncorrectICULinks(ianaZones, ianaLinks, icuZones, icuLinks):
      """ Find incorrect ICU link entries. """
      isIANATimeZone = lambda zone: zone in ianaZones or zone in ianaLinks
      isICUTimeZone = lambda zone: zone in icuZones or zone in icuLinks
      isICULink = lambda zone: zone in icuLinks
      isICUZone = lambda zone: zone in icuZones
  
      # All links should be present in ICU.
      missingTimeZones = [zone for zone in ianaLinks.iterkeys() if not isICUTimeZone(zone)]
      if missingTimeZones:
          raise RuntimeError("Not all zones are present in ICU, did you forget "
                             "to run intl/update-tzdata.sh? %s" % missingTimeZones)
  
      # Links which are only present in ICU?
      additionalTimeZones = [zone for zone in icuLinks.iterkeys() if not isIANATimeZone(zone)]
      if additionalTimeZones:
          raise RuntimeError("Additional links present in ICU, did you forget "
                             "to run intl/update-tzdata.sh? %s" % additionalTimeZones)
  
      result = chain(
          # IANA links which have a different target in ICU.
          ((zone, target, icuLinks[zone]) for (zone, target) in ianaLinks.iteritems() if isICULink(zone) and target != icuLinks[zone]),
  
          # IANA links which are zones in ICU.
          ((zone, target, zone.name) for (zone, target) in ianaLinks.iteritems() if isICUZone(zone))
      )
  
      # Remove unnecessary UTC mappings.
      utcnames = ["Etc/UTC", "Etc/UCT", "Etc/GMT"]
      result = ifilterfalse(lambda (zone, target, icuTarget): target in utcnames and icuTarget in utcnames, result)
  
      return sorted(result, key=itemgetter(0))
function_tokens: def findIncorrectICULinks ( ianaZones , ianaLinks , icuZones , icuLinks ) : isIANATimeZone = lambda zone : zone in ianaZones or zone in ianaLinks isICUTimeZone = lambda zone : zone in icuZones or zone in icuLinks isICULink = lambda zone : zone in icuLinks isICUZone = lambda zone : zone in icuZones # All links should be present in ICU. missingTimeZones = [ zone for zone in ianaLinks . iterkeys ( ) if not isICUTimeZone ( zone ) ] if missingTimeZones : raise RuntimeError ( "Not all zones are present in ICU, did you forget " "to run intl/update-tzdata.sh? %s" % missingTimeZones ) # Links which are only present in ICU? additionalTimeZones = [ zone for zone in icuLinks . iterkeys ( ) if not isIANATimeZone ( zone ) ] if additionalTimeZones : raise RuntimeError ( "Additional links present in ICU, did you forget " "to run intl/update-tzdata.sh? %s" % additionalTimeZones ) result = chain ( # IANA links which have a different target in ICU. ( ( zone , target , icuLinks [ zone ] ) for ( zone , target ) in ianaLinks . iteritems ( ) if isICULink ( zone ) and target != icuLinks [ zone ] ) , # IANA links which are zones in ICU. ( ( zone , target , zone . name ) for ( zone , target ) in ianaLinks . iteritems ( ) if isICUZone ( zone ) ) ) # Remove unnecessary UTC mappings. utcnames = [ "Etc/UTC" , "Etc/UCT" , "Etc/GMT" ] result = ifilterfalse ( lambda ( zone , target , icuTarget ) : target in utcnames and icuTarget in utcnames , result ) return sorted ( result , key = itemgetter ( 0 ) )