From 67142e78dec904efcebe6be54fcb7acd876d7127 Mon Sep 17 00:00:00 2001 From: pederhan Date: Mon, 29 Jul 2024 11:16:37 +0200 Subject: [PATCH] Expand match group explanations --- ci/diff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/diff.py b/ci/diff.py index 4231882..e71e29c 100644 --- a/ci/diff.py +++ b/ci/diff.py @@ -66,8 +66,8 @@ def unquote_url(match: re.Match[str]) -> str: def replace_url_id(match: re.Match[str]) -> str: """Replace the final number (ID) in a URL with a placeholder.""" - # match.group(1) contains the part before the separator - # match.group(2) contains the separator + # match.group(1) contains the part before the separator (`"url": "/api/...`) + # match.group(2) contains the separator (/ or =) # match.group(3) contains the number we want to replace # match.group(4) contains the closing double quote return f"{match.group(1)}{match.group(2)}{match.group(4)}"