diff --git a/phosphor-regulators/tools/validate-regulators-config.py b/phosphor-regulators/tools/validate-regulators-config.py
index f70d9b4..54a16a4 100755
--- a/phosphor-regulators/tools/validate-regulators-config.py
+++ b/phosphor-regulators/tools/validate-regulators-config.py
@@ -2,19 +2,22 @@
 
 import argparse
 import json
-import jsonschema
 import os
 import sys
 
+import jsonschema
+
 r"""
 Validates the phosphor-regulators configuration file. Checks it against a JSON
 schema as well as doing some extra checks that can't be encoded in the schema.
 """
 
+
 def handle_validation_error():
     sys.exit("Validation failed.")
 
-def get_values(json_element, key, result = None):
+
+def get_values(json_element, key, result=None):
     r"""
     Finds all occurrences of a key within the specified JSON element and its
     children. Returns the associated values.
@@ -38,27 +41,30 @@
                 get_values(item, key, result)
     return result
 
+
 def get_rule_ids(config_json):
     r"""
     Get all rule IDs in the configuration file.
     config_json: Configuration file JSON
     """
     rule_ids = []
-    for rule in config_json.get('rules', {}):
-        rule_ids.append(rule['id'])
+    for rule in config_json.get("rules", {}):
+        rule_ids.append(rule["id"])
     return rule_ids
 
+
 def get_device_ids(config_json):
     r"""
     Get all device IDs in the configuration file.
     config_json: Configuration file JSON
     """
     device_ids = []
-    for chassis in config_json.get('chassis', {}):
-        for device in chassis.get('devices', {}):
-            device_ids.append(device['id'])
+    for chassis in config_json.get("chassis", {}):
+        for device in chassis.get("devices", {}):
+            device_ids.append(device["id"])
     return device_ids
 
+
 def check_number_of_elements_in_masks(config_json):
     r"""
     Check if the number of bit masks in the 'masks' property matches the number
@@ -66,87 +72,114 @@
     config_json: Configuration file JSON
     """
 
-    i2c_write_bytes = get_values(config_json, 'i2c_write_bytes')
-    i2c_compare_bytes = get_values(config_json, 'i2c_compare_bytes')
+    i2c_write_bytes = get_values(config_json, "i2c_write_bytes")
+    i2c_compare_bytes = get_values(config_json, "i2c_compare_bytes")
 
     for object in i2c_write_bytes:
-        if 'masks' in object:
-            if len(object.get('masks', [])) != len(object.get('values', [])):
-                sys.stderr.write("Error: Invalid i2c_write_bytes action.\n"+\
-                "The masks array must have the same size as the values array. "+\
-                "masks: "+str(object.get('masks', []))+\
-                ", values: "+str(object.get('values', []))+'.\n')
+        if "masks" in object:
+            if len(object.get("masks", [])) != len(object.get("values", [])):
+                sys.stderr.write(
+                    "Error: Invalid i2c_write_bytes action.\n"
+                    + "The masks array must have the same size as the values"
+                    + " array. masks: "
+                    + str(object.get("masks", []))
+                    + ", values: "
+                    + str(object.get("values", []))
+                    + ".\n"
+                )
                 handle_validation_error()
 
     for object in i2c_compare_bytes:
-        if 'masks' in object:
-            if len(object.get('masks', [])) != len(object.get('values', [])):
-                sys.stderr.write("Error: Invalid i2c_compare_bytes action.\n"+\
-                "The masks array must have the same size as the values array. "+\
-                "masks: "+str(object.get('masks', []))+\
-                ", values: "+str(object.get('values', []))+'.\n')
+        if "masks" in object:
+            if len(object.get("masks", [])) != len(object.get("values", [])):
+                sys.stderr.write(
+                    "Error: Invalid i2c_compare_bytes action.\n"
+                    + "The masks array must have the same size as the values "
+                    + "array. masks: "
+                    + str(object.get("masks", []))
+                    + ", values: "
+                    + str(object.get("values", []))
+                    + ".\n"
+                )
                 handle_validation_error()
 
+
 def check_rule_id_exists(config_json):
     r"""
     Check if a rule_id property specifies a rule ID that does not exist.
     config_json: Configuration file JSON
     """
 
-    rule_ids = get_values(config_json, 'rule_id')
+    rule_ids = get_values(config_json, "rule_id")
     valid_rule_ids = get_rule_ids(config_json)
     for rule_id in rule_ids:
         if rule_id not in valid_rule_ids:
-            sys.stderr.write("Error: Rule ID does not exist.\n"+\
-            "Found rule_id value that specifies invalid rule ID "+\
-            rule_id+'\n')
+            sys.stderr.write(
+                "Error: Rule ID does not exist.\n"
+                + "Found rule_id value that specifies invalid rule ID "
+                + rule_id
+                + "\n"
+            )
             handle_validation_error()
 
+
 def check_device_id_exists(config_json):
     r"""
     Check if a device_id property specifies a device ID that does not exist.
     config_json: Configuration file JSON
     """
 
-    device_ids = get_values(config_json, 'device_id')
+    device_ids = get_values(config_json, "device_id")
     valid_device_ids = get_device_ids(config_json)
     for device_id in device_ids:
         if device_id not in valid_device_ids:
-            sys.stderr.write("Error: Device ID does not exist.\n"+\
-            "Found device_id value that specifies invalid device ID "+\
-            device_id+'\n')
+            sys.stderr.write(
+                "Error: Device ID does not exist.\n"
+                + "Found device_id value that specifies invalid device ID "
+                + device_id
+                + "\n"
+            )
             handle_validation_error()
 
+
 def check_set_device_value_exists(config_json):
     r"""
     Check if a set_device action specifies a device ID that does not exist.
     config_json: Configuration file JSON
     """
 
-    device_ids = get_values(config_json, 'set_device')
+    device_ids = get_values(config_json, "set_device")
     valid_device_ids = get_device_ids(config_json)
     for device_id in device_ids:
         if device_id not in valid_device_ids:
-            sys.stderr.write("Error: Device ID does not exist.\n"+\
-            "Found set_device action that specifies invalid device ID "+\
-            device_id+'\n')
+            sys.stderr.write(
+                "Error: Device ID does not exist.\n"
+                + "Found set_device action that specifies invalid device ID "
+                + device_id
+                + "\n"
+            )
             handle_validation_error()
 
+
 def check_run_rule_value_exists(config_json):
     r"""
     Check if any run_rule actions specify a rule ID that does not exist.
     config_json: Configuration file JSON
     """
 
-    rule_ids = get_values(config_json, 'run_rule')
+    rule_ids = get_values(config_json, "run_rule")
     valid_rule_ids = get_rule_ids(config_json)
     for rule_id in rule_ids:
         if rule_id not in valid_rule_ids:
-            sys.stderr.write("Error: Rule ID does not exist.\n"+\
-            "Found run_rule action that specifies invalid rule ID "+\
-            rule_id+'\n')
+            sys.stderr.write(
+                "Error: Rule ID does not exist.\n"
+                + "Found run_rule action that specifies invalid rule ID "
+                + rule_id
+                + "\n"
+            )
             handle_validation_error()
 
+
 def check_infinite_loops_in_rule(config_json, rule_json, call_stack=[]):
     r"""
     Check if a 'run_rule' action in the specified rule causes an
@@ -156,23 +189,27 @@
     call_stack: Current call stack of rules.
     """
 
-    call_stack.append(rule_json['id'])
-    for action in rule_json.get('actions', {}):
-        if 'run_rule' in action:
-            run_rule_id = action['run_rule']
+    call_stack.append(rule_json["id"])
+    for action in rule_json.get("actions", {}):
+        if "run_rule" in action:
+            run_rule_id = action["run_rule"]
             if run_rule_id in call_stack:
                 call_stack.append(run_rule_id)
-                sys.stderr.write(\
-               "Infinite loop caused by run_rule actions.\n"+\
-                str(call_stack)+'\n')
+                sys.stderr.write(
+                    "Infinite loop caused by run_rule actions.\n"
+                    + str(call_stack)
+                    + "\n"
+                )
                 handle_validation_error()
             else:
-                for rule in config_json.get('rules', {}):
-                    if rule['id'] == run_rule_id:
-                        check_infinite_loops_in_rule(\
-                        config_json, rule, call_stack)
+                for rule in config_json.get("rules", {}):
+                    if rule["id"] == run_rule_id:
+                        check_infinite_loops_in_rule(
+                            config_json, rule, call_stack
+                        )
     call_stack.pop()
 
+
 def check_infinite_loops(config_json):
     r"""
     Check if rule in config file is called recursively, causing an
@@ -180,88 +217,115 @@
     config_json: Configuration file JSON
     """
 
-    for rule in config_json.get('rules', {}):
+    for rule in config_json.get("rules", {}):
         check_infinite_loops_in_rule(config_json, rule)
 
+
 def check_duplicate_object_id(config_json):
     r"""
     Check that there aren't any JSON objects with the same 'id' property value.
     config_json: Configuration file JSON
     """
 
-    json_ids = get_values(config_json, 'id')
+    json_ids = get_values(config_json, "id")
     unique_ids = set()
     for id in json_ids:
         if id in unique_ids:
-           sys.stderr.write("Error: Duplicate ID.\n"+\
-           "Found multiple objects with the ID "+id+'\n')
-           handle_validation_error()
+            sys.stderr.write(
+                "Error: Duplicate ID.\n"
+                + "Found multiple objects with the ID "
+                + id
+                + "\n"
+            )
+            handle_validation_error()
         else:
             unique_ids.add(id)
 
+
 def check_duplicate_rule_id(config_json):
     r"""
     Check that there aren't any "rule" elements with the same 'id' field.
     config_json: Configuration file JSON
     """
     rule_ids = []
-    for rule in config_json.get('rules', {}):
-        rule_id = rule['id']
+    for rule in config_json.get("rules", {}):
+        rule_id = rule["id"]
         if rule_id in rule_ids:
-            sys.stderr.write("Error: Duplicate rule ID.\n"+\
-            "Found multiple rules with the ID "+rule_id+'\n')
+            sys.stderr.write(
+                "Error: Duplicate rule ID.\n"
+                + "Found multiple rules with the ID "
+                + rule_id
+                + "\n"
+            )
             handle_validation_error()
         else:
             rule_ids.append(rule_id)
 
+
 def check_duplicate_chassis_number(config_json):
     r"""
-    Check that there aren't any "chassis" elements with the same 'number' field.
+    Check that there aren't any "chassis" elements with the same 'number'
+    field.
     config_json: Configuration file JSON
     """
     numbers = []
-    for chassis in config_json.get('chassis', {}):
-        number = chassis['number']
+    for chassis in config_json.get("chassis", {}):
+        number = chassis["number"]
         if number in numbers:
-            sys.stderr.write("Error: Duplicate chassis number.\n"+\
-            "Found multiple chassis with the number "+str(number)+'\n')
+            sys.stderr.write(
+                "Error: Duplicate chassis number.\n"
+                + "Found multiple chassis with the number "
+                + str(number)
+                + "\n"
+            )
             handle_validation_error()
         else:
             numbers.append(number)
 
+
 def check_duplicate_device_id(config_json):
     r"""
     Check that there aren't any "devices" with the same 'id' field.
     config_json: Configuration file JSON
     """
     device_ids = []
-    for chassis in config_json.get('chassis', {}):
-        for device in chassis.get('devices', {}):
-            device_id = device['id']
+    for chassis in config_json.get("chassis", {}):
+        for device in chassis.get("devices", {}):
+            device_id = device["id"]
             if device_id in device_ids:
-                sys.stderr.write("Error: Duplicate device ID.\n"+\
-                "Found multiple devices with the ID "+device_id+'\n')
+                sys.stderr.write(
+                    "Error: Duplicate device ID.\n"
+                    + "Found multiple devices with the ID "
+                    + device_id
+                    + "\n"
+                )
                 handle_validation_error()
             else:
                 device_ids.append(device_id)
 
+
 def check_duplicate_rail_id(config_json):
     r"""
     Check that there aren't any "rails" with the same 'id' field.
     config_json: Configuration file JSON
     """
     rail_ids = []
-    for chassis in config_json.get('chassis', {}):
-        for device in chassis.get('devices', {}):
-            for rail in device.get('rails', {}):
-                rail_id = rail['id']
+    for chassis in config_json.get("chassis", {}):
+        for device in chassis.get("devices", {}):
+            for rail in device.get("rails", {}):
+                rail_id = rail["id"]
                 if rail_id in rail_ids:
-                    sys.stderr.write("Error: Duplicate rail ID.\n"+\
-                    "Found multiple rails with the ID "+rail_id+'\n')
+                    sys.stderr.write(
+                        "Error: Duplicate rail ID.\n"
+                        + "Found multiple rails with the ID "
+                        + rail_id
+                        + "\n"
+                    )
                     handle_validation_error()
                 else:
                     rail_ids.append(rail_id)
 
+
 def check_for_duplicates(config_json):
     r"""
     Check for duplicate ID.
@@ -276,6 +340,7 @@
 
     check_duplicate_object_id(config_json)
 
+
 def validate_schema(config, schema):
     r"""
     Validates the specified config file using the specified
@@ -299,24 +364,34 @@
 
     return config_json
 
+
 def validate_JSON_format(file):
     with open(file) as json_data:
         try:
             return json.load(json_data)
-        except ValueError as err:
+        except ValueError:
             return False
         return True
 
-if __name__ == '__main__':
 
+if __name__ == "__main__":
     parser = argparse.ArgumentParser(
-        description='phosphor-regulators configuration file validator')
+        description="phosphor-regulators configuration file validator"
+    )
 
-    parser.add_argument('-s', '--schema-file', dest='schema_file',
-                        help='The phosphor-regulators schema file')
+    parser.add_argument(
+        "-s",
+        "--schema-file",
+        dest="schema_file",
+        help="The phosphor-regulators schema file",
+    )
 
-    parser.add_argument('-c', '--configuration-file', dest='configuration_file',
-                        help='The phosphor-regulators configuration file')
+    parser.add_argument(
+        "-c",
+        "--configuration-file",
+        dest="configuration_file",
+        help="The phosphor-regulators configuration file",
+    )
 
     args = parser.parse_args()
 
diff --git a/power-sequencer/gen-ucd90160-defs.py b/power-sequencer/gen-ucd90160-defs.py
index b191ef6..66bbb9b 100755
--- a/power-sequencer/gen-ucd90160-defs.py
+++ b/power-sequencer/gen-ucd90160-defs.py
@@ -1,22 +1,32 @@
 #!/usr/bin/env python3
 
 import os
-import yaml
+import sys
 from argparse import ArgumentParser
-from mako.template import Template
+
+import yaml
 from mako.lookup import TemplateLookup
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     parser = ArgumentParser(
-        description="Power sequencer UCD90160 definition parser")
+        description="Power sequencer UCD90160 definition parser"
+    )
 
-    parser.add_argument('-i', '--input_yaml', dest='input_yaml',
-                        default="example/ucd90160.yaml",
-                        help='UCD90160 definitions YAML')
+    parser.add_argument(
+        "-i",
+        "--input_yaml",
+        dest="input_yaml",
+        default="example/ucd90160.yaml",
+        help="UCD90160 definitions YAML",
+    )
 
-    parser.add_argument('-o', '--output_dir', dest='output_dir',
-                        default=".",
-                        help='output directory')
+    parser.add_argument(
+        "-o",
+        "--output_dir",
+        dest="output_dir",
+        default=".",
+        help="output directory",
+    )
 
     args = parser.parse_args()
 
@@ -24,18 +34,17 @@
         parser.print_usage()
         sys.exit(1)
 
-    with open(args.input_yaml, 'r') as ucd90160_input:
+    with open(args.input_yaml, "r") as ucd90160_input:
         ucd90160_data = yaml.safe_load(ucd90160_input) or {}
 
     templates_dir = os.path.join(
-            os.path.dirname(os.path.realpath(__file__)),
-            "templates")
+        os.path.dirname(os.path.realpath(__file__)), "templates"
+    )
 
     output_file = os.path.join(args.output_dir, "ucd90160_defs.cpp")
 
-    mylookup = TemplateLookup(
-            directories=templates_dir.split())
-    mytemplate = mylookup.get_template('ucd90160_defs.mako.cpp')
+    mylookup = TemplateLookup(directories=templates_dir.split())
+    mytemplate = mylookup.get_template("ucd90160_defs.mako.cpp")
 
-    with open(output_file, 'w') as output:
+    with open(output_file, "w") as output:
         output.write(mytemplate.render(ucd90160s=ucd90160_data))
