chiark / gitweb /
Rework app into a class
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 28 Nov 2015 12:09:47 +0000 (13:09 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Sat, 28 Nov 2015 16:11:05 +0000 (17:11 +0100)
commitab614ab4420cf550dc794e5746d2964270a7f073
treea877f7b15e0a5c00f89150657a45a1b78a63b370
parentde12cfdbe1cdfe07b8e5c0af49cc15fe75745c6f
Rework app into a class

This simplifies usage, goes from

app['Foo']
to
app.Foo

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.
18 files changed:
fdroidserver/build.py
fdroidserver/checkupdates.py
fdroidserver/common.py
fdroidserver/import.py
fdroidserver/lint.py
fdroidserver/metadata.py
fdroidserver/publish.py
fdroidserver/rewritemeta.py
fdroidserver/scanner.py
fdroidserver/stats.py
fdroidserver/update.py
tests/common.TestCase
tests/import.TestCase
tests/metadata.TestCase
tests/metadata/net.osmand.plus.pickle
tests/metadata/org.adaway.pickle
tests/metadata/org.smssecure.smssecure.pickle
tests/metadata/org.videolan.vlc.pickle