def _CanBreakBefore(prev_token, cur_token):
 pval = prev_token.value
 cval = cur_token.value
 if py3compat.PY3:
  if ((pval == 'yield') and (cval == 'from')):
   return False
  if ((pval in {'async', 'await'}) and (cval in {'def', 'with', 'for'})):
   return False
 if (cur_token.split_penalty >= split_penalty.UNBREAKABLE):
  return False
 if (pval == '@'):
  return False
 if (cval == ':'):
  return False
 if (cval == ','):
  return False
 if (prev_token.is_name and (cval == '(')):
  return False
 if (prev_token.is_name and (cval == '[')):
  return False
 if (prev_token.is_name and (cval == '.')):
  return False
 if (cur_token.is_comment and (prev_token.lineno == cur_token.lineno)):
  return False
 if (format_token.Subtype.UNARY_OPERATOR in prev_token.subtypes):
  return False
 return True

def _CanBreakBefore ( prev_token , cur_token ) : pval = prev_token . value cval = cur_token . value if py3compat . PY3 : if ( ( pval == 'yield' ) and ( cval == 'from' ) ) : return False if ( ( pval in { 'async' , 'await' } ) and ( cval in { 'def' , 'with' , 'for' } ) ) : return False if ( cur_token . split_penalty >= split_penalty . UNBREAKABLE ) : return False if ( pval == '@' ) : return False if ( cval == ':' ) : return False if ( cval == ',' ) : return False if ( prev_token . is_name and ( cval == '(' ) ) : return False if ( prev_token . is_name and ( cval == '[' ) ) : return False if ( prev_token . is_name and ( cval == '.' ) ) : return False if ( cur_token . is_comment and ( prev_token . lineno == cur_token . lineno ) ) : return False if ( format_token . Subtype . UNARY_OPERATOR in prev_token . subtypes ) : return False return True
return true if a line break may occur before the current token .