testing/variations/PRESUBMIT.py
def CheckPretty(contents, file_path, message_type):
  """Validates the pretty printing of fieldtrial configuration.

  Args:
    contents: File contents as a string.
    file_path: String representing the path to the JSON file.
    message_type: Type of message from |output_api| to return in the case of
      errors/warnings.

  Returns:
    A list of |message_type| messages. In the case of all tests passing with no
    warnings/errors, this will return [].
  """
  pretty = PrettyPrint(contents)
  if contents != pretty:
    return [
        message_type('Pretty printing error: Run '
                     'python3 testing/variations/PRESUBMIT.py %s' % file_path)
    ]
  return []
Validates the pretty printing of fieldtrial configuration.

  Args:
    contents: File contents as a string.
    file_path: String representing the path to the JSON file.
    message_type: Type of message from |output_api| to return in the case of
      errors/warnings.

  Returns:
    A list of |message_type| messages. In the case of all tests passing with no
    warnings/errors, this will return [].
  
Validates the pretty printing of fieldtrial configuration.
Validates the pretty printing of fieldtrial configuration .
def CheckPretty(contents, file_path, message_type):
  pretty = PrettyPrint(contents)
  if contents != pretty:
    return [
        message_type('Pretty printing error: Run '
                     'python3 testing/variations/PRESUBMIT.py %s' % file_path)
    ]
  return []
def CheckPretty ( contents , file_path , message_type ) : pretty = PrettyPrint ( contents ) if contents != pretty : return [ message_type ( 'Pretty printing error: Run ' 'python3 testing/variations/PRESUBMIT.py %s' % file_path ) ] return [ ]
Validates the pretty printing of fieldtrial configuration.
Validates the pretty printing of fieldtrial configuration .
"""Validates the pretty printing of fieldtrial configuration.

  Args:
    contents: File contents as a string.
    file_path: String representing the path to the JSON file.
    message_type: Type of message from |output_api| to return in the case of
      errors/warnings.

  Returns:
    A list of |message_type| messages. In the case of all tests passing with no
    warnings/errors, this will return [].
  """
A list of |message_type| messages. In the case of all tests passing with no
warnings/errors, this will return [].
A list of |message_type| messages . In the case of all tests passing with no warnings / errors this will return [] .
contents
File contents as a string.
File contents as a string .
file_path
String representing the path to the JSON file.
String representing the path to the JSON file .
message_type
Type of message from |output_api| to return in the case of
errors/warnings.
Type of message from |output_api| to return in the case of errors / warnings .