summaryrefslogtreecommitdiffstats
path: root/parsers
diff options
context:
space:
mode:
Diffstat (limited to 'parsers')
-rw-r--r--parsers/logbooks.py2
-rw-r--r--parsers/people.py4
-rw-r--r--parsers/survex.py4
3 files changed, 5 insertions, 5 deletions
diff --git a/parsers/logbooks.py b/parsers/logbooks.py
index 9e92dfc..892066b 100644
--- a/parsers/logbooks.py
+++ b/parsers/logbooks.py
@@ -326,7 +326,7 @@ def parser_date(tripdate, year):
def parser_html(year, expedition, txt, seq=""):
- """This uses some of the more obscure capabilities of regular expressions,
+ r"""This uses some of the more obscure capabilities of regular expressions,
see https://docs.python.org/3/library/re.html
e.g.
diff --git a/parsers/people.py b/parsers/people.py
index 97793a6..fc83be2 100644
--- a/parsers/people.py
+++ b/parsers/people.py
@@ -68,13 +68,13 @@ def troggle_slugify(longname):
This function copied intact to expoweb/scripts/make-folklist.py
"""
slug = longname.strip().lower().replace(" ","-")
- slug = re.sub('\([^\)]*\)','',slug) # remove nickname in brackets
+ slug = re.sub(r'\([^\)]*\)','',slug) # remove nickname in brackets
slug = slug.replace('é', 'e')
slug = slug.replace('á', 'a')
slug = slug.replace('ä', 'a')
slug = slug.replace('&', '') # otherwise just remove the &
slug = slug.replace(';', '') # otherwise just remove the ;
- slug = re.sub('<[^>]*>','',slug) # remove <span-lang = "hu">
+ slug = re.sub(r'<[^>]*>','',slug) # remove <span-lang = "hu">
if len(slug) > 40: # slugfield is 50 chars
slug = slug[:40]
diff --git a/parsers/survex.py b/parsers/survex.py
index 4c0a6e5..5c59e6d 100644
--- a/parsers/survex.py
+++ b/parsers/survex.py
@@ -2428,9 +2428,9 @@ def FindAndLoadSurvex():
ff = survexblock.survexfile
if comment:
# print(f"FIX {survexblock} {altitude} {comment}")
- if re.match("(?i)[^s]*srtm[\s\S]*", comment.lower()):
+ if re.match(r"(?i)[^s]*srtm[\s\S]*", comment.lower()):
print(f"SRTM {ff}.svx::{survexblock} - {spath}.svx - alt={altitude} '{comment}'")
- if re.match("(?i)[^s]*radost[\s\S]*", comment.lower()):
+ if re.match(r"(?i)[^s]*radost[\s\S]*", comment.lower()):
print(f"RDST {ff}.svx::{survexblock} - {spath}.svx - alt={altitude} '{comment}'")
svx_load = None