xmlclass/xmlclass.py
changeset 1739 ec153828ded2
parent 1736 7e61baa047f0
child 1743 c3c3d1318130
--- a/xmlclass/xmlclass.py	Mon Aug 14 23:38:28 2017 +0300
+++ b/xmlclass/xmlclass.py	Tue Aug 15 12:17:51 2017 +0300
@@ -84,7 +84,7 @@
             self.__offset = timedelta(minutes = 0)
             self.__name = "UTC"
         else:
-            sign = {"-" : -1, "+" : 1}[offset[0]]
+            sign = {"-": -1, "+": 1}[offset[0]]
             hours, minutes = [int(val) for val in offset[1:].split(":")]
             self.__offset = timedelta(minutes=sign * (hours * 60 + minutes))
             self.__name = ""
@@ -1399,7 +1399,7 @@
     if facets.has_key("enumeration") and facets["enumeration"][0] is not None:
         return facets["enumeration"][0]
     elif facets.has_key("maxInclusive"):
-        limits = {"max" : None, "min" : None}
+        limits = {"max": None, "min": None}
         if facets["maxInclusive"][0] is not None:
             limits["max"] = facets["maxInclusive"][0]
         elif facets["maxExclusive"][0] is not None:
@@ -1420,9 +1420,9 @@
             attr_list.extend(classinfos["base"].getElementAttributes(self))
         for attr in classinfos["attributes"]:
             if attr["use"] != "prohibited":
-                attr_params = {"name" : attr["name"], "use" : attr["use"],
-                    "type" : gettypeinfos(attr["attr_type"]["basename"], attr["attr_type"]["facets"]),
-                    "value" : getattr(self, attr["name"], "")}
+                attr_params = {"name": attr["name"], "use": attr["use"],
+                    "type": gettypeinfos(attr["attr_type"]["basename"], attr["attr_type"]["facets"]),
+                    "value": getattr(self, attr["name"], "")}
                 attr_list.append(attr_params)
         return attr_list
     return getElementAttributes