]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Add some type annotations.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Wed, 13 Oct 2021 21:35:25 +0000 (23:35 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Wed, 13 Oct 2021 21:35:25 +0000 (23:35 +0200)
wrpylib/wrmwmarkup.py

index 2ab28d227efa0ef3ba64ad6141b54a153c48e706..b346c554442eb8e922c41dd6da9b47c7138a4d62 100644 (file)
@@ -3,7 +3,7 @@
 import re
 import xml.etree.ElementTree
 import collections
-from typing import Tuple, Optional, List, OrderedDict, Union
+from typing import Tuple, Optional, List, OrderedDict, Union, Dict
 
 from mwparserfromhell.nodes import Template
 
@@ -297,7 +297,7 @@ def create_wrmap_coordinates(coords):
     return '\n'.join(result)
  
 
-def create_wrmap(geojson):
+def create_wrmap(geojson: Dict) -> str:
     """Creates a <wrmap> wikitext from geojson (as python types)."""
     wrmap_xml = xml.etree.ElementTree.Element('wrmap')
     wrmap_xml.text = '\n\n'