Skip to content

Commit

Permalink
Merge pull request scrapinghub#1055 from tirkarthi/fix-invalid-escape
Browse files Browse the repository at this point in the history
Fix deprecation warnings due to invalid escape sequences.
  • Loading branch information
kmike committed Sep 1, 2020
2 parents 6dc78f5 + d1e3582 commit 4dff7ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/rst2inspections.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
def _parse_doc(doc):
res = collections.OrderedDict()

m = re.search("^splash:(\w+)\s+[-]+\s*$", doc, re.MULTILINE)
m = re.search(r"^splash:(\w+)\s+[-]+\s*$", doc, re.MULTILINE)
res['name'] = m.group(1) if m else None

header, content = re.split("[-][-]+", doc, maxsplit=1)
Expand Down Expand Up @@ -47,7 +47,7 @@ def parse_rst(rst_source):
Parse Sphinx Lua splash methods reference docs and
extract information useful for inspections.
"""
parsed = re.split("\.\. _splash-(.+):", rst_source)[1:]
parsed = re.split(r"\.\. _splash-(.+):", rst_source)[1:]
# ids = parsed[::2]
docs = parsed[1::2]
info = [_parse_doc(d) for d in docs]
Expand Down

0 comments on commit 4dff7ae

Please sign in to comment.