From: Philipp Spitzer Date: Mon, 11 Jul 2022 20:03:40 +0000 (+0200) Subject: Whitespace changes. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/9f45458bcd79c15ea4d4086e19435868f1b4b7df Whitespace changes. --- diff --git a/wrpylib/wrmwmarkup.py b/wrpylib/wrmwmarkup.py index 547c2e1..49fb797 100644 --- a/wrpylib/wrmwmarkup.py +++ b/wrpylib/wrmwmarkup.py @@ -208,7 +208,7 @@ WRMAP_LINE_TYPES = ['rodelbahn', 'gehweg', 'alternative', 'lift', 'anfahrt', 'li def parse_wrmap(wikitext: str) -> dict: """Parses the 'content' of the Winterrodeln wrmap extension. - If wikitext does not contain the tag or if the tag contains + If wikitext does not contain the tag or if the tag contains invalid formatted lines, a ParseError is raised. Use wrpylib.mwmarkup.find_tag(wikitext, 'wrmap') to find the wrmap tag within an arbitrary wikitext before using this function. @@ -270,7 +270,7 @@ def parse_wrmap(wikitext: str) -> dict: wrong_properties = set(feature.attrib.keys()) - allowed_properties if len(wrong_properties) > 0: raise ParseError(f"The attribute '{list(wrong_properties)[0]}' is not allowed at <{feature.tag}>.") - if 'farbe' in feature.attrib: + if 'farbe' in feature.attrib: if not re.match('#[0-9a-fA-F]{6}$', feature.attrib['farbe']): raise ParseError('The attribute "farbe" has to have a format like "#a0bb43".') properties['strokeColor'] = feature.attrib['farbe'] # e.g. #a200b7 @@ -313,7 +313,7 @@ def create_wrmap_coordinates(coords): for coord in coords: result.append(f'{coord[1]:.6f} N {coord[0]:.6f} E') return '\n'.join(result) - + def create_wrmap(geojson: Dict) -> str: """Creates a wikitext from geojson (as python types)."""