Used set literal instead of converting a list to a set.
[philipp/winterrodeln/wrpylib.git] / wrpylib / wrmwmarkup.py
index 0c087ffd53f73a146e769b9f282a289b8bdd0ba6..f626f2b42476d0128351d2b1643f19fcd43c45e9 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.7
+#!/usr/bin/python3.4
 # -*- coding: iso-8859-15 -*-
 # $Id$
 # $HeadURL$
@@ -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))