def http_role(role, rawtext, text, linenum, inliner, options={}, content=[]):
    try:
        status_code = int(text)

        if status_code not in HTTP_STATUS_CODES:
            raise ValueError
    except ValueError:
        msg = inliner.reporter.error(
            'HTTP status code must be a valid HTTP status; '
            '"%s" is invalid.' % text,
            line=linenum)
        prb = inliner.problematic(rawtext, rawtext, msg)
        return [prb], [msg]

    http_status_codes_url = \
        inliner.document.settings.env.config.http_status_codes_url

    if not http_status_codes_url or '%s' not in http_status_codes_url:
        msg = inliner.reporter.error('http_status_codes_url must be '
                                     'configured.',
                                     line=linenum)
        prb = inliner.problematic(rawtext, rawtext, msg)
        return [prb], [msg]

    ref = status_code % http_status_codes_url
    status_code_text = 'HTTP %s %s' % (status_code,
                                       HTTP_STATUS_CODES[status_code])
    node = nodes.reference(rawtext, status_code_text, refuri=ref, **options)

    return [node], []
dataset/ETHPy150Open reviewboard/reviewboard/docs/manual/_ext/httprole.py/http_role/swapped operands of `%`