third_party/metrics_proto/PRESUBMIT.py
def CheckChange(input_api, output_api):
  """Checks that all changes include a README update."""
  paths = [af.AbsoluteLocalPath() for af in input_api.AffectedFiles()]
  if (any((IsMetricsProtoPath(input_api, p) for p in paths)) and not any(
      (IsReadmeFile(input_api, p) or IsPresubmitFile(input_api, p)
       for p in paths))):
    return [output_api.PresubmitError(
            'Modifies %s without updating %s. '
            'Changes to these files should originate upstream.' %
            (input_api.PresubmitLocalPath(), README))]
  return []
Checks that all changes include a README update.
Checks that all changes include a README update.
Checks that all changes include a README update .
def CheckChange(input_api, output_api):
  paths = [af.AbsoluteLocalPath() for af in input_api.AffectedFiles()]
  if (any((IsMetricsProtoPath(input_api, p) for p in paths)) and not any(
      (IsReadmeFile(input_api, p) or IsPresubmitFile(input_api, p)
       for p in paths))):
    return [output_api.PresubmitError(
            'Modifies %s without updating %s. '
            'Changes to these files should originate upstream.' %
            (input_api.PresubmitLocalPath(), README))]
  return []
def CheckChange ( input_api , output_api ) : paths = [ af . AbsoluteLocalPath ( ) for af in input_api . AffectedFiles ( ) ] if ( any ( ( IsMetricsProtoPath ( input_api , p ) for p in paths ) ) and not any ( ( IsReadmeFile ( input_api , p ) or IsPresubmitFile ( input_api , p ) for p in paths ) ) ) : return [ output_api . PresubmitError ( 'Modifies %s without updating %s. ' 'Changes to these files should originate upstream.' % ( input_api . PresubmitLocalPath ( ) , README ) ) ] return [ ]
Checks that all changes include a README update.
Checks that all changes include a README update .
"""Checks that all changes include a README update."""
input_api
output_api