Commit d35d16f2 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

use raw strings

parent 90c03241
Pipeline #1857 passed with stages
in 59 seconds
......@@ -246,7 +246,7 @@ class Project(Links, NamedModel, TimeStampedModel):
with filename.open() as f:
content = f.read()
for key, value in CMAKE_FIELDS.items():
search = re.search(f'set\s*\(\s*project_{key}\s+([^)]+)*\)', content, re.I)
search = re.search(fr'set\s*\(\s*project_{key}\s+([^)]+)*\)', content, re.I)
if search:
try:
old = getattr(self, value)
......
......@@ -28,7 +28,7 @@ def api_next(source, req):
if 'Link' in req.headers:
for link in req.headers['Link'].split(','):
if 'next' in link:
return int(re.search('page=(\d+)', link).group(1))
return int(re.search(r'page=(\d+)', link).group(1))
if source == SOURCES.gitlab:
if 'X-Next-Page' in req.headers and req.headers['X-Next-Page']:
return int(req.headers['X-Next-Page'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment