def check_endpoint_url(url):
 substitutions = dict(zip(WHITELISTED_PROPERTIES, itertools.repeat('')))
 try:
  (url.replace('$(', '%(') % substitutions)
 except (KeyError, TypeError, ValueError):
  raise exception.URLValidationError(url)

def check_endpoint_url ( url ) : substitutions = dict ( zip ( WHITELISTED_PROPERTIES , itertools . repeat ( '' ) ) ) try : ( url . replace ( '$(' , '%(' ) % substitutions ) except ( KeyError , TypeError , ValueError ) : raise exception . URLValidationError ( url )
check substitution of url .