

def get_renderers_for_request(self, request=None):
    "\n        Inspects a Flask :class:`~flask.Request` for hints regarding what renderer to use.\n\n        This is found out by first looking in the query string argument named after :attr:`~format_arg_name` (``format`` by default), and then matching the contents of the Accept:-header. If nothing is found anyway, then :attr:`~default_renderer` is used.\n\n        .. note::\n           If the query string argument is specified but doesn't exist (or fails), then the request fails immediately, without trying the other methods.\n\n        :param request: The request to be inspected (defaults to :obj:`flask.request`)\n        :returns: List of matching renderers, in order of user preference\n        "
    if (request is None):
        request = current_request
    if (self.format_arg_name in request.args):
        renderer_name = request.args[self.format_arg_name]
        if (renderer_name in self.named_renderers):
            return [self.named_renderers[renderer_name]]
        else:
            return []
    matching_renderers = [self.mime_type_renderers[request] for mime_type in request.accept_mimetypes.itervalues() if (mime_type in self.mime_type_renderers)]
    if self.default_renderer:
        matching_renderers.append(self.default_renderer)
    return matching_renderers

dataset/ETHPy150Open teozkr/Flask-Pushrod/flask_pushrod/resolver.py Pushrod.get_renderers_for_request/VarMisuse@93/378 `mime_type`->`request`