Auto-generated patch by python-black
[integration/test.git] / csit / scripts / generate_uiStateJSON.py
index e99da6924890a3c7f9565ad321a235a3125bdc21..bffa0305f8a88ec19fc99f8312d832ed1caa07e7 100644 (file)
@@ -1,9 +1,5 @@
 # Template for UIState (Currently supports only colors)
-UI_STATE_BODY = {
-    "vis": {
-        "colors": None
-    }
-}
+UI_STATE_BODY = {"vis": {"colors": None}}
 
 
 def generate(dash_config, viz_config):
@@ -17,45 +13,45 @@ def generate(dash_config, viz_config):
     # and avoids duplication
 
     try:
-        series = dash_config['y-axis']['series']
+        series = dash_config["y-axis"]["series"]
         for _, value in series.items():
             try:
-                colors[value['label']] = value['color']
+                colors[value["label"]] = value["color"]
             except KeyError:
                 continue
     except KeyError:
         pass
 
     try:
-        series = viz_config['series']
+        series = viz_config["series"]
         for _, value in series.items():
             try:
-                colors[value['label']] = value['color']
+                colors[value["label"]] = value["color"]
             except KeyError:
                 continue
     except KeyError:
         pass
 
     try:
-        seriesParams = dash_config['y-axis']['seriesParams']
+        seriesParams = dash_config["y-axis"]["seriesParams"]
         for _, value in seriesParams.items():
             try:
-                colors[value['label']] = value['color']
+                colors[value["label"]] = value["color"]
             except KeyError:
                 continue
     except KeyError:
         pass
 
     try:
-        seriesParams = viz_config['seriesParams']
+        seriesParams = viz_config["seriesParams"]
         for _, value in seriesParams.items():
             try:
-                colors[value['label']] = value['color']
+                colors[value["label"]] = value["color"]
             except KeyError:
                 continue
     except KeyError:
         pass
 
-    UI_STATE_BODY['vis']['colors'] = colors
+    UI_STATE_BODY["vis"]["colors"] = colors
 
     return UI_STATE_BODY