Used set literal instead of converting a list to a set.
[philipp/winterrodeln/wrpylib.git] / wrpylib / wrmwmarkup.py
index bc72a391f66d971142ba75ad3505b141a27a3990..f626f2b42476d0128351d2b1643f19fcd43c45e9 100644 (file)
@@ -457,7 +457,7 @@ def parse_wrmap(wikitext):
         # point
         if is_point:
             properties = {'type': feature.tag}
-            allowed_properties = set(['name', 'wiki'])
+            allowed_properties = {'name', 'wiki'}
             wrong_properties = set(feature.attrib.keys()) - allowed_properties
             if len(wrong_properties) > 0:
                 raise ParseError("The attribute '{}' is not allowed at <{}>.".format(list(wrong_properties)[0], feature.tag))
@@ -473,7 +473,7 @@ def parse_wrmap(wikitext):
         # line
         if is_line:
             properties = {'type': feature.tag}
-            allowed_properties = set(['farbe', 'dicke'])
+            allowed_properties = {'farbe', 'dicke'}
             wrong_properties = set(feature.attrib.keys()) - allowed_properties
             if len(wrong_properties) > 0:
                 raise ParseError("The attribute '{}' is not allowed at <{}>.".format(list(wrong_properties)[0], feature.tag))