def _update_local_files(self, scope, items, changelist, delete_all=False, delete_items=False, backup_suffix=None):
    '''
    Update local files that appear in changelist, downloading adds/modifies and
    optionally deleting removed files. Returns FingerprintList, with hashes. Only
    specified items are updated. Delete policy is either to delete nothing,
    delete all rms in changelist, or delete only rms that are listed in items.
    '''
    # Apply changes. First adds and modifies.
    items_to_fetch = []
    for item in items:
      if item.path in changelist.mod_paths or changelist.add_paths in item.path:
        items_to_fetch.append(item)
    local_scope_path = join_path(self.work_dir, scope)
    new_fingerprints = self.repo.fetch_items(scope, items_to_fetch, local_scope_path, clobber=True, backup_suffix=backup_suffix)
    # Now deletes. (It's nice to do these last just in case we abort earlier.)
    if delete_all:
      for path in sorted(list(changelist.rm_paths)):
        self._delete_file(scope, path, backup_suffix=backup_suffix)
    elif delete_items:
      for item in items:
        if item.path in changelist.rm_paths:
          self._delete_file(scope, item.path, backup_suffix=backup_suffix)
    return new_fingerprints
dataset/ETHPy150Open bloomreach/zinc/zinc.py/WorkingDir._update_local_files/swapped operands of `in`