Commit 4528f633 authored by Danish Prakash's avatar Danish Prakash Committed by Jeremy Bicha

cleanup: Reorder to use "not in"

Use "thing not in group" instead of "not thing in group"

This makes pycodestyle happy and is closer to regular English syntax.

pycodestyle is the Python style guide checker
formerly known as pep8
parent ee638386
......@@ -138,7 +138,7 @@ class TweakModel(Gtk.ListStore):
for t in g.tweaks:
if t.search_matches(txt):
tweaks.append(t)
if not g.name in groups:
if g.name not in groups:
groups.append(g.name)
return tweaks, groups
......
......@@ -220,7 +220,7 @@ class Window(Gtk.ApplicationWindow):
def _on_list_changed(self, group):
self.listbox.set_filter_func(self._list_filter_func, group)
selected = self.listbox.get_selected_row().get_child().get_text()
if group and not selected in group:
if group and selected not in group:
index = sorted(self._model._tweak_group_names.keys()).index(group[0])
row = self.listbox.get_row_at_index(index)
self.listbox.select_row(row)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment