python: format with black

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I88b0551fd0e0ddb28641cf41762dcccba53e564a
diff --git a/src/pdmgen.py b/src/pdmgen.py
index ea7cd13..5a1e477 100755
--- a/src/pdmgen.py
+++ b/src/pdmgen.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
 
-'''Phosphor DBus Monitor YAML parser and code generator.
+"""Phosphor DBus Monitor YAML parser and code generator.
 
 The parser workflow is broken down as follows:
   1 - Import YAML files as native python type(s) instance(s).
@@ -13,7 +13,7 @@
         from the native python type(s) instances(s).
   4 - Present the converted YAML to the command processing method
         requested by the script user.
-'''
+"""
 
 import os
 import sys
@@ -26,32 +26,33 @@
 
 
 class InvalidConfigError(BaseException):
-    '''General purpose config file parsing error.'''
+    """General purpose config file parsing error."""
 
     def __init__(self, path, msg):
-        '''Display configuration file with the syntax
-        error and the error message.'''
+        """Display configuration file with the syntax
+        error and the error message."""
 
         self.config = path
         self.msg = msg
 
 
 class NotUniqueError(InvalidConfigError):
-    '''Within a config file names must be unique.
+    """Within a config file names must be unique.
     Display the config file with the duplicate and
-    the duplicate itself.'''
+    the duplicate itself."""
 
     def __init__(self, path, cls, *names):
         fmt = 'Duplicate {0}: "{1}"'
         super(NotUniqueError, self).__init__(
-            path, fmt.format(cls, ' '.join(names)))
+            path, fmt.format(cls, " ".join(names))
+        )
 
 
 def get_index(objs, cls, name, config=None):
-    '''Items are usually rendered as C++ arrays and as
+    """Items are usually rendered as C++ arrays and as
     such are stored in python lists.  Given an item name
     its class, and an optional config file filter, find
-    the item index.'''
+    the item index."""
 
     for i, x in enumerate(objs.get(cls, [])):
         if config and x.configfile != config:
@@ -64,8 +65,8 @@
 
 
 def exists(objs, cls, name, config=None):
-    '''Check to see if an item already exists in a list given
-    the item name.'''
+    """Check to see if an item already exists in a list given
+    the item name."""
 
     try:
         get_index(objs, cls, name, config)
@@ -76,80 +77,73 @@
 
 
 def add_unique(obj, *a, **kw):
-    '''Add an item to one or more lists unless already present,
-    with an option to constrain the search to a specific config file.'''
+    """Add an item to one or more lists unless already present,
+    with an option to constrain the search to a specific config file."""
 
     for container in a:
-        if not exists(container, obj.cls, obj.name, config=kw.get('config')):
+        if not exists(container, obj.cls, obj.name, config=kw.get("config")):
             container.setdefault(obj.cls, []).append(obj)
 
 
 class Cast(object):
-    '''Decorate an argument by casting it.'''
+    """Decorate an argument by casting it."""
 
     def __init__(self, cast, target):
-        '''cast is the cast type (static, const, etc...).
-           target is the cast target type.'''
+        """cast is the cast type (static, const, etc...).
+        target is the cast target type."""
         self.cast = cast
         self.target = target
 
     def __call__(self, arg):
-        return '{0}_cast<{1}>({2})'.format(self.cast, self.target, arg)
+        return "{0}_cast<{1}>({2})".format(self.cast, self.target, arg)
 
 
 class Literal(object):
-    '''Decorate an argument with a literal operator.'''
+    """Decorate an argument with a literal operator."""
 
-    integer_types = [
-        'int16',
-        'int32',
-        'int64',
-        'uint16',
-        'uint32',
-        'uint64'
-    ]
+    integer_types = ["int16", "int32", "int64", "uint16", "uint32", "uint64"]
 
     def __init__(self, type):
         self.type = type
 
     def __call__(self, arg):
-        if 'uint' in self.type:
-            arg = '{0}ull'.format(arg)
-        elif 'int' in self.type:
-            arg = '{0}ll'.format(arg)
+        if "uint" in self.type:
+            arg = "{0}ull".format(arg)
+        elif "int" in self.type:
+            arg = "{0}ll".format(arg)
 
         if self.type in self.integer_types:
-            return Cast('static', '{0}_t'.format(self.type))(arg)
-        elif self.type == 'byte':
-            return Cast('static', 'uint8_t'.format(self.type))(arg)
-        elif self.type == 'double':
-            return Cast('static', 'double'.format(self.type))(arg)
+            return Cast("static", "{0}_t".format(self.type))(arg)
+        elif self.type == "byte":
+            return Cast("static", "uint8_t".format(self.type))(arg)
+        elif self.type == "double":
+            return Cast("static", "double".format(self.type))(arg)
 
-        if self.type == 'string':
-            return '{0}s'.format(arg)
+        if self.type == "string":
+            return "{0}s".format(arg)
 
         return arg
 
 
 class FixBool(object):
-    '''Un-capitalize booleans.'''
+    """Un-capitalize booleans."""
 
     def __call__(self, arg):
-        return '{0}'.format(arg.lower())
+        return "{0}".format(arg.lower())
 
 
 class Quote(object):
-    '''Decorate an argument by quoting it.'''
+    """Decorate an argument by quoting it."""
 
     def __call__(self, arg):
         return '"{0}"'.format(arg)
 
 
 class Argument(NamedElement, Renderer):
-    '''Define argument type interface.'''
+    """Define argument type interface."""
 
     def __init__(self, **kw):
-        self.type = kw.pop('type', None)
+        self.type = kw.pop("type", None)
         super(Argument, self).__init__(**kw)
 
     def argument(self, loader, indent):
@@ -157,16 +151,16 @@
 
 
 class TrivialArgument(Argument):
-    '''Non-array type arguments.'''
+    """Non-array type arguments."""
 
     def __init__(self, **kw):
-        self.value = kw.pop('value')
-        self.decorators = kw.pop('decorators', [])
-        if kw.get('type', None):
-            self.decorators.insert(0, Literal(kw['type']))
-        if kw.get('type', None) == 'string':
+        self.value = kw.pop("value")
+        self.decorators = kw.pop("decorators", [])
+        if kw.get("type", None):
+            self.decorators.insert(0, Literal(kw["type"]))
+        if kw.get("type", None) == "string":
             self.decorators.insert(0, Quote())
-        if kw.get('type', None) == 'boolean':
+        if kw.get("type", None) == "boolean":
             self.decorators.insert(0, FixBool())
 
         super(TrivialArgument, self).__init__(**kw)
@@ -180,12 +174,12 @@
 
 
 class Metadata(Argument):
-    '''Metadata type arguments.'''
+    """Metadata type arguments."""
 
     def __init__(self, **kw):
-        self.value = kw.pop('value')
-        self.decorators = kw.pop('decorators', [])
-        if kw.get('type', None) == 'string':
+        self.value = kw.pop("value")
+        self.decorators = kw.pop("decorators", [])
+        if kw.get("type", None) == "string":
             self.decorators.insert(0, Quote())
 
         super(Metadata, self).__init__(**kw)
@@ -199,17 +193,17 @@
 
 
 class OpArgument(Argument):
-    '''Operation type arguments.'''
+    """Operation type arguments."""
 
     def __init__(self, **kw):
-        self.op = kw.pop('op')
-        self.bound = kw.pop('bound')
-        self.decorators = kw.pop('decorators', [])
-        if kw.get('type', None):
-            self.decorators.insert(0, Literal(kw['type']))
-        if kw.get('type', None) == 'string':
+        self.op = kw.pop("op")
+        self.bound = kw.pop("bound")
+        self.decorators = kw.pop("decorators", [])
+        if kw.get("type", None):
+            self.decorators.insert(0, Literal(kw["type"]))
+        if kw.get("type", None) == "string":
             self.decorators.insert(0, Quote())
-        if kw.get('type', None) == 'boolean':
+        if kw.get("type", None) == "boolean":
             self.decorators.insert(0, FixBool())
 
         super(OpArgument, self).__init__(**kw)
@@ -223,7 +217,7 @@
 
 
 class Indent(object):
-    '''Help templates be depth agnostic.'''
+    """Help templates be depth agnostic."""
 
     def __init__(self, depth=0):
         self.depth = depth
@@ -232,18 +226,18 @@
         return Indent(self.depth + depth)
 
     def __call__(self, depth):
-        '''Render an indent at the current depth plus depth.'''
-        return 4*' '*(depth + self.depth)
+        """Render an indent at the current depth plus depth."""
+        return 4 * " " * (depth + self.depth)
 
 
 class ConfigEntry(NamedElement):
-    '''Base interface for rendered items.'''
+    """Base interface for rendered items."""
 
     def __init__(self, *a, **kw):
-        '''Pop the configfile/class/subclass keywords.'''
+        """Pop the configfile/class/subclass keywords."""
 
-        self.configfile = kw.pop('configfile')
-        self.cls = kw.pop('class')
+        self.configfile = kw.pop("configfile")
+        self.cls = kw.pop("class")
         self.subclass = kw.pop(self.cls)
 
         # TODO: NamedElement requires 'name' to be a string, but in many cases
@@ -251,179 +245,166 @@
         #       insert it after ConfigEntry does its own thing to avoid
         #       exceptions.  This should be refactored throughout the whole
         #       script to not overload 'name' as a dict.
-        name_save = kw.pop('name')
+        name_save = kw.pop("name")
         super(ConfigEntry, self).__init__(**kw)
         self.name = name_save
 
     def factory(self, objs):
-        ''' Optional factory interface for subclasses to add
-        additional items to be rendered.'''
+        """Optional factory interface for subclasses to add
+        additional items to be rendered."""
 
         pass
 
     def setup(self, objs):
-        ''' Optional setup interface for subclasses, invoked
-        after all factory methods have been run.'''
+        """Optional setup interface for subclasses, invoked
+        after all factory methods have been run."""
 
         pass
 
 
 class Path(ConfigEntry):
-    '''Path/metadata association.'''
+    """Path/metadata association."""
 
     def __init__(self, *a, **kw):
         super(Path, self).__init__(**kw)
 
-        if self.name['meta'].upper() != self.name['meta']:
+        if self.name["meta"].upper() != self.name["meta"]:
             raise InvalidConfigError(
                 self.configfile,
                 'Metadata tag "{0}" must be upper case.'.format(
-                    self.name['meta']))
+                    self.name["meta"]
+                ),
+            )
 
     def factory(self, objs):
-        '''Create path and metadata elements.'''
+        """Create path and metadata elements."""
 
         args = {
-            'class': 'pathname',
-            'pathname': 'element',
-            'name': self.name['path']
+            "class": "pathname",
+            "pathname": "element",
+            "name": self.name["path"],
         }
-        add_unique(ConfigEntry(
-            configfile=self.configfile, **args), objs)
+        add_unique(ConfigEntry(configfile=self.configfile, **args), objs)
 
-        args = {
-            'class': 'meta',
-            'meta': 'element',
-            'name': self.name['meta']
-        }
-        add_unique(ConfigEntry(
-            configfile=self.configfile, **args), objs)
+        args = {"class": "meta", "meta": "element", "name": self.name["meta"]}
+        add_unique(ConfigEntry(configfile=self.configfile, **args), objs)
 
         super(Path, self).factory(objs)
 
     def setup(self, objs):
-        '''Resolve path and metadata names to indices.'''
+        """Resolve path and metadata names to indices."""
 
-        self.path = get_index(
-            objs, 'pathname', self.name['path'])
-        self.meta = get_index(
-            objs, 'meta', self.name['meta'])
+        self.path = get_index(objs, "pathname", self.name["path"])
+        self.meta = get_index(objs, "meta", self.name["meta"])
 
         super(Path, self).setup(objs)
 
 
 class Property(ConfigEntry):
-    '''Property/interface/metadata association.'''
+    """Property/interface/metadata association."""
 
     def __init__(self, *a, **kw):
         super(Property, self).__init__(**kw)
 
-        if self.name['meta'].upper() != self.name['meta']:
+        if self.name["meta"].upper() != self.name["meta"]:
             raise InvalidConfigError(
                 self.configfile,
                 'Metadata tag "{0}" must be upper case.'.format(
-                    self.name['meta']))
+                    self.name["meta"]
+                ),
+            )
 
     def factory(self, objs):
-        '''Create interface, property name and metadata elements.'''
+        """Create interface, property name and metadata elements."""
 
         args = {
-            'class': 'interface',
-            'interface': 'element',
-            'name': self.name['interface']
+            "class": "interface",
+            "interface": "element",
+            "name": self.name["interface"],
         }
-        add_unique(ConfigEntry(
-            configfile=self.configfile, **args), objs)
+        add_unique(ConfigEntry(configfile=self.configfile, **args), objs)
 
         args = {
-            'class': 'propertyname',
-            'propertyname': 'element',
-            'name': self.name['property']
+            "class": "propertyname",
+            "propertyname": "element",
+            "name": self.name["property"],
         }
-        add_unique(ConfigEntry(
-            configfile=self.configfile, **args), objs)
+        add_unique(ConfigEntry(configfile=self.configfile, **args), objs)
 
-        args = {
-            'class': 'meta',
-            'meta': 'element',
-            'name': self.name['meta']
-        }
-        add_unique(ConfigEntry(
-            configfile=self.configfile, **args), objs)
+        args = {"class": "meta", "meta": "element", "name": self.name["meta"]}
+        add_unique(ConfigEntry(configfile=self.configfile, **args), objs)
 
         super(Property, self).factory(objs)
 
     def setup(self, objs):
-        '''Resolve interface, property and metadata to indices.'''
+        """Resolve interface, property and metadata to indices."""
 
-        self.interface = get_index(
-            objs, 'interface', self.name['interface'])
-        self.prop = get_index(
-            objs, 'propertyname', self.name['property'])
-        self.meta = get_index(
-            objs, 'meta', self.name['meta'])
+        self.interface = get_index(objs, "interface", self.name["interface"])
+        self.prop = get_index(objs, "propertyname", self.name["property"])
+        self.meta = get_index(objs, "meta", self.name["meta"])
 
         super(Property, self).setup(objs)
 
 
 class Instance(ConfigEntry):
-    '''Property/Path association.'''
+    """Property/Path association."""
 
     def __init__(self, *a, **kw):
         super(Instance, self).__init__(**kw)
 
     def setup(self, objs):
-        '''Resolve elements to indices.'''
+        """Resolve elements to indices."""
 
         self.interface = get_index(
-            objs, 'interface', self.name['property']['interface'])
+            objs, "interface", self.name["property"]["interface"]
+        )
         self.prop = get_index(
-            objs, 'propertyname', self.name['property']['property'])
-        self.propmeta = get_index(
-            objs, 'meta', self.name['property']['meta'])
-        self.path = get_index(
-            objs, 'pathname', self.name['path']['path'])
-        self.pathmeta = get_index(
-            objs, 'meta', self.name['path']['meta'])
+            objs, "propertyname", self.name["property"]["property"]
+        )
+        self.propmeta = get_index(objs, "meta", self.name["property"]["meta"])
+        self.path = get_index(objs, "pathname", self.name["path"]["path"])
+        self.pathmeta = get_index(objs, "meta", self.name["path"]["meta"])
 
         super(Instance, self).setup(objs)
 
+
 class PathInstance(ConfigEntry):
-    '''Path association.'''
+    """Path association."""
 
     def __init__(self, *a, **kw):
         super(PathInstance, self).__init__(**kw)
 
     def setup(self, objs):
-        '''Resolve elements to indices.'''
-        self.path = self.name['path']['path']
-        self.pathmeta = self.name['path']['meta']
+        """Resolve elements to indices."""
+        self.path = self.name["path"]["path"]
+        self.pathmeta = self.name["path"]["meta"]
         super(PathInstance, self).setup(objs)
 
+
 class Group(ConfigEntry):
-    '''Pop the members keyword for groups.'''
+    """Pop the members keyword for groups."""
 
     def __init__(self, *a, **kw):
-        self.members = kw.pop('members')
+        self.members = kw.pop("members")
         super(Group, self).__init__(**kw)
 
 
 class ImplicitGroup(Group):
-    '''Provide a factory method for groups whose members are
-    not explicitly declared in the config files.'''
+    """Provide a factory method for groups whose members are
+    not explicitly declared in the config files."""
 
     def __init__(self, *a, **kw):
         super(ImplicitGroup, self).__init__(**kw)
 
     def factory(self, objs):
-        '''Create group members.'''
+        """Create group members."""
 
-        factory = Everything.classmap(self.subclass, 'element')
+        factory = Everything.classmap(self.subclass, "element")
         for m in self.members:
             args = {
-                'class': self.subclass,
-                self.subclass: 'element',
-                'name': m
+                "class": self.subclass,
+                self.subclass: "element",
+                "name": m,
             }
 
             obj = factory(configfile=self.configfile, **args)
@@ -434,138 +415,129 @@
 
 
 class GroupOfPaths(ImplicitGroup):
-    '''Path group config file directive.'''
+    """Path group config file directive."""
 
     def __init__(self, *a, **kw):
         super(GroupOfPaths, self).__init__(**kw)
 
     def setup(self, objs):
-        '''Resolve group members.'''
+        """Resolve group members."""
 
         def map_member(x):
-            path = get_index(
-                objs, 'pathname', x['path'])
-            meta = get_index(
-                objs, 'meta', x['meta'])
+            path = get_index(objs, "pathname", x["path"])
+            meta = get_index(objs, "meta", x["meta"])
             return (path, meta)
 
-        self.members = map(
-            map_member,
-            self.members)
+        self.members = map(map_member, self.members)
 
         super(GroupOfPaths, self).setup(objs)
 
 
 class GroupOfProperties(ImplicitGroup):
-    '''Property group config file directive.'''
+    """Property group config file directive."""
 
     def __init__(self, *a, **kw):
-        self.type = kw.pop('type')
+        self.type = kw.pop("type")
         self.datatype = sdbusplus.property.Property(
-            name=kw.get('name'),
-            type=self.type).cppTypeName
+            name=kw.get("name"), type=self.type
+        ).cppTypeName
 
         super(GroupOfProperties, self).__init__(**kw)
 
     def setup(self, objs):
-        '''Resolve group members.'''
+        """Resolve group members."""
 
         def map_member(x):
-            iface = get_index(
-                objs, 'interface', x['interface'])
-            prop = get_index(
-                objs, 'propertyname', x['property'])
-            meta = get_index(
-                objs, 'meta', x['meta'])
+            iface = get_index(objs, "interface", x["interface"])
+            prop = get_index(objs, "propertyname", x["property"])
+            meta = get_index(objs, "meta", x["meta"])
 
             return (iface, prop, meta)
 
-        self.members = map(
-            map_member,
-            self.members)
+        self.members = map(map_member, self.members)
 
         super(GroupOfProperties, self).setup(objs)
 
 
 class GroupOfInstances(ImplicitGroup):
-    '''A group of property instances.'''
+    """A group of property instances."""
 
     def __init__(self, *a, **kw):
         super(GroupOfInstances, self).__init__(**kw)
 
     def setup(self, objs):
-        '''Resolve group members.'''
+        """Resolve group members."""
 
         def map_member(x):
-            path = get_index(objs, 'pathname', x['path']['path'])
-            pathmeta = get_index(objs, 'meta', x['path']['meta'])
+            path = get_index(objs, "pathname", x["path"]["path"])
+            pathmeta = get_index(objs, "meta", x["path"]["meta"])
             interface = get_index(
-                objs, 'interface', x['property']['interface'])
-            prop = get_index(objs, 'propertyname', x['property']['property'])
-            propmeta = get_index(objs, 'meta', x['property']['meta'])
-            instance = get_index(objs, 'instance', x)
+                objs, "interface", x["property"]["interface"]
+            )
+            prop = get_index(objs, "propertyname", x["property"]["property"])
+            propmeta = get_index(objs, "meta", x["property"]["meta"])
+            instance = get_index(objs, "instance", x)
 
             return (path, pathmeta, interface, prop, propmeta, instance)
 
-        self.members = map(
-            map_member,
-            self.members)
+        self.members = map(map_member, self.members)
 
         super(GroupOfInstances, self).setup(objs)
 
+
 class GroupOfPathInstances(ImplicitGroup):
-    '''A group of path instances.'''
+    """A group of path instances."""
 
     def __init__(self, *a, **kw):
         super(GroupOfPathInstances, self).__init__(**kw)
 
     def setup(self, objs):
-        '''Resolve group members.'''
+        """Resolve group members."""
 
         def map_member(x):
-            path = get_index(objs, 'pathname', x['path']['path'])
-            pathmeta = get_index(objs, 'meta', x['path']['meta'])
-            pathinstance = get_index(objs, 'pathinstance', x)
+            path = get_index(objs, "pathname", x["path"]["path"])
+            pathmeta = get_index(objs, "meta", x["path"]["meta"])
+            pathinstance = get_index(objs, "pathinstance", x)
             return (path, pathmeta, pathinstance)
 
-        self.members = map(
-            map_member,
-            self.members)
+        self.members = map(map_member, self.members)
 
         super(GroupOfPathInstances, self).setup(objs)
 
 
 class HasPropertyIndex(ConfigEntry):
-    '''Handle config file directives that require an index to be
-    constructed.'''
+    """Handle config file directives that require an index to be
+    constructed."""
 
     def __init__(self, *a, **kw):
-        self.paths = kw.pop('paths')
-        self.properties = kw.pop('properties')
+        self.paths = kw.pop("paths")
+        self.properties = kw.pop("properties")
         super(HasPropertyIndex, self).__init__(**kw)
 
     def factory(self, objs):
-        '''Create a group of instances for this index.'''
+        """Create a group of instances for this index."""
 
         members = []
         path_group = get_index(
-            objs, 'pathgroup', self.paths, config=self.configfile)
+            objs, "pathgroup", self.paths, config=self.configfile
+        )
         property_group = get_index(
-            objs, 'propertygroup', self.properties, config=self.configfile)
+            objs, "propertygroup", self.properties, config=self.configfile
+        )
 
-        for path in objs['pathgroup'][path_group].members:
-            for prop in objs['propertygroup'][property_group].members:
+        for path in objs["pathgroup"][path_group].members:
+            for prop in objs["propertygroup"][property_group].members:
                 member = {
-                    'path': path,
-                    'property': prop,
+                    "path": path,
+                    "property": prop,
                 }
                 members.append(member)
 
         args = {
-            'members': members,
-            'class': 'instancegroup',
-            'instancegroup': 'instance',
-            'name': '{0} {1}'.format(self.paths, self.properties)
+            "members": members,
+            "class": "instancegroup",
+            "instancegroup": "instance",
+            "name": "{0} {1}".format(self.paths, self.properties),
         }
 
         group = GroupOfInstances(configfile=self.configfile, **args)
@@ -575,54 +547,53 @@
         super(HasPropertyIndex, self).factory(objs)
 
     def setup(self, objs):
-        '''Resolve path, property, and instance groups.'''
+        """Resolve path, property, and instance groups."""
 
         self.instances = get_index(
             objs,
-            'instancegroup',
-            '{0} {1}'.format(self.paths, self.properties),
-            config=self.configfile)
+            "instancegroup",
+            "{0} {1}".format(self.paths, self.properties),
+            config=self.configfile,
+        )
         self.paths = get_index(
-            objs,
-            'pathgroup',
-            self.paths,
-            config=self.configfile)
+            objs, "pathgroup", self.paths, config=self.configfile
+        )
         self.properties = get_index(
-            objs,
-            'propertygroup',
-            self.properties,
-            config=self.configfile)
-        self.datatype = objs['propertygroup'][self.properties].datatype
-        self.type = objs['propertygroup'][self.properties].type
+            objs, "propertygroup", self.properties, config=self.configfile
+        )
+        self.datatype = objs["propertygroup"][self.properties].datatype
+        self.type = objs["propertygroup"][self.properties].type
 
         super(HasPropertyIndex, self).setup(objs)
 
+
 class HasPathIndex(ConfigEntry):
-    '''Handle config file directives that require an index to be
-    constructed.'''
+    """Handle config file directives that require an index to be
+    constructed."""
 
     def __init__(self, *a, **kw):
-        self.paths = kw.pop('paths')
+        self.paths = kw.pop("paths")
         super(HasPathIndex, self).__init__(**kw)
 
     def factory(self, objs):
-        '''Create a group of instances for this index.'''
+        """Create a group of instances for this index."""
 
         members = []
         path_group = get_index(
-            objs, 'pathgroup', self.paths, config=self.configfile)
+            objs, "pathgroup", self.paths, config=self.configfile
+        )
 
-        for path in objs['pathgroup'][path_group].members:
+        for path in objs["pathgroup"][path_group].members:
             member = {
-                'path': path,
+                "path": path,
             }
             members.append(member)
 
         args = {
-            'members': members,
-            'class': 'pathinstancegroup',
-            'pathinstancegroup': 'pathinstance',
-            'name': '{0}'.format(self.paths)
+            "members": members,
+            "class": "pathinstancegroup",
+            "pathinstancegroup": "pathinstance",
+            "name": "{0}".format(self.paths),
         }
 
         group = GroupOfPathInstances(configfile=self.configfile, **args)
@@ -632,83 +603,92 @@
         super(HasPathIndex, self).factory(objs)
 
     def setup(self, objs):
-        '''Resolve path and instance groups.'''
+        """Resolve path and instance groups."""
 
         self.pathinstances = get_index(
             objs,
-            'pathinstancegroup',
-            '{0}'.format(self.paths),
-            config=self.configfile)
+            "pathinstancegroup",
+            "{0}".format(self.paths),
+            config=self.configfile,
+        )
         self.paths = get_index(
-            objs,
-            'pathgroup',
-            self.paths,
-            config=self.configfile)
+            objs, "pathgroup", self.paths, config=self.configfile
+        )
         super(HasPathIndex, self).setup(objs)
 
+
 class GroupOfFilters(ConfigEntry):
-    '''Handle config file directives that require an index for filters.'''
+    """Handle config file directives that require an index for filters."""
 
     def __init__(self, *a, **kw):
         # Pop filters data for adding to the available filters array
-        self.type = kw.pop('type')
-        self.datatype = kw.pop('datatype', None)
-        self.filters = kw.pop('filters', None)
+        self.type = kw.pop("type")
+        self.datatype = kw.pop("datatype", None)
+        self.filters = kw.pop("filters", None)
 
         super(GroupOfFilters, self).__init__(**kw)
 
     def factory(self, objs):
-        '''Modify filters to add the property value type and
-        make them of operation argument type.'''
+        """Modify filters to add the property value type and
+        make them of operation argument type."""
         if self.filters:
             # 'type' used within OpArgument to generate filter
             # argument values so add to each filter
             for f in self.filters:
-                f['type'] = self.type
+                f["type"] = self.type
             self.filters = [OpArgument(**x) for x in self.filters]
 
         super(GroupOfFilters, self).factory(objs)
 
+
 class PropertyWatch(HasPropertyIndex):
-    '''Handle the property watch config file directive.'''
+    """Handle the property watch config file directive."""
 
     def __init__(self, *a, **kw):
         # Pop optional filters for the properties being watched
-        self.filters = kw.pop('filters', None)
-        self.callback = kw.pop('callback', None)
-        self.ignore_start_callback = kw.pop('ignore_start_callback', False)
-        self.ignore_start_callback = 'true' if self.ignore_start_callback else 'false'
+        self.filters = kw.pop("filters", None)
+        self.callback = kw.pop("callback", None)
+        self.ignore_start_callback = kw.pop("ignore_start_callback", False)
+        self.ignore_start_callback = (
+            "true" if self.ignore_start_callback else "false"
+        )
         super(PropertyWatch, self).__init__(**kw)
 
     def factory(self, objs):
-        '''Create any filters for this property watch.'''
+        """Create any filters for this property watch."""
 
         if self.filters:
             # Get the datatype(i.e. "int64_t") of the properties in this watch
             # (Made available after all `super` classes init'd)
-            datatype = objs['propertygroup'][get_index(
-                objs,
-                'propertygroup',
-                self.properties,
-                config=self.configfile)].datatype
+            datatype = objs["propertygroup"][
+                get_index(
+                    objs,
+                    "propertygroup",
+                    self.properties,
+                    config=self.configfile,
+                )
+            ].datatype
             # Get the type(i.e. "int64") of the properties in this watch
             # (Made available after all `super` classes init'd)
-            type = objs['propertygroup'][get_index(
-                objs,
-                'propertygroup',
-                self.properties,
-                config=self.configfile)].type
+            type = objs["propertygroup"][
+                get_index(
+                    objs,
+                    "propertygroup",
+                    self.properties,
+                    config=self.configfile,
+                )
+            ].type
             # Construct the data needed to make the filters for
             # this watch available.
             # *Note: 'class', 'subclass', 'name' are required for
             # storing the filter data(i.e. 'type', 'datatype', & 'filters')
             args = {
-                'type': type,
-                'datatype': datatype,
-                'filters': self.filters,
-                'class': 'filtersgroup',
-                'filtersgroup': 'filters',
-                'name': self.name,
+                "type": type,
+                "datatype": datatype,
+                "filters": self.filters,
+                "class": "filtersgroup",
+                "filtersgroup": "filters",
+                "name": self.name,
             }
             # Init GroupOfFilters class with this watch's filters' arguments
             group = GroupOfFilters(configfile=self.configfile, **args)
@@ -719,72 +699,70 @@
         super(PropertyWatch, self).factory(objs)
 
     def setup(self, objs):
-        '''Resolve optional filters and callback.'''
+        """Resolve optional filters and callback."""
 
         if self.filters:
             # Watch has filters, provide array index to access them
             self.filters = get_index(
-                objs,
-                'filtersgroup',
-                self.name,
-                config=self.configfile)
+                objs, "filtersgroup", self.name, config=self.configfile
+            )
 
         if self.callback:
             self.callback = get_index(
-                objs,
-                'callback',
-                self.callback,
-                config=self.configfile)
+                objs, "callback", self.callback, config=self.configfile
+            )
 
         super(PropertyWatch, self).setup(objs)
 
+
 class PathWatch(HasPathIndex):
-    '''Handle the path watch config file directive.'''
+    """Handle the path watch config file directive."""
 
     def __init__(self, *a, **kw):
-        self.pathcallback = kw.pop('pathcallback', None)
+        self.pathcallback = kw.pop("pathcallback", None)
         super(PathWatch, self).__init__(**kw)
 
     def setup(self, objs):
-        '''Resolve optional callback.'''
+        """Resolve optional callback."""
         if self.pathcallback:
             self.pathcallback = get_index(
-                objs,
-                'pathcallback',
-                self.pathcallback,
-                config=self.configfile)
+                objs, "pathcallback", self.pathcallback, config=self.configfile
+            )
         super(PathWatch, self).setup(objs)
 
+
 class Callback(HasPropertyIndex):
-    '''Interface and common logic for callbacks.'''
+    """Interface and common logic for callbacks."""
 
     def __init__(self, *a, **kw):
         super(Callback, self).__init__(**kw)
 
+
 class PathCallback(HasPathIndex):
-    '''Interface and common logic for callbacks.'''
+    """Interface and common logic for callbacks."""
 
     def __init__(self, *a, **kw):
         super(PathCallback, self).__init__(**kw)
 
+
 class ConditionCallback(ConfigEntry, Renderer):
-    '''Handle the journal callback config file directive.'''
+    """Handle the journal callback config file directive."""
 
     def __init__(self, *a, **kw):
-        self.condition = kw.pop('condition')
-        self.instance = kw.pop('instance')
-        self.defer = kw.pop('defer', None)
+        self.condition = kw.pop("condition")
+        self.instance = kw.pop("instance")
+        self.defer = kw.pop("defer", None)
         super(ConditionCallback, self).__init__(**kw)
 
     def factory(self, objs):
-        '''Create a graph instance for this callback.'''
+        """Create a graph instance for this callback."""
 
         args = {
-            'configfile': self.configfile,
-            'members': [self.instance],
-            'class': 'callbackgroup',
-            'callbackgroup': 'callback',
-            'name': [self.instance]
+            "configfile": self.configfile,
+            "members": [self.instance],
+            "class": "callbackgroup",
+            "callbackgroup": "callback",
+            "name": [self.instance],
         }
 
         entry = CallbackGraphEntry(**args)
@@ -793,49 +771,43 @@
         super(ConditionCallback, self).factory(objs)
 
     def setup(self, objs):
-        '''Resolve condition and graph entry.'''
+        """Resolve condition and graph entry."""
 
         self.graph = get_index(
-            objs,
-            'callbackgroup',
-            [self.instance],
-            config=self.configfile)
+            objs, "callbackgroup", [self.instance], config=self.configfile
+        )
 
         self.condition = get_index(
-            objs,
-            'condition',
-            self.name,
-            config=self.configfile)
+            objs, "condition", self.name, config=self.configfile
+        )
 
         super(ConditionCallback, self).setup(objs)
 
     def construct(self, loader, indent):
         return self.render(
-            loader,
-            'conditional.mako.cpp',
-            c=self,
-            indent=indent)
+            loader, "conditional.mako.cpp", c=self, indent=indent
+        )
 
 
 class Condition(HasPropertyIndex):
-    '''Interface and common logic for conditions.'''
+    """Interface and common logic for conditions."""
 
     def __init__(self, *a, **kw):
-        self.callback = kw.pop('callback')
-        self.defer = kw.pop('defer', None)
+        self.callback = kw.pop("callback")
+        self.defer = kw.pop("defer", None)
         super(Condition, self).__init__(**kw)
 
     def factory(self, objs):
-        '''Create a callback instance for this conditional.'''
+        """Create a callback instance for this conditional."""
 
         args = {
-            'configfile': self.configfile,
-            'condition': self.name,
-            'class': 'callback',
-            'callback': 'conditional',
-            'instance': self.callback,
-            'name': self.name,
-            'defer': self.defer
+            "configfile": self.configfile,
+            "condition": self.name,
+            "class": "callback",
+            "callback": "conditional",
+            "instance": self.callback,
+            "name": self.name,
+            "defer": self.defer,
         }
 
         callback = ConditionCallback(**args)
@@ -846,297 +818,232 @@
 
 
 class CountCondition(Condition, Renderer):
-    '''Handle the count condition config file directive.'''
+    """Handle the count condition config file directive."""
 
     def __init__(self, *a, **kw):
-        self.countop = kw.pop('countop')
-        self.countbound = kw.pop('countbound')
-        self.op = kw.pop('op')
-        self.bound = kw.pop('bound')
+        self.countop = kw.pop("countop")
+        self.countbound = kw.pop("countbound")
+        self.op = kw.pop("op")
+        self.bound = kw.pop("bound")
         self.oneshot = TrivialArgument(
-            type='boolean',
-            value=kw.pop('oneshot', False))
+            type="boolean", value=kw.pop("oneshot", False)
+        )
         super(CountCondition, self).__init__(**kw)
 
     def setup(self, objs):
-        '''Resolve type.'''
+        """Resolve type."""
 
         super(CountCondition, self).setup(objs)
-        self.bound = TrivialArgument(
-            type=self.type,
-            value=self.bound)
+        self.bound = TrivialArgument(type=self.type, value=self.bound)
 
     def construct(self, loader, indent):
-        return self.render(
-            loader,
-            'count.mako.cpp',
-            c=self,
-            indent=indent)
+        return self.render(loader, "count.mako.cpp", c=self, indent=indent)
 
 
 class MedianCondition(Condition, Renderer):
-    '''Handle the median condition config file directive.'''
+    """Handle the median condition config file directive."""
 
     def __init__(self, *a, **kw):
-        self.op = kw.pop('op')
-        self.bound = kw.pop('bound')
+        self.op = kw.pop("op")
+        self.bound = kw.pop("bound")
         self.oneshot = TrivialArgument(
-            type='boolean',
-            value=kw.pop('oneshot', False))
+            type="boolean", value=kw.pop("oneshot", False)
+        )
         super(MedianCondition, self).__init__(**kw)
 
     def setup(self, objs):
-        '''Resolve type.'''
+        """Resolve type."""
 
         super(MedianCondition, self).setup(objs)
-        self.bound = TrivialArgument(
-            type=self.type,
-            value=self.bound)
+        self.bound = TrivialArgument(type=self.type, value=self.bound)
 
     def construct(self, loader, indent):
-        return self.render(
-            loader,
-            'median.mako.cpp',
-            c=self,
-            indent=indent)
+        return self.render(loader, "median.mako.cpp", c=self, indent=indent)
 
 
 class Journal(Callback, Renderer):
-    '''Handle the journal callback config file directive.'''
+    """Handle the journal callback config file directive."""
 
     def __init__(self, *a, **kw):
-        self.severity = kw.pop('severity')
-        self.message = kw.pop('message')
+        self.severity = kw.pop("severity")
+        self.message = kw.pop("message")
         super(Journal, self).__init__(**kw)
 
     def construct(self, loader, indent):
-        return self.render(
-            loader,
-            'journal.mako.cpp',
-            c=self,
-            indent=indent)
+        return self.render(loader, "journal.mako.cpp", c=self, indent=indent)
 
 
 class Elog(Callback, Renderer):
-    '''Handle the elog callback config file directive.'''
+    """Handle the elog callback config file directive."""
 
     def __init__(self, *a, **kw):
-        self.error = kw.pop('error')
-        self.metadata = [Metadata(**x) for x in kw.pop('metadata', {})]
+        self.error = kw.pop("error")
+        self.metadata = [Metadata(**x) for x in kw.pop("metadata", {})]
         super(Elog, self).__init__(**kw)
 
     def construct(self, loader, indent):
-        with open(args.gen_errors, 'a') as fd:
-            fd.write(
-                self.render(
-                    loader,
-                    'errors.mako.hpp',
-                    c=self))
-        return self.render(
-            loader,
-            'elog.mako.cpp',
-            c=self,
-            indent=indent)
+        with open(args.gen_errors, "a") as fd:
+            fd.write(self.render(loader, "errors.mako.hpp", c=self))
+        return self.render(loader, "elog.mako.cpp", c=self, indent=indent)
+
 
 class Event(Callback, Renderer):
-    '''Handle the event callback config file directive.'''
+    """Handle the event callback config file directive."""
 
     def __init__(self, *a, **kw):
-        self.eventName = kw.pop('eventName')
-        self.eventMessage = kw.pop('eventMessage')
+        self.eventName = kw.pop("eventName")
+        self.eventMessage = kw.pop("eventMessage")
         super(Event, self).__init__(**kw)
 
     def construct(self, loader, indent):
-        return self.render(
-            loader,
-            'event.mako.cpp',
-            c=self,
-            indent=indent)
+        return self.render(loader, "event.mako.cpp", c=self, indent=indent)
+
 
 class EventPath(PathCallback, Renderer):
-    '''Handle the event path callback config file directive.'''
+    """Handle the event path callback config file directive."""
 
     def __init__(self, *a, **kw):
-        self.eventType = kw.pop('eventType')
+        self.eventType = kw.pop("eventType")
         super(EventPath, self).__init__(**kw)
 
     def construct(self, loader, indent):
-        return self.render(
-            loader,
-            'eventpath.mako.cpp',
-            c=self,
-            indent=indent)
+        return self.render(loader, "eventpath.mako.cpp", c=self, indent=indent)
+
 
 class ElogWithMetadata(Callback, Renderer):
-    '''Handle the elog_with_metadata callback config file directive.'''
+    """Handle the elog_with_metadata callback config file directive."""
 
     def __init__(self, *a, **kw):
-        self.error = kw.pop('error')
-        self.metadata = kw.pop('metadata')
+        self.error = kw.pop("error")
+        self.metadata = kw.pop("metadata")
         super(ElogWithMetadata, self).__init__(**kw)
 
     def construct(self, loader, indent):
-        with open(args.gen_errors, 'a') as fd:
-            fd.write(
-                self.render(
-                    loader,
-                    'errors.mako.hpp',
-                    c=self))
+        with open(args.gen_errors, "a") as fd:
+            fd.write(self.render(loader, "errors.mako.hpp", c=self))
         return self.render(
-            loader,
-            'elog_with_metadata.mako.cpp',
-            c=self,
-            indent=indent)
+            loader, "elog_with_metadata.mako.cpp", c=self, indent=indent
+        )
 
 
 class ResolveCallout(Callback, Renderer):
-    '''Handle the 'resolve callout' callback config file directive.'''
+    """Handle the 'resolve callout' callback config file directive."""
 
     def __init__(self, *a, **kw):
-        self.callout = kw.pop('callout')
+        self.callout = kw.pop("callout")
         super(ResolveCallout, self).__init__(**kw)
 
     def construct(self, loader, indent):
         return self.render(
-            loader,
-            'resolve_errors.mako.cpp',
-            c=self,
-            indent=indent)
+            loader, "resolve_errors.mako.cpp", c=self, indent=indent
+        )
 
 
 class Method(ConfigEntry, Renderer):
-    '''Handle the method callback config file directive.'''
+    """Handle the method callback config file directive."""
 
     def __init__(self, *a, **kw):
-        self.service = kw.pop('service')
-        self.path = kw.pop('path')
-        self.interface = kw.pop('interface')
-        self.method = kw.pop('method')
-        self.args = [TrivialArgument(**x) for x in kw.pop('args', {})]
+        self.service = kw.pop("service")
+        self.path = kw.pop("path")
+        self.interface = kw.pop("interface")
+        self.method = kw.pop("method")
+        self.args = [TrivialArgument(**x) for x in kw.pop("args", {})]
         super(Method, self).__init__(**kw)
 
     def factory(self, objs):
         args = {
-            'class': 'interface',
-            'interface': 'element',
-            'name': self.service
+            "class": "interface",
+            "interface": "element",
+            "name": self.service,
         }
-        add_unique(ConfigEntry(
-            configfile=self.configfile, **args), objs)
+        add_unique(ConfigEntry(configfile=self.configfile, **args), objs)
+
+        args = {"class": "pathname", "pathname": "element", "name": self.path}
+        add_unique(ConfigEntry(configfile=self.configfile, **args), objs)
 
         args = {
-            'class': 'pathname',
-            'pathname': 'element',
-            'name': self.path
+            "class": "interface",
+            "interface": "element",
+            "name": self.interface,
         }
-        add_unique(ConfigEntry(
-            configfile=self.configfile, **args), objs)
+        add_unique(ConfigEntry(configfile=self.configfile, **args), objs)
 
         args = {
-            'class': 'interface',
-            'interface': 'element',
-            'name': self.interface
+            "class": "propertyname",
+            "propertyname": "element",
+            "name": self.method,
         }
-        add_unique(ConfigEntry(
-            configfile=self.configfile, **args), objs)
-
-        args = {
-            'class': 'propertyname',
-            'propertyname': 'element',
-            'name': self.method
-        }
-        add_unique(ConfigEntry(
-            configfile=self.configfile, **args), objs)
+        add_unique(ConfigEntry(configfile=self.configfile, **args), objs)
 
         super(Method, self).factory(objs)
 
     def setup(self, objs):
-        '''Resolve elements.'''
+        """Resolve elements."""
 
-        self.service = get_index(
-            objs,
-            'interface',
-            self.service)
+        self.service = get_index(objs, "interface", self.service)
 
-        self.path = get_index(
-            objs,
-            'pathname',
-            self.path)
+        self.path = get_index(objs, "pathname", self.path)
 
-        self.interface = get_index(
-            objs,
-            'interface',
-            self.interface)
+        self.interface = get_index(objs, "interface", self.interface)
 
-        self.method = get_index(
-            objs,
-            'propertyname',
-            self.method)
+        self.method = get_index(objs, "propertyname", self.method)
 
         super(Method, self).setup(objs)
 
     def construct(self, loader, indent):
-        return self.render(
-            loader,
-            'method.mako.cpp',
-            c=self,
-            indent=indent)
+        return self.render(loader, "method.mako.cpp", c=self, indent=indent)
 
 
 class CallbackGraphEntry(Group):
-    '''An entry in a traversal list for groups of callbacks.'''
+    """An entry in a traversal list for groups of callbacks."""
 
     def __init__(self, *a, **kw):
         super(CallbackGraphEntry, self).__init__(**kw)
 
     def setup(self, objs):
-        '''Resolve group members.'''
+        """Resolve group members."""
 
         def map_member(x):
-            return get_index(
-                objs, 'callback', x, config=self.configfile)
+            return get_index(objs, "callback", x, config=self.configfile)
 
-        self.members = map(
-            map_member,
-            self.members)
+        self.members = map(map_member, self.members)
 
         super(CallbackGraphEntry, self).setup(objs)
 
+
 class PathCallbackGraphEntry(Group):
-    '''An entry in a traversal list for groups of callbacks.'''
+    """An entry in a traversal list for groups of callbacks."""
 
     def __init__(self, *a, **kw):
         super(PathCallbackGraphEntry, self).__init__(**kw)
 
     def setup(self, objs):
-        '''Resolve group members.'''
+        """Resolve group members."""
 
         def map_member(x):
-            return get_index(
-                objs, 'pathcallback', x, config=self.configfile)
+            return get_index(objs, "pathcallback", x, config=self.configfile)
 
-        self.members = map(
-            map_member,
-            self.members)
+        self.members = map(map_member, self.members)
 
         super(PathCallbackGraphEntry, self).setup(objs)
 
+
 class GroupOfCallbacks(ConfigEntry, Renderer):
-    '''Handle the callback group config file directive.'''
+    """Handle the callback group config file directive."""
 
     def __init__(self, *a, **kw):
-        self.members = kw.pop('members')
+        self.members = kw.pop("members")
         super(GroupOfCallbacks, self).__init__(**kw)
 
     def factory(self, objs):
-        '''Create a graph instance for this group of callbacks.'''
+        """Create a graph instance for this group of callbacks."""
 
         args = {
-            'configfile': self.configfile,
-            'members': self.members,
-            'class': 'callbackgroup',
-            'callbackgroup': 'callback',
-            'name': self.members
+            "configfile": self.configfile,
+            "members": self.members,
+            "class": "callbackgroup",
+            "callbackgroup": "callback",
+            "name": self.members,
         }
 
         entry = CallbackGraphEntry(**args)
@@ -1145,36 +1052,36 @@
         super(GroupOfCallbacks, self).factory(objs)
 
     def setup(self, objs):
-        '''Resolve graph entry.'''
+        """Resolve graph entry."""
 
         self.graph = get_index(
-            objs, 'callbackgroup', self.members, config=self.configfile)
+            objs, "callbackgroup", self.members, config=self.configfile
+        )
 
         super(GroupOfCallbacks, self).setup(objs)
 
     def construct(self, loader, indent):
         return self.render(
-            loader,
-            'callbackgroup.mako.cpp',
-            c=self,
-            indent=indent)
+            loader, "callbackgroup.mako.cpp", c=self, indent=indent
+        )
+
 
 class GroupOfPathCallbacks(ConfigEntry, Renderer):
-    '''Handle the callback group config file directive.'''
+    """Handle the callback group config file directive."""
 
     def __init__(self, *a, **kw):
-        self.members = kw.pop('members')
+        self.members = kw.pop("members")
         super(GroupOfPathCallbacks, self).__init__(**kw)
 
     def factory(self, objs):
-        '''Create a graph instance for this group of callbacks.'''
+        """Create a graph instance for this group of callbacks."""
 
         args = {
-            'configfile': self.configfile,
-            'members': self.members,
-            'class': 'pathcallbackgroup',
-            'pathcallbackgroup': 'pathcallback',
-            'name': self.members
+            "configfile": self.configfile,
+            "members": self.members,
+            "class": "pathcallbackgroup",
+            "pathcallbackgroup": "pathcallback",
+            "name": self.members,
         }
 
         entry = PathCallbackGraphEntry(**args)
@@ -1182,98 +1089,98 @@
         super(GroupOfPathCallbacks, self).factory(objs)
 
     def setup(self, objs):
-        '''Resolve graph entry.'''
+        """Resolve graph entry."""
 
         self.graph = get_index(
-            objs, 'callbackpathgroup', self.members, config=self.configfile)
+            objs, "callbackpathgroup", self.members, config=self.configfile
+        )
 
         super(GroupOfPathCallbacks, self).setup(objs)
 
     def construct(self, loader, indent):
         return self.render(
-            loader,
-            'callbackpathgroup.mako.cpp',
-            c=self,
-            indent=indent)
+            loader, "callbackpathgroup.mako.cpp", c=self, indent=indent
+        )
+
 
 class Everything(Renderer):
-    '''Parse/render entry point.'''
+    """Parse/render entry point."""
 
     @staticmethod
     def classmap(cls, sub=None):
-        '''Map render item class and subclass entries to the appropriate
-        handler methods.'''
+        """Map render item class and subclass entries to the appropriate
+        handler methods."""
         class_map = {
-            'path': {
-                'element': Path,
+            "path": {
+                "element": Path,
             },
-            'pathgroup': {
-                'path': GroupOfPaths,
+            "pathgroup": {
+                "path": GroupOfPaths,
             },
-            'propertygroup': {
-                'property': GroupOfProperties,
+            "propertygroup": {
+                "property": GroupOfProperties,
             },
-            'property': {
-                'element': Property,
+            "property": {
+                "element": Property,
             },
-            'watch': {
-                'property': PropertyWatch,
+            "watch": {
+                "property": PropertyWatch,
             },
-            'pathwatch': {
-                'path': PathWatch,
+            "pathwatch": {
+                "path": PathWatch,
             },
-            'instance': {
-                'element': Instance,
+            "instance": {
+                "element": Instance,
             },
-            'pathinstance': {
-                'element': PathInstance,
+            "pathinstance": {
+                "element": PathInstance,
             },
-            'callback': {
-                'journal': Journal,
-                'elog': Elog,
-                'elog_with_metadata': ElogWithMetadata,
-                'event': Event,
-                'group': GroupOfCallbacks,
-                'method': Method,
-                'resolve callout': ResolveCallout,
+            "callback": {
+                "journal": Journal,
+                "elog": Elog,
+                "elog_with_metadata": ElogWithMetadata,
+                "event": Event,
+                "group": GroupOfCallbacks,
+                "method": Method,
+                "resolve callout": ResolveCallout,
             },
-            'pathcallback': {
-                'eventpath': EventPath,
-                'grouppath': GroupOfPathCallbacks,
+            "pathcallback": {
+                "eventpath": EventPath,
+                "grouppath": GroupOfPathCallbacks,
             },
-            'condition': {
-                'count': CountCondition,
-                'median': MedianCondition,
+            "condition": {
+                "count": CountCondition,
+                "median": MedianCondition,
             },
         }
 
         if cls not in class_map:
             raise NotImplementedError('Unknown class: "{0}"'.format(cls))
         if sub not in class_map[cls]:
-            raise NotImplementedError('Unknown {0} type: "{1}"'.format(
-                cls, sub))
+            raise NotImplementedError(
+                'Unknown {0} type: "{1}"'.format(cls, sub)
+            )
 
         return class_map[cls][sub]
 
     @staticmethod
     def load_one_yaml(path, fd, objs):
-        '''Parse a single YAML file.  Parsing occurs in three phases.
+        """Parse a single YAML file.  Parsing occurs in three phases.
         In the first phase a factory method associated with each
         configuration file directive is invoked.  These factory
         methods generate more factory methods.  In the second
         phase the factory methods created in the first phase
         are invoked.  In the last phase a callback is invoked on
         each object created in phase two.  Typically the callback
-        resolves references to other configuration file directives.'''
+        resolves references to other configuration file directives."""
 
         factory_objs = {}
         for x in yaml.safe_load(fd.read()) or {}:
-
             # Create factory object for this config file directive.
-            cls = x['class']
+            cls = x["class"]
             sub = x.get(cls)
-            if cls == 'group':
-                cls = '{0}group'.format(sub)
+            if cls == "group":
+                cls = "{0}group".format(sub)
 
             factory = Everything.classmap(cls, sub)
             obj = factory(configfile=path, **x)
@@ -1294,17 +1201,17 @@
 
     @staticmethod
     def load(args):
-        '''Aggregate all the YAML in the input directory
-        into a single aggregate.'''
+        """Aggregate all the YAML in the input directory
+        into a single aggregate."""
 
         objs = {}
         yaml_files = filter(
-            lambda x: x.endswith('.yaml'),
-            os.listdir(args.inputdir))
+            lambda x: x.endswith(".yaml"), os.listdir(args.inputdir)
+        )
 
         for x in sorted(yaml_files):
             path = os.path.join(args.inputdir, x)
-            with open(path, 'r') as fd:
+            with open(path, "r") as fd:
                 Everything.load_one_yaml(path, fd, objs)
 
         # Configuration file directives reference each other via
@@ -1321,35 +1228,35 @@
         return Everything(**objs)
 
     def __init__(self, *a, **kw):
-        self.pathmeta = kw.pop('path', [])
-        self.paths = kw.pop('pathname', [])
-        self.meta = kw.pop('meta', [])
-        self.pathgroups = kw.pop('pathgroup', [])
-        self.interfaces = kw.pop('interface', [])
-        self.properties = kw.pop('property', [])
-        self.propertynames = kw.pop('propertyname', [])
-        self.propertygroups = kw.pop('propertygroup', [])
-        self.instances = kw.pop('instance', [])
-        self.pathinstances = kw.pop('pathinstance', [])
-        self.instancegroups = kw.pop('instancegroup', [])
-        self.pathinstancegroups = kw.pop('pathinstancegroup', [])
-        self.watches = kw.pop('watch', [])
-        self.pathwatches = kw.pop('pathwatch', [])
-        self.callbacks = kw.pop('callback', [])
-        self.pathcallbacks = kw.pop('pathcallback', [])
-        self.callbackgroups = kw.pop('callbackgroup', [])
-        self.pathcallbackgroups = kw.pop('pathcallbackgroup', [])
-        self.conditions = kw.pop('condition', [])
-        self.filters = kw.pop('filtersgroup', [])
+        self.pathmeta = kw.pop("path", [])
+        self.paths = kw.pop("pathname", [])
+        self.meta = kw.pop("meta", [])
+        self.pathgroups = kw.pop("pathgroup", [])
+        self.interfaces = kw.pop("interface", [])
+        self.properties = kw.pop("property", [])
+        self.propertynames = kw.pop("propertyname", [])
+        self.propertygroups = kw.pop("propertygroup", [])
+        self.instances = kw.pop("instance", [])
+        self.pathinstances = kw.pop("pathinstance", [])
+        self.instancegroups = kw.pop("instancegroup", [])
+        self.pathinstancegroups = kw.pop("pathinstancegroup", [])
+        self.watches = kw.pop("watch", [])
+        self.pathwatches = kw.pop("pathwatch", [])
+        self.callbacks = kw.pop("callback", [])
+        self.pathcallbacks = kw.pop("pathcallback", [])
+        self.callbackgroups = kw.pop("callbackgroup", [])
+        self.pathcallbackgroups = kw.pop("pathcallbackgroup", [])
+        self.conditions = kw.pop("condition", [])
+        self.filters = kw.pop("filtersgroup", [])
 
         super(Everything, self).__init__(**kw)
 
     def generate_cpp(self, loader):
-        '''Render the template with the provided data.'''
+        """Render the template with the provided data."""
         # errors.hpp is used by generated.hpp to included any error.hpp files
-        open(args.gen_errors, 'w+')
+        open(args.gen_errors, "w+")
 
-        with open(args.output, 'w') as fd:
+        with open(args.output, "w") as fd:
             fd.write(
                 self.render(
                     loader,
@@ -1374,57 +1281,79 @@
                     pathcallbackgroups=self.pathcallbackgroups,
                     conditions=self.conditions,
                     filters=self.filters,
-                    indent=Indent()))
+                    indent=Indent(),
+                )
+            )
 
-if __name__ == '__main__':
+
+if __name__ == "__main__":
     script_dir = os.path.dirname(os.path.realpath(__file__))
     valid_commands = {
-        'generate-cpp': 'generate_cpp',
+        "generate-cpp": "generate_cpp",
     }
 
     parser = ArgumentParser(
-        description='Phosphor DBus Monitor (PDM) YAML '
-        'scanner and code generator.')
+        description=(
+            "Phosphor DBus Monitor (PDM) YAML scanner and code generator."
+        )
+    )
 
     parser.add_argument(
-        "-o", "--out", dest="output",
-        default='generated.cpp',
-        help="Generated output file name and path.")
+        "-o",
+        "--out",
+        dest="output",
+        default="generated.cpp",
+        help="Generated output file name and path.",
+    )
     parser.add_argument(
-        '-t', '--template', dest='template',
-        default='generated.mako.hpp',
-        help='The top level template to render.')
+        "-t",
+        "--template",
+        dest="template",
+        default="generated.mako.hpp",
+        help="The top level template to render.",
+    )
     parser.add_argument(
-        '-e', '--errors', dest='gen_errors',
-        default='errors.hpp',
-        help='Generated errors.hpp output filename.')
+        "-e",
+        "--errors",
+        dest="gen_errors",
+        default="errors.hpp",
+        help="Generated errors.hpp output filename.",
+    )
     parser.add_argument(
-        '-p', '--template-path', dest='template_search',
+        "-p",
+        "--template-path",
+        dest="template_search",
         default=script_dir,
-        help='The space delimited mako template search path.')
+        help="The space delimited mako template search path.",
+    )
     parser.add_argument(
-        '-d', '--dir', dest='inputdir',
-        default=os.path.join(script_dir, 'example'),
-        help='Location of files to process.')
+        "-d",
+        "--dir",
+        dest="inputdir",
+        default=os.path.join(script_dir, "example"),
+        help="Location of files to process.",
+    )
     parser.add_argument(
-        'command', metavar='COMMAND', type=str,
+        "command",
+        metavar="COMMAND",
+        type=str,
         choices=valid_commands.keys(),
-        help='%s.' % " | ".join(valid_commands.keys()))
+        help="%s." % " | ".join(valid_commands.keys()),
+    )
 
     args = parser.parse_args()
 
     if sys.version_info < (3, 0):
         lookup = mako.lookup.TemplateLookup(
-            directories=args.template_search.split(),
-            disable_unicode=True)
+            directories=args.template_search.split(), disable_unicode=True
+        )
     else:
         lookup = mako.lookup.TemplateLookup(
-            directories=args.template_search.split())
+            directories=args.template_search.split()
+        )
     try:
-        function = getattr(
-            Everything.load(args),
-            valid_commands[args.command])
+        function = getattr(Everything.load(args), valid_commands[args.command])
         function(lookup)
     except InvalidConfigError as e:
-        sys.stdout.write('{0}: {1}\n\n'.format(e.config, e.msg))
+        sys.stdout.write("{0}: {1}\n\n".format(e.config, e.msg))
         raise