Browse Source

linter fixes

pull/119/head
Alexander Gordeyev 9 years ago
parent
commit
8f2b951d18
2 changed files with 6 additions and 6 deletions
  1. 4
      gooey/gui/widgets/components.py
  2. 8
      gooey/gui/widgets/widget_pack.py

4
gooey/gui/widgets/components.py

@ -145,7 +145,7 @@ class CheckBox(BaseGuiComponent):
return self.panel
def onSetter(self, evt):
self.getValue()
self.GetValue()
def onResize(self, evt):
msg = self.help_msg
@ -211,7 +211,7 @@ class RadioGroup(object):
return self.panel
def onSetter(self, evt):
self.getValue()
self.GetValue()
def onResize(self, evt):
msg = self.help_msgs[0]

8
gooey/gui/widgets/widget_pack.py

@ -47,9 +47,9 @@ class BaseChooser(WidgetPack):
self.text_box = None
self.button = None
def build(self, parent, data=None):
def build(self, parent, data):
self.parent = parent
self.option_string = data['commands'][0] if data['commands'] else ''
self.option_string = self.get_command(data)
self.text_box = wx.TextCtrl(self.parent)
self.text_box.AppendText(safe_default(data, ''))
self.text_box.SetMinSize((0, -1))
@ -166,7 +166,7 @@ class TextInputPayload(WidgetPack):
if self.no_quoting:
_quote = lambda value: value
else:
_quote = lambda value: quote(value)
_quote = quote
value = self.widget.GetValue()
if value and self.option_string:
return '{} {}'.format(self.option_string, _quote(value))
@ -242,4 +242,4 @@ class CounterPayload(WidgetPack):
def safe_default(data, default):
# str(None) is 'None'!? Whaaaaat...?
return str(data['default']) if data['default'] else ''
return str(data['default']) if data['default'] else default
Loading…
Cancel
Save