[pygobject] demo: PyFlakes and PEP8 fixes
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] demo: PyFlakes and PEP8 fixes
- Date: Wed, 6 Dec 2017 16:30:43 +0000 (UTC)
commit 995f1e72eed0970d56d871ed8452c61f92a40696
Author: Simon Feltman <sfeltman src gnome org>
Date: Tue Sep 2 11:10:31 2014 -0700
demo: PyFlakes and PEP8 fixes
Since PyFlakes and PEP8 are not currently run on the demo due to it
not being packaged, manually check and fix this for now.
https://bugzilla.gnome.org/show_bug.cgi?id=735918
demo/demo.py | 2 +-
demo/demos/Entry/entry_buffer.py | 2 +-
demo/demos/Entry/entry_completion.py | 2 +-
demo/demos/clipboard.py | 6 +-----
demo/demos/combobox.py | 2 +-
5 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/demo/demo.py b/demo/demo.py
index e7bc360..66b6137 100755
--- a/demo/demo.py
+++ b/demo/demo.py
@@ -101,7 +101,7 @@ class DemoTreeStore(Gtk.TreeStore):
return sorted(demo_file_list, key=str.lower)
def _get_parent_node(self, name):
- if not name in self._parent_nodes.keys():
+ if name not in self._parent_nodes.keys():
node = self.append(None, (name, None, Pango.Style.NORMAL))
self._parent_nodes[name] = node
diff --git a/demo/demos/Entry/entry_buffer.py b/demo/demos/Entry/entry_buffer.py
index 09c60fd..fbfc301 100644
--- a/demo/demos/Entry/entry_buffer.py
+++ b/demo/demos/Entry/entry_buffer.py
@@ -47,7 +47,7 @@ class EntryBufferApp:
# create a buffer
buffer = Gtk.EntryBuffer()
- #create our first entry
+ # create our first entry
entry = Gtk.Entry(buffer=buffer)
vbox.pack_start(entry, False, False, 0)
diff --git a/demo/demos/Entry/entry_completion.py b/demo/demos/Entry/entry_completion.py
index f8a8e02..2a22185 100644
--- a/demo/demos/Entry/entry_completion.py
+++ b/demo/demos/Entry/entry_completion.py
@@ -45,7 +45,7 @@ class EntryBufferApp:
label.set_markup('Completion demo, try writing <b>total</b> or <b>gnome</b> for example.')
vbox.pack_start(label, False, False, 0)
- #create our entry
+ # create our entry
entry = Gtk.Entry()
vbox.pack_start(entry, False, False, 0)
diff --git a/demo/demos/clipboard.py b/demo/demos/clipboard.py
index f7242fe..1058d3e 100644
--- a/demo/demos/clipboard.py
+++ b/demo/demos/clipboard.py
@@ -55,7 +55,6 @@ class ClipboardApp:
entry = Gtk.Entry()
hbox.pack_start(entry, True, True, 0)
- #FIXME: have the button constuctor take a stock_id
# create button
button = Gtk.Button.new_from_stock(Gtk.STOCK_COPY)
hbox.pack_start(button, False, False, 0)
@@ -71,7 +70,6 @@ class ClipboardApp:
# create secondary entry
entry = Gtk.Entry()
hbox.pack_start(entry, True, True, 0)
- #FIXME: have the button constuctor take a stock_id
# create button
button = Gtk.Button.new_from_stock(Gtk.STOCK_PASTE)
hbox.pack_start(button, False, False, 0)
@@ -133,7 +131,7 @@ class ClipboardApp:
ebox.connect('button-press-event', self.button_press, image)
# tell the clipboard manager to make data persistent
- #FIXME: Allow sending strings a Atoms and convert in PyGI
+ # FIXME: Allow sending strings a Atoms and convert in PyGI
atom = Gdk.atom_intern('CLIPBOARD', True)
clipboard = Gtk.Clipboard.get(atom)
clipboard.set_can_store(None)
@@ -208,13 +206,11 @@ class ClipboardApp:
self.menu = Gtk.Menu()
- #FIXME: default constructor should take a stock property
item = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_COPY, None)
item.connect('activate', self.copy_image, data)
item.show()
self.menu.append(item)
- #FIXME: default constructor should take a stock property
item = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_PASTE, None)
item.connect('activate', self.paste_image, data)
item.show()
diff --git a/demo/demos/combobox.py b/demo/demos/combobox.py
index 2c5b8d3..be70d36 100644
--- a/demo/demos/combobox.py
+++ b/demo/demos/combobox.py
@@ -147,7 +147,7 @@ class ComboboxApp:
Gtk.Container.remove(combo, combo.get_child())
combo.add(entry)
- # A combobox with string IDs
+ # A combobox with string IDs
frame = Gtk.Frame(label='String IDs')
vbox.pack_start(frame, False, False, 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]