Stricter PEP-8 conformance.
[python-bulletml.git] / bulletml / bulletyaml.py
index ea45436..2ec2f08 100644 (file)
@@ -13,7 +13,7 @@ Example BulletYAML document:
     !BulletML
     type: vertical
     actions:
-      top: !ActionDef
+      - !ActionDef
         actions:
         - !FireDef
           bullet: !BulletDef {}
@@ -30,16 +30,19 @@ def register(Loader=None, Dumper=None):
                 parser.Repeat, parser.Accel, parser.BulletDef,
                 parser.BulletRef, parser.ActionDef, parser.ActionRef,
                 parser.FireDef, parser.FireRef, parser.Offset,
-                parser.BulletML]:
+                parser.Appearance, parser.If, parser.BulletML]:
 
         def add(cls, loader, dumper):
+            """Register a class in a new variable scope."""
             tag = "!" + cls.__name__
             if loader:
                 def construct(loader, node):
+                    """Construct an object."""
                     return loader.construct_yaml_object(node, cls)
                 loader.add_constructor(tag, construct)
             if dumper:
                 def represent(dumper, obj):
+                    """Represent an object."""
                     return dumper.represent_yaml_object(tag, obj, cls)
                 dumper.add_representer(cls, represent)