Rework build into a class

This simplifies usage, goes from

    build['flag']
to
    build.flag

Also makes static analyzers able to detect invalid attributes as the set
is now limited in the class definition.

As a bonus, setting of the default field values is now done in the
constructor, not separately and manually.

While at it, unify "build", "thisbuild", "info", "thisinfo", etc into
just "build".
This commit is contained in:
Daniel Martí 2015-11-28 17:55:27 +01:00
parent 2c12485aeb
commit bf8518ee8f
15 changed files with 6997 additions and 8636 deletions

View file

@ -46,8 +46,9 @@ class MetadataTest(unittest.TestCase):
frompickle = pickle.load(f)
frommeta = app.field_dict()
self.assertEquals(frommeta, frompickle)
# Uncomment to overwrite
# with open(savepath, 'wb') as f:
# pickle.dump(app, f)
# pickle.dump(frommeta, f)
if __name__ == "__main__":