~yellow/launchpad/accordion-overlay-2

« back to all changes in this revision

Viewing changes to lib/lp/services/features/browser/info.py

  • Committer: Brad Crittenden
  • Date: 2011-02-28 14:19:28 UTC
  • mfrom: (12393.2.88 launchpad)
  • Revision ID: bac@canonical.com-20110228141928-ocszdg7fdcax9j8e
MergeĀ fromĀ devel

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
from lp.services.features.flags import (
16
16
    flag_info,
17
17
    undocumented_flags,
 
18
    value_domain_info,
18
19
    )
19
20
from lp.services.features.scopes import (
20
21
    HANDLERS,
25
26
 
26
27
# Named tuples to use when passing flag and scope data to the template.
27
28
Flag = namedtuple('Flag', ('name', 'domain', 'description', 'default'))
 
29
ValueDomain = namedtuple('ValueDomain', ('name', 'description'))
28
30
Scope = namedtuple('Scope', ('regex', 'description'))
29
31
 
30
32
 
45
47
        return ', '.join(undocumented_flags)
46
48
 
47
49
    @property
 
50
    def value_domain_info(self):
 
51
        """A list of flags as named tuples, ready to be rendered."""
 
52
        return map(ValueDomain._make, value_domain_info)
 
53
 
 
54
    @property
48
55
    def undocumented_scopes(self):
49
56
        """Scope names referenced during process lifetime but not documented.
50
57
        """