Browse Source

Change "is not" to "!=" when checking literals

pull/886/head
Kian Khadempour 1 year ago
committed by GitHub
parent
commit
bea6f75fa6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 7 deletions
  1. 2
      gooey/gui/components/widgets/bases.py
  2. 2
      gooey/gui/components/widgets/checkbox.py
  3. 2
      gooey/gui/components/widgets/dropdown.py
  4. 2
      gooey/gui/components/widgets/dropdown_filterable.py
  5. 2
      gooey/gui/components/widgets/listbox.py
  6. 2
      gooey/gui/components/widgets/textarea.py
  7. 2
      gooey/gui/components/widgets/textfield.py

2
gooey/gui/components/widgets/bases.py

@ -183,7 +183,7 @@ class TextContainer(BaseWidget):
def syncUiState(self, state: FormField): # type: ignore
self.widget.setValue(state['value']) # type: ignore
self.error.SetLabel(state['error'] or '')
self.error.Show(state['error'] is not None and state['error'] is not '')
self.error.Show(state['error'] is not None and state['error'] != '')
def getValue(self) -> t.FieldValue:

2
gooey/gui/components/widgets/checkbox.py

@ -71,7 +71,7 @@ class CheckBox(TextContainer):
checkbox.Enable(state['enabled'])
self.Show(state['visible'])
self.error.SetLabel(state['error'] or '')
self.error.Show(state['error'] is not None and state['error'] is not '')
self.error.Show(state['error'] is not None and state['error'] != '')

2
gooey/gui/components/widgets/dropdown.py

@ -52,7 +52,7 @@ class Dropdown(TextContainer):
if state['selected'] is not None: # type: ignore
self.setValue(state['selected']) # type: ignore
self.error.SetLabel(state['error'] or '')
self.error.Show(state['error'] is not None and state['error'] is not '')
self.error.Show(state['error'] is not None and state['error'] != '')
def getUiState(self) -> t.FormField:
widget: wx.ComboBox = self.widget

2
gooey/gui/components/widgets/dropdown_filterable.py

@ -128,7 +128,7 @@ class FilterableDropdown(Dropdown):
if state['value'] is not None:
self.setValue(state['value'])
self.error.SetLabel(state['error'] or '')
self.error.Show(state['error'] is not None and state['error'] is not '')
self.error.Show(state['error'] is not None and state['error'] != '')
def OnGetItem(self, n):
return self.model.suggestions[n]

2
gooey/gui/components/widgets/listbox.py

@ -51,4 +51,4 @@ class Listbox(TextContainer):
for string in state['selected']:
widget.SetStringSelection(string)
self.error.SetLabel(state['error'] or '')
self.error.Show(state['error'] is not None and state['error'] is not '')
self.error.Show(state['error'] is not None and state['error'] != '')

2
gooey/gui/components/widgets/textarea.py

@ -41,7 +41,7 @@ class Textarea(TextContainer):
def syncUiState(self, state: FormField):
self.setValue(state['value']) # type: ignore
self.error.SetLabel(state['error'] or '')
self.error.Show(state['error'] is not None and state['error'] is not '')
self.error.Show(state['error'] is not None and state['error'] != '')
def getUiState(self) -> t.FormField:
return t.TextField(

2
gooey/gui/components/widgets/textfield.py

@ -27,5 +27,5 @@ class TextField(TextContainer):
textctr.Enable(state['enabled'])
self.Show(state['visible'])
self.error.SetLabel(state['error'] or '')
self.error.Show(state['error'] is not None and state['error'] is not '')
self.error.Show(state['error'] is not None and state['error'] != '')
self.Layout()
Loading…
Cancel
Save