components/sync/PRESUBMIT.py
def CheckRootTagMatchesModelType(output_api, map_entry):
  """Check that map_entry's root tag matches ModelType.
  Args:
    output_api: presubmit_support OutputAPI instance
    map_entry: ModelTypeEnumEntry object to check
  Returns:
    A list of PresubmitError objects for each violation
  """
  expected_root_tag = map_entry.model_type.lower()
  if (StripTrailingS(expected_root_tag) !=
    StripTrailingS(map_entry.root_tag)):
    return [
      FormatPresubmitError(
        output_api,'root tag "%s" does not match model type. It should'
        'be "%s"' % (map_entry.root_tag, expected_root_tag),
        map_entry.affected_lines)]
  return []
Check that map_entry's root tag matches ModelType.
  Args:
    output_api: presubmit_support OutputAPI instance
    map_entry: ModelTypeEnumEntry object to check
  Returns:
    A list of PresubmitError objects for each violation
  
Check that map_entry's root tag matches ModelType.
Check that map_entry ' s root tag matches ModelType .
def CheckRootTagMatchesModelType(output_api, map_entry):
  expected_root_tag = map_entry.model_type.lower()
  if (StripTrailingS(expected_root_tag) !=
    StripTrailingS(map_entry.root_tag)):
    return [
      FormatPresubmitError(
        output_api,'root tag "%s" does not match model type. It should'
        'be "%s"' % (map_entry.root_tag, expected_root_tag),
        map_entry.affected_lines)]
  return []
def CheckRootTagMatchesModelType ( output_api , map_entry ) : expected_root_tag = map_entry . model_type . lower ( ) if ( StripTrailingS ( expected_root_tag ) != StripTrailingS ( map_entry . root_tag ) ) : return [ FormatPresubmitError ( output_api , 'root tag "%s" does not match model type. It should' 'be "%s"' % ( map_entry . root_tag , expected_root_tag ) , map_entry . affected_lines ) ] return [ ]
Check that map_entry's root tag matches ModelType.
Check that map_entry ' s root tag matches ModelType .
"""Check that map_entry's root tag matches ModelType.
  Args:
    output_api: presubmit_support OutputAPI instance
    map_entry: ModelTypeEnumEntry object to check
  Returns:
    A list of PresubmitError objects for each violation
  """
A list of PresubmitError objects for each violation
A list of PresubmitError objects for each violation
output_api
presubmit_support OutputAPI instance
presubmit_support OutputAPI instance
map_entry
ModelTypeEnumEntry object to check
ModelTypeEnumEntry object to check