def _ValidateSourcesForMSVSProject(spec, version):
  """Makes sure if duplicate basenames are not specified in the source list.

  Arguments:
    spec: The target dictionary containing the properties of the target.
    version: The VisualStudioVersion object.
  """
  # This validation should not be applied to MSVC2010 and later.
  assert not version.UsesVcxproj()

  # TODO: Check if MSVC allows this for loadable_module targets.
  if ('static_library', 'shared_library') not in spec.get('type', None):
    return
  sources = spec.get('sources', [])
  basenames = {}
  for source in sources:
    name, ext = os.path.splitext(source)
    is_compiled_file = ext in [
        '.c', '.cc', '.cpp', '.cxx', '.m', '.mm', '.s', '.S']
    if not is_compiled_file:
      continue
    basename = os.path.basename(name)  # Don't include extension.
    basenames.setdefault(basename, []).append(source)

  error = ''
  for basename, files in basenames.iteritems():
    if len(files) > 1:
      error += '  %s: %s\n' % (basename, ' '.join(files))

  if error:
    print('static library %s has several files with the same basename:\n' %
          spec['target_name'] + error + 'MSVC08 cannot handle that.')
    raise GypError('Duplicate basenames in sources section, see list above')
dataset/ETHPy150Open adblockplus/gyp/pylib/gyp/generator/msvs.py/_ValidateSourcesForMSVSProject/swapped operands of `not in`