Skip to content

Commit 3e6c7c2

Browse files
m-kuhn3nids
andauthoredMay 6, 2020
Apply suggestions from code review
Co-authored-by: Denis Rouzaud <denis.rouzaud@gmail.com>
1 parent 841328e commit 3e6c7c2

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed
 

‎.ci/travis/scripts/ctest2travis.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def start_test_fold():
8383
end_fold() # tag=build
8484
start_test_fold()
8585

86-
if re.search('***Failed', updated_line) or re.search('***Timeout', updated_line):
86+
if re.search(r'\*\*\*Failed', updated_line) or re.search(r'\*\*\*Timeout', updated_line):
8787
end_fold()
8888
updated_line = colored(updated_line, 'red')
8989
in_failing_test = True
@@ -97,14 +97,14 @@ def start_test_fold():
9797
in_failure = False
9898
else:
9999
updated_line = colored(updated_line, 'yellow')
100-
elif re.search('*** Segmentation fault', updated_line):
100+
elif re.search(r'\*\*\* Segmentation fault', updated_line):
101101
start_fold('segfault')
102102
updated_line = colored(updated_line, 'magenta')
103103
elif re.match(' Test failed: Segmentation fault', updated_line):
104104
end_fold()
105105

106106
else:
107-
if re.match('(FAIL|ERROR)[:!].*', updated_line):
107+
if re.match(r'(FAIL|ERROR)[:\!].*', updated_line):
108108
updated_line = colored(updated_line, 'yellow')
109109
in_failure = True
110110

‎scripts/qgis_fixes/fix_signals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class FixSignals(fixer_base.BaseFix):
5959

6060
def transform(self, node, results):
6161
signal = results.get("signal").value
62-
signal = re.sub('^["\']([^(]+)(?:(.*))?["\']$', '\\1', signal)
62+
signal = re.sub('^["\']([^(]+)(?:\\(.*\\))?["\']$', '\\1', signal)
6363

6464
if 'emitter' in results:
6565
emitter = results.get("emitter").clone()

‎tests/src/python/test_qgsserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252

5353
# Strip path and content length because path may vary
54-
RE_STRIP_UNCHECKABLE = rb'MAP=[^"]+|Content-Length: \d+'
54+
RE_STRIP_UNCHECKABLE = br'MAP=[^"]+|Content-Length: \d+'
5555
RE_ELEMENT = br'</*([^>\[\s]+)[ >]'
5656
RE_ELEMENT_CONTENT = br'<[^>\[]+>(.+)</[^>\[\s]+>'
5757
RE_ATTRIBUTES = rb'((?:(?!\s|=).)*)\s*?=\s*?["\']?((?:(?<=")(?:(?<=\\)"|[^"])*|(?<=\')(?:(?<=\\)\'|[^\'])*)|(?:(?!"|\')(?:(?!\/>|>|\s).)+))'

‎tests/src/python/test_qgsserver_wfst.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def setUpClass(cls):
9292
cls.server = subprocess.Popen([sys.executable, server_path],
9393
env=os.environ, stdout=subprocess.PIPE)
9494
line = cls.server.stdout.readline()
95-
cls.port = int(re.findall(r':(\d+)', line)[0])
95+
cls.port = int(re.findall(br':(\d+)', line)[0])
9696
assert cls.port != 0
9797
# Wait for the server process to start
9898
assert waitServer('http://127.0.0.1:%s' % cls.port), "Server is not responding!"

0 commit comments

Comments
 (0)
Please sign in to comment.