mojo/public/tools/mojom/check_stable_mojom_compatibility.py
def Run(command_line, delta=None):
  """Runs the tool with the given command_line. Normally this will read the
  change description from stdin as a JSON-encoded list, but tests may pass a
  delta directly for convenience."""
  arg_parser = argparse.ArgumentParser(
      description='Verifies backward-compatibility of mojom type changes.',
      epilog="""
This tool reads a change description from stdin and verifies that all modified
[Stable] mojom types will retain backward-compatibility. The change description
must be a JSON-encoded list of objects, each with a "filename" key (path to a
changed mojom file, relative to ROOT); an "old" key whose value is a string of
the full file contents before the change, or null if the file is being added;
and a "new" key whose value is a string of the full file contents after the
change, or null if the file is being deleted.""")
  arg_parser.add_argument(
      '--src-root',
      required=True,
      action='store',
      metavar='ROOT',
      help='The root of the source tree in which the checked mojoms live.')

  args, _ = arg_parser.parse_known_args(command_line)
  if not delta:
    delta = json.load(sys.stdin)
  _ValidateDelta(args.src_root, delta)
Runs the tool with the given command_line. Normally this will read the
  change description from stdin as a JSON-encoded list, but tests may pass a
  delta directly for convenience.
Runs the tool with the given command_line. Normally this will read the
change description from stdin as a JSON-encoded list, but tests may pass a
delta directly for convenience.
Runs the tool with the given command_line . Normally this will read the change description from stdin as a JSON - encoded list but tests may pass a delta directly for convenience .
def Run(command_line, delta=None):
  arg_parser = argparse.ArgumentParser(
      description='Verifies backward-compatibility of mojom type changes.',
      epilog="""
This tool reads a change description from stdin and verifies that all modified
[Stable] mojom types will retain backward-compatibility. The change description
must be a JSON-encoded list of objects, each with a "filename" key (path to a
changed mojom file, relative to ROOT); an "old" key whose value is a string of
the full file contents before the change, or null if the file is being added;
and a "new" key whose value is a string of the full file contents after the
change, or null if the file is being deleted.""")
  arg_parser.add_argument(
      '--src-root',
      required=True,
      action='store',
      metavar='ROOT',
      help='The root of the source tree in which the checked mojoms live.')
  args, _ = arg_parser.parse_known_args(command_line)
  if not delta:
    delta = json.load(sys.stdin)
  _ValidateDelta(args.src_root, delta)
def Run ( command_line , delta = None ) : arg_parser = argparse . ArgumentParser ( description = 'Verifies backward-compatibility of mojom type changes.' , epilog = """
This tool reads a change description from stdin and verifies that all modified
[Stable] mojom types will retain backward-compatibility. The change description
must be a JSON-encoded list of objects, each with a "filename" key (path to a
changed mojom file, relative to ROOT); an "old" key whose value is a string of
the full file contents before the change, or null if the file is being added;
and a "new" key whose value is a string of the full file contents after the
change, or null if the file is being deleted.""" ) arg_parser . add_argument ( '--src-root' , required = True , action = 'store' , metavar = 'ROOT' , help = 'The root of the source tree in which the checked mojoms live.' ) args , _ = arg_parser . parse_known_args ( command_line ) if not delta : delta = json . load ( sys . stdin ) _ValidateDelta ( args . src_root , delta )
Runs the tool with the given command_line.
Runs the tool with the given command_line .
"""Runs the tool with the given command_line. Normally this will read the
  change description from stdin as a JSON-encoded list, but tests may pass a
  delta directly for convenience."""
command_line
delta