Show a patch.

GET /api/1.1/patches/2520/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2520,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/2520/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2520/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20200107154442.17372-2-kieran.bingham@ideasonboard.com>",
    "date": "2020-01-07T15:44:40",
    "name": "[libcamera-devel,1/2] utils: checkstyle.py: Fix regex string literal",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "a5afd4c7619037eb7c656452ea1092fe756d160b",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/2520/mbox/",
    "series": [
        {
            "id": 605,
            "url": "https://patchwork.libcamera.org/api/1.1/series/605/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=605",
            "date": "2020-01-07T15:44:39",
            "name": "utils: checkstyle: Two checkstyle fixes",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/605/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2520/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2520/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<kieran.bingham@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9BA7C605EF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  7 Jan 2020 16:44:46 +0100 (CET)",
            "from localhost.localdomain\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 371FA9CE;\n\tTue,  7 Jan 2020 16:44:46 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1578411886;\n\tbh=cQwRL5+lfvo+mMG2/AhLwvHaBrt1GDGKHK00vZYPxQQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=eBbjru6MlgHx5eUsOBQ8zE5WgBFYAeVAmbEzGhNRkSbvzYxRBDmJxtzIZsmqALrxp\n\tqESqcQ5erqjHRHx1PEArQ/3S6JPjMDnKJ6ZNS/i44VPakx4kP5x5ZJGWaPN/luhYXQ\n\tRh/94tPZS+OB3VHwXnRPl8DEyG5xzdgUt29SeMwU=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "LibCamera Devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Tue,  7 Jan 2020 15:44:40 +0000",
        "Message-Id": "<20200107154442.17372-2-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20200107154442.17372-1-kieran.bingham@ideasonboard.com>",
        "References": "<20200107154442.17372-1-kieran.bingham@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 1/2] utils: checkstyle.py: Fix regex\n\tstring literal",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "X-List-Received-Date": "Tue, 07 Jan 2020 15:44:46 -0000"
    },
    "content": "The checkstyle.py patch has a fault which it identified in itself when\nupdating the regex string.\n\n  --- utils/checkstyle.py\n  +++ utils/checkstyle.py\n  #105: : W605 invalid escape sequence '\\+'\n  +    diff_header_regex = re.compile('@@ -([0-9]+)(,[0-9]+)? \\+([0-9]+)(,?[0-9]+)? @@')\n  ---\n  1 potential style issue detected, please review\n\nThis is documented further at:\n  https://www.flake8rules.com/rules/W605.html\n\nUpdate the string literal prefix to declare a raw byte string for the\nregex parser.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n utils/checkstyle.py | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/utils/checkstyle.py b/utils/checkstyle.py\nindex 335e58f5fddf..41cd3371e81e 100755\n--- a/utils/checkstyle.py\n+++ b/utils/checkstyle.py\n@@ -102,7 +102,7 @@ class DiffHunkSide(object):\n \n \n class DiffHunk(object):\n-    diff_header_regex = re.compile('@@ -([0-9]+),([0-9]+) \\+([0-9]+),([0-9]+) @@')\n+    diff_header_regex = re.compile(r'@@ -([0-9]+),([0-9]+) \\+([0-9]+),([0-9]+) @@')\n \n     def __init__(self, line):\n         match = DiffHunk.diff_header_regex.match(line)\n",
    "prefixes": [
        "libcamera-devel",
        "1/2"
    ]
}