Update to schema definition syntax

Bug #753395 reported by Łukasz Czyżykowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
configglue
Fix Released
Low
Ricardo Kirkner

Bug Description

Currently sections are defined as local variables in the class scope
when defining schema. This approach works, but the sections are not
visually distinct from each other. Better approach would be to use
inner classes to achieve the scoping of options. An example:

    class ASchema(Schema):

        class database(Section):
            host = StringOption()
            port = IntOption()
            username = StringOption()
            password = StringOption()

        class login(Section):
            url = StringOption()
            access_token = StringOption()

instead of current:

    class ASchema(Schema):

        database = ConfigSection()
        database.host = StringOption()
        database.port = IntOption()
        database.username = StringOption()
        database.password = StringOption()

        login = ConfigSection()
        login.url = StringOption()
        login.access_token = StringOption()

Changed in configglue:
assignee: nobody → Ricardo Kirkner (ricardokirkner)
importance: Undecided → Low
status: New → Fix Committed
Changed in configglue:
milestone: none → 0.11
Changed in configglue:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.