aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2019-11-30 15:40:15 +0000
committerStephen Finucane <stephen@that.guru>2019-11-30 15:40:46 +0000
commit3ed6a1434dd90f073f5db5a6e85a80469aaaed40 (patch)
treedebdfc621a1170f963bd0b4110ccc5d80fdd9dae
parentf97f984ecf7b60690071fbbb7de356147a3f8764 (diff)
downloadpatchwork-3ed6a1434dd90f073f5db5a6e85a80469aaaed40.tar
patchwork-3ed6a1434dd90f073f5db5a6e85a80469aaaed40.tar.gz
parser: Fix style issues
Signed-off-by: Stephen Finucane <stephen@that.guru> Fixes: 8c229caa ("Improve pull request URL matching regex")
-rw-r--r--patchwork/parser.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/patchwork/parser.py b/patchwork/parser.py
index d25c0df..c424729 100644
--- a/patchwork/parser.py
+++ b/patchwork/parser.py
@@ -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