tools/vim/chromium.ycm_extra_conf.py
def GetNinjaBuildOutputsForSourceFile(out_dir, filename):
  """Returns a list of build outputs for filename.

  The list is generated by invoking 'ninja -t query' tool to retrieve a list of
  inputs and outputs of |filename|. This list is then filtered to only include
  .o and .obj outputs.

  Args:
    out_dir: (String) Absolute path to ninja build output directory.
    filename: (String) Absolute path to source file.

  Returns:
    (List of Strings) List of target names. Will return [] if |filename| doesn't
        yield any .o or .obj outputs.
  """
  # Ninja needs the path to the source file relative to the output build
  # directory.
  rel_filename = os.path.relpath(filename, out_dir)

  p = subprocess.Popen(
      ['ninja', '-C', out_dir, '-t', 'query', rel_filename],
      stdout=subprocess.PIPE,
      stderr=subprocess.STDOUT,
      universal_newlines=True)
  stdout, _ = p.communicate()
  if p.returncode != 0:
    return []

  # The output looks like:
  #   ../../relative/path/to/source.cc:
  #     outputs:
  #       obj/reative/path/to/target.source.o
  #       obj/some/other/target2.source.o
  #       another/target.txt
  #
  outputs_text = stdout.partition('\n  outputs:\n')[2]
  output_lines = [line.strip() for line in outputs_text.split('\n')]
  return [
      target for target in output_lines
      if target and (target.endswith('.o') or target.endswith('.obj'))
  ]
Returns a list of build outputs for filename.

  The list is generated by invoking 'ninja -t query' tool to retrieve a list of
  inputs and outputs of |filename|. This list is then filtered to only include
  .o and .obj outputs.

  Args:
    out_dir: (String) Absolute path to ninja build output directory.
    filename: (String) Absolute path to source file.

  Returns:
    (List of Strings) List of target names. Will return [] if |filename| doesn't
        yield any .o or .obj outputs.
  
Returns a list of build outputs for filename.
The list is generated by invoking 'ninja -t query' tool to retrieve a list of
inputs and outputs of |filename|. This list is then filtered to only include
.o and .obj outputs.
Returns a list of build outputs for filename . The list is generated by invoking ' ninja - t query ' tool to retrieve a list of inputs and outputs of |filename| . This list is then filtered to only include . o and . obj outputs .
def GetNinjaBuildOutputsForSourceFile(out_dir, filename):
  rel_filename = os.path.relpath(filename, out_dir)
  p = subprocess.Popen(
      ['ninja', '-C', out_dir, '-t', 'query', rel_filename],
      stdout=subprocess.PIPE,
      stderr=subprocess.STDOUT,
      universal_newlines=True)
  stdout, _ = p.communicate()
  if p.returncode != 0:
    return []
  outputs_text = stdout.partition('\n  outputs:\n')[2]
  output_lines = [line.strip() for line in outputs_text.split('\n')]
  return [
      target for target in output_lines
      if target and (target.endswith('.o') or target.endswith('.obj'))
  ]
def GetNinjaBuildOutputsForSourceFile ( out_dir , filename ) : rel_filename = os . path . relpath ( filename , out_dir ) p = subprocess . Popen ( [ 'ninja' , '-C' , out_dir , '-t' , 'query' , rel_filename ] , stdout = subprocess . PIPE , stderr = subprocess . STDOUT , universal_newlines = True ) stdout , _ = p . communicate ( ) if p . returncode != 0 : return [ ] outputs_text = stdout . partition ( '\n  outputs:\n' ) [ 2 ] output_lines = [ line . strip ( ) for line in outputs_text . split ( '\n' ) ] return [ target for target in output_lines if target and ( target . endswith ( '.o' ) or target . endswith ( '.obj' ) ) ]
Returns a list of build outputs for filename.
Returns a list of build outputs for filename .
"""Returns a list of build outputs for filename.

  The list is generated by invoking 'ninja -t query' tool to retrieve a list of
  inputs and outputs of |filename|. This list is then filtered to only include
  .o and .obj outputs.

  Args:
    out_dir: (String) Absolute path to ninja build output directory.
    filename: (String) Absolute path to source file.

  Returns:
    (List of Strings) List of target names. Will return [] if |filename| doesn't
        yield any .o or .obj outputs.
  """ # Ninja needs the path to the source file relative to the output build # directory. # The output looks like: #   ../../relative/path/to/source.cc: #     outputs: #       obj/reative/path/to/target.source.o #       obj/some/other/target2.source.o #       another/target.txt #
(List of Strings) List of target names. Will return [] if |filename| doesn't
yield any .o or .obj outputs.
( List of Strings ) List of target names . Will return [] if |filename| doesn ' t yield any . o or . obj outputs .
out_dir
(String) Absolute path to ninja build output directory.
( String ) Absolute path to ninja build output directory .
filename
(String) Absolute path to source file.
( String ) Absolute path to source file .