Remove comments.

    Remove comments by id as given in second column of: marv comment list
327291
def marvcli_comment_rm(ids):
    
    app = create_app()
    db.session.query(Comment)\
              .filter(Comment.id.in_(ids))\
              .delete(synchronize_session=False)
    db.session.commit()
1033706
def delete(self, comment_id, issue_id=None, repo_slug=None):
        
        issue_id = issue_id or self.issue_id
        repo_slug = repo_slug or self.bitbucket.repo_slug or ''
        url = self.bitbucket.url('DELETE_COMMENT',
                                 username=self.bitbucket.username,
                                 repo_slug=repo_slug,
                                 issue_id=issue_id,
                                 comment_id=comment_id)
        return self.bitbucket.dispatch('DELETE', url, auth=self.bitbucket.auth)
37224
def comment_delete(self, comment_id):
        
        return self._get('comments/{0}.json'.format(comment_id),
                         method='DELETE', auth=True)
133231
public function removeComment($id, $commentId)
    {
        return $this->delete($this->getPath($id).'/comments/'.rawurlencode($commentId));
    }
761941
def _strip_comments(line):
        
        if line == '':
            return line
        r = re.search('(?P<line>[^#]*)(#(?P<comment>.*))?', line)
        if r:
            line = r.group('line')
            if not line.endswith('\n'):
                line += '\n'
            return line
        return '\n'
692202
def remove_topic(self, topic_id):
        
        comment_start = 0
        while comment_start is not None:
            comments = self.list_comments(topic_id, comment_start)
            for comment in comments['results']:
                self.remove_comment(topic_id, comment['id'])
            comment_start = comments['next_start']
        return self.api.req(API_GROUP_REMOVE_TOPIC % topic_id, params={'ck': self.api.ck()})
971574
def leave_a_comment thing_id, text
      Module.nesting[1].logger.warn "leaving a comment on '#{thing_id}'"
      json(:post, "/api/comment",
        thing_id: thing_id,
        text: text,
      ).tap do |result|
        fail result["json"]["errors"].to_s unless result["json"]["errors"].empty?
      end
    end
801458
public Comment removeComment(final long commentId) {
        Comment removedComment = null;

        if (comments != null) {
            for (int index = comments.size() - 1; index >= 0; --index) {
                Comment currentComment = comments.get(index);

                if (currentComment.getId() == commentId) {
                    removedComment = comments.remove(index);
                    break;
                }
            }
        }

        return removedComment;
    }
1074003
public function deleteComment(int $id): bool
    {
        $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues/comments/:id',
            $this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $id), Request::METHOD_DELETE);

        if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
            return true;
        }

        return false;
    }
556591
function stripComments(token) {
  return strip

  /* Strip comments. */
  function strip(value) {
    var index = value.indexOf(token)

    if (index !== -1) {
      value = value.substr(0, index)
    }

    return value
  }
}
1368667
def help_center_article_comment_delete(self, article_id, id, **kwargs):
        ""
        api_path = "/api/v2/help_center/articles/{article_id}/comments/{id}.json"
        api_path = api_path.format(article_id=article_id, id=id)
        return self.call(api_path, method="DELETE", **kwargs)
432149
def delete_comment(self, *args, **kwargs):
        
        return bind_api(
            api=self,
            path='/comments/{commentId}/delete',
            method='DELETE',
            payload_type='comment',
            allowed_param=['commentId']
        )(*args, **kwargs)
617357
def replace_with(self, other):
        
        match_ids_to_delete = list(self.update_matches(other))
        TextLogErrorMatch.objects.filter(id__in=match_ids_to_delete).delete()

        # Update best classifications
        self.best_for_errors.update(best_classification=other)

        self.delete()
200343
def remove_this_opinion(self,opinion_id):
        
        for opi in self.get_opinions():
            if opi.get_id() == opinion_id:
                self.node.remove(opi.get_node())
                break
661290
def delete_conversations(self, ids):
        

        str_ids = self._return_comma_list(ids)
        self.request('ConvAction', {'action': {'op': 'delete',
                                               'id': str_ids
                                               }})
389381
def _remove_single_line_import_comments(r):
    """"""
    logging.info('Removing single line import comments')
    import_r, remaining_r = split_by_last_import(r)
    new_import_r = redbaron.NodeList()
    for i, v in enumerate(import_r):
        if 1 < i < len(import_r) - 2:
            if not (
                import_r[i - 2].type != 'comment'
                and v.type == 'comment'
                and import_r[i + 2].type != 'comment'
            ) or _is_keep_comment(v):
                new_import_r.append(v)
        else:
            new_import_r.append(v)
    return new_import_r + remaining_r
101940
def remove_sid2uid(self, sid, uid):
        
        self.remove('uid2sid', uid, sid)
        self.remove('sid2uid', sid, uid)