Used set literal instead of converting a list to a set.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sat, 23 May 2015 21:12:45 +0000 (21:12 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sat, 23 May 2015 21:12:45 +0000 (21:12 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wrpylib/trunk@2268 7aebc617-e5e2-0310-91dc-80fb5f6d2477

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))