:allowed_param: 'commentId'
777615
def get_votes_comment(self, *args, **kwargs):
        
        return bind_api(
            api=self,
            path='/comments/{commentId}/votes',
            payload_type='vote',
            payload_list=True,
            allowed_param=['commentId']
        )(*args, **kwargs)
626662
def check_user_can_send_comments(user_info, recid):
    
    # First can we find an authorization for this case, action + collection
    record_primary_collection = guess_primary_collection_of_a_record(recid)
    return acc_authorize_action(
        user_info,
        'sendcomment',
        authorized_if_no_roles=True,
        collection=record_primary_collection)
1355916
def comment_filter(comment_text):
    
    filter_func = settings.COMMENT_FILTER
    if not filter_func:
        def filter_func(s):
            return linebreaksbr(urlize(s, autoescape=True), autoescape=True)
    elif not callable(filter_func):
        filter_func = import_dotted_path(filter_func)
    return filter_func(comment_text)
472359
def comment_limiters(self, value):
        

        if value is not None:
            assert type(value) in (tuple, list), "'{0}' attribute: '{1}' type is not 'tuple' or 'list'!".format(
                "comment_limiters", value)
            for element in value:
                assert type(element) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format(
                    "comment_limiters", element)
        self.__comment_limiters = value
108516
def comment(request, template="generic/comments.html", extra_context=None):
    
    response = initial_validation(request, "comment")
    if isinstance(response, HttpResponse):
        return response
    obj, post_data = response
    form_class = import_dotted_path(settings.COMMENT_FORM_CLASS)
    form = form_class(request, obj, post_data)
    if form.is_valid():
        url = obj.get_absolute_url()
        if is_spam(request, form, url):
            return redirect(url)
        comment = form.save(request)
        response = redirect(add_cache_bypass(comment.get_absolute_url()))
        # Store commenter's details in a cookie for 90 days.
        for field in ThreadedCommentForm.cookie_fields:
            cookie_name = ThreadedCommentForm.cookie_prefix + field
            cookie_value = post_data.get(field, "")
            set_cookie(response, cookie_name, cookie_value)
        return response
    elif request.is_ajax() and form.errors:
        return HttpResponse(dumps({"errors": form.errors}))
    # Show errors with stand-alone comment form.
    context = {"obj": obj, "posted_comment_form": form}
    context.update(extra_context or {})
    return TemplateResponse(request, template, context)
650821
def check_searching_param(searching_param, allowed)
      🔞 = searching_param.keys.map(&:to_sym) - allowed.map(&:to_sym)
      raise InvalidSearchException, "Attributes #{🔞.map(&:to_s).to_sentence} doesn't exists or aren't searchables. Available searchs are: #{allowed.to_sentence}" if 🔞.any?
    end
920140
def create_request_comment(self, issue_id_or_key, body, public=True):
        
        log.warning('Creating comment...')
        data = {"body": body, "public": public}

        return self.post('rest/servicedeskapi/request/{}/comment'.format(issue_id_or_key), data=data)
1030581
def comment_check(self, params):
        """"""
    
        # Check required params for comment-check
        for required in ['blog', 'user_ip', 'user_agent']:
            if required not in params:
                raise MissingParams(required) 
    
        response = self._request('comment-check', params)
        
        if response.status is 200:
            # Read response (trimmed of whitespace)
            return response.read().strip() == "true"
            
        return False
57566
def edit
      security_transgression_unless @comment.can_be_edited_by?(@user)

      respond_to do |format|
        format.html { redirect_to @thread }
        format.js
      end
    end
1133806
def allowed_info_messages(*info_messages):
    
    def wrapper(func):
        setattr(func, ALLOWED_INFO_MESSAGES, info_messages)
        return func
    return wrapper
515368
def comment(self, format, *args):
        
        return lib.zhashx_comment(self._as_parameter_, format, *args)
286062
def comment_update(self, comment_id, body):
        
        params = {'comment[body]': body}
        return self._get('comments/{0}.json'.format(comment_id), params, 'PUT',
                         auth=True)
40947
def _invalid(m, comment=INVALID_RESPONSE, out=None):
    '''
    
    '''
    return _set_status(m, status=False, comment=comment, out=out)
900363
def itemComment(self, commentId):
        
        url = "%s/comments/%s" % (self.root, commentId)
        params = {
            "f": "json"
        }
        return self._get(url,
                            params,
                            securityHandler=self._securityHandler,
                            proxy_port=self._proxy_port,
                             proxy_url=self._proxy_url)
1194817
def allow_attribute_comments(chain, node):
    

    # TODO: find the relevant citation for why this is the correct way to comment attributes
    if isinstance(node.previous_sibling(), astroid.Assign) and \
            isinstance(node.parent, (astroid.Class, astroid.Module)) and \
            isinstance(node.value, astroid.Const) and \
            isinstance(node.value.value, BASESTRING):
        return

    chain()
728277
def commentify(value):
  
  value = comment_links(value)
  if value is None:
    return
  if len(value.split('\n')) == 1:
    return "* " + value
  else:
    return '\n'.join([' * ' + l for l in value.split('\n')[:-1]])
269267
def editComment(self, repo_user, repo_name, comment_id, body):
        
        return self.api.makeRequest(
            ["repos", repo_user, repo_name,
             "pulls", "comments", str(comment_id)],
            method="POST",
            data=dict(body=body))