diff --git a/swh/web/api/apidoc.py b/swh/web/api/apidoc.py --- a/swh/web/api/apidoc.py +++ b/swh/web/api/apidoc.py @@ -73,8 +73,8 @@ # remove parsed document markups par = re.sub('<[^<]+?>', '', par) # api urls cleanup to generate valid links afterwards - par = re.sub('\(\w+\)', '', par) # noqa - par = re.sub('\[.*\]', '', par) # noqa + par = re.sub(r'\(\w+\)', '', par) + par = re.sub(r'\[.*\]', '', par) par = par.replace('//', '/') # transform references to api endpoints into valid rst links par = re.sub(':http:get:`([^,]*)`', r'`<\1>`_', par) diff --git a/swh/web/api/views/utils.py b/swh/web/api/views/utils.py --- a/swh/web/api/views/utils.py +++ b/swh/web/api/views/utils.py @@ -15,7 +15,7 @@ def api_lookup(lookup_fn, *args, notfound_msg='Object not found', enrich_fn=None): - """ + r""" Capture a redundant behavior of: - looking up the backend with a criteria (be it an identifier or checksum) passed to the function lookup_fn @@ -39,7 +39,7 @@ Raises: NotFoundExp or whatever `lookup_fn` raises. - """ # noqa + """ if enrich_fn is None: enrich_fn = (lambda x: x) res = lookup_fn(*args)