diff options
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/lib/patchtest/tests/base.py | 4 | ||||
| -rw-r--r-- | meta/lib/patchtest/utils.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/meta/lib/patchtest/tests/base.py b/meta/lib/patchtest/tests/base.py index aecbbc4aae..424e61b5be 100644 --- a/meta/lib/patchtest/tests/base.py +++ b/meta/lib/patchtest/tests/base.py | |||
| @@ -34,8 +34,8 @@ class PatchtestOEError(Exception): | |||
| 34 | class Base(unittest.TestCase): | 34 | class Base(unittest.TestCase): |
| 35 | # if unit test fails, fail message will throw at least the following JSON: {"id": <testid>} | 35 | # if unit test fails, fail message will throw at least the following JSON: {"id": <testid>} |
| 36 | 36 | ||
| 37 | endcommit_messages_regex = re.compile('\(From \w+-\w+ rev:|(?<!\S)Signed-off-by|(?<!\S)---\n') | 37 | endcommit_messages_regex = re.compile(r'\(From \w+-\w+ rev:|(?<!\S)Signed-off-by|(?<!\S)---\n') |
| 38 | patchmetadata_regex = re.compile('-{3} \S+|\+{3} \S+|@{2} -\d+,\d+ \+\d+,\d+ @{2} \S+') | 38 | patchmetadata_regex = re.compile(r'-{3} \S+|\+{3} \S+|@{2} -\d+,\d+ \+\d+,\d+ @{2} \S+') |
| 39 | 39 | ||
| 40 | 40 | ||
| 41 | @staticmethod | 41 | @staticmethod |
diff --git a/meta/lib/patchtest/utils.py b/meta/lib/patchtest/utils.py index a4a523b4e2..dd0abc22d9 100644 --- a/meta/lib/patchtest/utils.py +++ b/meta/lib/patchtest/utils.py | |||
| @@ -132,7 +132,7 @@ def get_subject_prefix(path): | |||
| 132 | if len(mbox): | 132 | if len(mbox): |
| 133 | subject = mbox[0]['subject'] | 133 | subject = mbox[0]['subject'] |
| 134 | if subject: | 134 | if subject: |
| 135 | pattern = re.compile("(\[.*\])", re.DOTALL) | 135 | pattern = re.compile(r"(\[.*\])", re.DOTALL) |
| 136 | match = pattern.search(subject) | 136 | match = pattern.search(subject) |
| 137 | if match: | 137 | if match: |
| 138 | prefix = match.group(1) | 138 | prefix = match.group(1) |
| @@ -146,8 +146,8 @@ def valid_branch(branch): | |||
| 146 | invalid = lbranch.startswith('patch') or \ | 146 | invalid = lbranch.startswith('patch') or \ |
| 147 | lbranch.startswith('rfc') or \ | 147 | lbranch.startswith('rfc') or \ |
| 148 | lbranch.startswith('resend') or \ | 148 | lbranch.startswith('resend') or \ |
| 149 | re.search('^v\d+', lbranch) or \ | 149 | re.search(r'^v\d+', lbranch) or \ |
| 150 | re.search('^\d+/\d+', lbranch) | 150 | re.search(r'^\d+/\d+', lbranch) |
| 151 | 151 | ||
| 152 | return not invalid | 152 | return not invalid |
| 153 | 153 | ||
