diff --git a/gooey/gui/components/widgets/bases.py b/gooey/gui/components/widgets/bases.py index 11a19bf4..7259f984 100644 --- a/gooey/gui/components/widgets/bases.py +++ b/gooey/gui/components/widgets/bases.py @@ -183,7 +183,7 @@ def getUiState(self) -> t.FormField: 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: diff --git a/gooey/gui/components/widgets/checkbox.py b/gooey/gui/components/widgets/checkbox.py index 219db409..83c787ad 100644 --- a/gooey/gui/components/widgets/checkbox.py +++ b/gooey/gui/components/widgets/checkbox.py @@ -71,7 +71,7 @@ def syncUiState(self, state: t.Checkbox): # type: ignore 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'] != '') diff --git a/gooey/gui/components/widgets/dropdown.py b/gooey/gui/components/widgets/dropdown.py index f43d4a29..6e30a4cb 100644 --- a/gooey/gui/components/widgets/dropdown.py +++ b/gooey/gui/components/widgets/dropdown.py @@ -52,7 +52,7 @@ def syncUiState(self, state: FormField): 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 diff --git a/gooey/gui/components/widgets/dropdown_filterable.py b/gooey/gui/components/widgets/dropdown_filterable.py index 4babdf1b..69bce157 100644 --- a/gooey/gui/components/widgets/dropdown_filterable.py +++ b/gooey/gui/components/widgets/dropdown_filterable.py @@ -128,7 +128,7 @@ def syncUiState(self, state: t.DropdownFilterable): # type: ignore 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] diff --git a/gooey/gui/components/widgets/listbox.py b/gooey/gui/components/widgets/listbox.py index c3f4143b..e70a5f25 100644 --- a/gooey/gui/components/widgets/listbox.py +++ b/gooey/gui/components/widgets/listbox.py @@ -51,4 +51,4 @@ def syncUiState(self, state: t.Listbox): # type: ignore 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'] != '') diff --git a/gooey/gui/components/widgets/textarea.py b/gooey/gui/components/widgets/textarea.py index 27dc42af..21b913bb 100644 --- a/gooey/gui/components/widgets/textarea.py +++ b/gooey/gui/components/widgets/textarea.py @@ -41,7 +41,7 @@ def formatOutput(self, metatdata, value: str): 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( diff --git a/gooey/gui/components/widgets/textfield.py b/gooey/gui/components/widgets/textfield.py index 5b5955a1..3e6cab4c 100644 --- a/gooey/gui/components/widgets/textfield.py +++ b/gooey/gui/components/widgets/textfield.py @@ -27,5 +27,5 @@ def syncUiState(self, state: t.TextField): # type: ignore 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()