]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
parser: Fix style issues
authorStephen Finucane <stephen@that.guru>
Sat, 30 Nov 2019 15:40:15 +0000 (15:40 +0000)
committerStephen Finucane <stephen@that.guru>
Sat, 30 Nov 2019 15:40:46 +0000 (15:40 +0000)
Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: 8c229caa ("Improve pull request URL matching regex")
patchwork/parser.py

index d25c0df3a6ad41c835862e0ff828ec6567edd397..c424729bb094a2dc1964ff05e529939165a9eff9 100644 (file)
@@ -937,13 +937,14 @@ def parse_patch(content):
 
 
 def parse_pull_request(content):
-    git_re = re.compile(r'^The following changes since commit.*'
-                        r'^are available in the git repository at:\n'
-                        r'^\s*([\w+-]+(?:://|@)[\w/.@:~-]+[\s\\]*[\w/._-]*)\s*$',
-                        re.DOTALL | re.MULTILINE | re.IGNORECASE)
+    git_re = re.compile(
+        r'^The following changes since commit.*'
+        r'^are available in the git repository at:\n'
+        r'^\s*([\w+-]+(?:://|@)[\w/.@:~-]+[\s\\]*[\w/._-]*)\s*$',
+        re.DOTALL | re.MULTILINE | re.IGNORECASE)
     match = git_re.search(content)
     if match:
-        return re.sub('\s+', ' ', match.group(1)).strip()
+        return re.sub(r'\s+', ' ', match.group(1)).strip()
     return None