[gnome-tweaks] cleanup: Reorder to use "not in"
- From: Jeremy Bicha <jbicha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweaks] cleanup: Reorder to use "not in"
- Date: Mon, 8 Oct 2018 00:33:37 +0000 (UTC)
commit 4528f633a7f18c3f5ac72543722bcb59983380de
Author: prakashdanish <grafitykoncept gmail com>
Date: Sun Oct 7 20:20:42 2018 -0400
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
gtweak/tweakmodel.py | 2 +-
gtweak/tweakview.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtweak/tweakmodel.py b/gtweak/tweakmodel.py
index b890b33..04d079c 100644
--- a/gtweak/tweakmodel.py
+++ b/gtweak/tweakmodel.py
@@ -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
diff --git a/gtweak/tweakview.py b/gtweak/tweakview.py
index 99abd75..98cc43e 100644
--- a/gtweak/tweakview.py
+++ b/gtweak/tweakview.py
@@ -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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]