~conjure/conjure/urwid-ubuntu

« back to all changes in this revision

Viewing changes to ubuntui/widgets/input.py

  • Committer: GitHub
  • Author(s): Adam Stokes
  • Date: 2016-09-07 13:24:49 UTC
  • Revision ID: git-v1:fbe17bcf0b845ce9af6e442a77bd0eb208d69f34
autopep8, remove subheader (#2)

Signed-off-by: Adam Stokes <battlemidget@users.noreply.github.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
    Initializes and Edit object and attachs its result
14
14
    to the `value` accessor.
15
15
    """
 
16
 
16
17
    def __init__(self, caption=None, default=None, **kwargs):
17
18
        if caption is None:
18
19
            caption = ""
46
47
class PasswordEditor(StringEditor):
47
48
    """ Password input prompt with masking
48
49
    """
 
50
 
49
51
    def __init__(self, caption=None, mask="*"):
50
52
        super().__init__(caption, mask=mask)
51
53
 
101
103
class IntegerEditor(WidgetWrap):
102
104
    """ IntEdit input class
103
105
    """
 
106
 
104
107
    def __init__(self, caption=None, default=0):
105
108
        if caption is None:
106
109
            caption = ""
115
118
class Selector(WidgetWrap):
116
119
    """ Radio selection list of options
117
120
    """
 
121
 
118
122
    def __init__(self, opts):
119
123
        """
120
124
        :param list opts: list of options to display
162
166
class YesNo(Selector):
163
167
    """ Yes/No selector
164
168
    """
 
169
 
165
170
    def __init__(self):
166
171
        opts = ['Yes', 'No']
167
172
        super().__init__(opts)