[pygobject] PEP8: Remaining whitespace fixes



commit d1f5474c6c50163aefe660e0689dc7f30e6cd48b
Author: Johan Dahlin <johan gnome org>
Date:   Thu Mar 22 10:56:59 2012 -0300

    PEP8: Remaining whitespace fixes
    
    https://bugzilla.gnome.org/show_bug.cgi?id=672627

 demos/gtk-demo/demos/Icon View/iconviewedit.py |    7 ++---
 demos/gtk-demo/demos/Tree View/liststore.py    |   28 ++++++++++++------------
 demos/gtk-demo/demos/appwindow.py              |   10 ++++----
 demos/gtk-demo/demos/rotatedtext.py            |    2 +-
 examples/cairo-demo.py                         |    4 +-
 tests/test_gi.py                               |   12 +++++-----
 tests/test_overrides.py                        |    2 +-
 7 files changed, 32 insertions(+), 33 deletions(-)
---
diff --git a/demos/gtk-demo/demos/Icon View/iconviewedit.py b/demos/gtk-demo/demos/Icon View/iconviewedit.py
index 50d8875..f5fdd79 100644
--- a/demos/gtk-demo/demos/Icon View/iconviewedit.py	
+++ b/demos/gtk-demo/demos/Icon View/iconviewedit.py	
@@ -72,10 +72,9 @@ class IconviewEditApp:
         color = Gdk.color_parse(text)
         pixel = 0
         if color is not None:
-            pixel = \
-              (color.red   >> 8) << 24 | \
-              (color.green >> 8) << 16 | \
-              (color.blue  >> 8) << 8
+            pixel = ((color.red >> 8) << 24 |
+                     (color.green >> 8) << 16 |
+                     (color.blue >> 8) << 8)
 
         pixbuf = GdkPixbuf.Pixbuf.new(GdkPixbuf.Colorspace.RGB, False, 8, 24, 24)
         pixbuf.fill(pixel)
diff --git a/demos/gtk-demo/demos/Tree View/liststore.py b/demos/gtk-demo/demos/Tree View/liststore.py
index 4238d85..c0a8e7b 100644
--- a/demos/gtk-demo/demos/Tree View/liststore.py	
+++ b/demos/gtk-demo/demos/Tree View/liststore.py	
@@ -35,20 +35,20 @@ class Bug:
         self.description = description
 
 # initial data we use to fill in the store
-data = [Bug(False, 60482, "Normal",     "scrollable notebooks and hidden tabs"),
-        Bug(False, 60620, "Critical",   "gdk_window_clear_area (gdkwindow-win32.c) is not thread-safe"),
-        Bug(False, 50214, "Major",      "Xft support does not clean up correctly"),
-        Bug(True,  52877, "Major",      "GtkFileSelection needs a refresh method. "),
-        Bug(False, 56070, "Normal",     "Can't click button after setting in sensitive"),
-        Bug(True,  56355, "Normal",     "GtkLabel - Not all changes propagate correctly"),
-        Bug(False, 50055, "Normal",     "Rework width/height computations for TreeView"),
-        Bug(False, 58278, "Normal",     "gtk_dialog_set_response_sensitive () doesn't work"),
-        Bug(False, 55767, "Normal",     "Getters for all setters"),
-        Bug(False, 56925, "Normal",     "Gtkcalender size"),
-        Bug(False, 56221, "Normal",     "Selectable label needs right-click copy menu"),
-        Bug(True,  50939, "Normal",     "Add shift clicking to GtkTextView"),
-        Bug(False, 6112,  "Enhancement", "netscape-like collapsable toolbars"),
-        Bug(False, 1,     "Normal",     "First bug :=)")]
+data = [Bug(False, 60482, "Normal", "scrollable notebooks and hidden tabs"),
+        Bug(False, 60620, "Critical", "gdk_window_clear_area (gdkwindow-win32.c) is not thread-safe"),
+        Bug(False, 50214, "Major", "Xft support does not clean up correctly"),
+        Bug(True, 52877, "Major", "GtkFileSelection needs a refresh method. "),
+        Bug(False, 56070, "Normal", "Can't click button after setting in sensitive"),
+        Bug(True, 56355, "Normal", "GtkLabel - Not all changes propagate correctly"),
+        Bug(False, 50055, "Normal", "Rework width/height computations for TreeView"),
+        Bug(False, 58278, "Normal", "gtk_dialog_set_response_sensitive () doesn't work"),
+        Bug(False, 55767, "Normal", "Getters for all setters"),
+        Bug(False, 56925, "Normal", "Gtkcalender size"),
+        Bug(False, 56221, "Normal", "Selectable label needs right-click copy menu"),
+        Bug(True, 50939, "Normal", "Add shift clicking to GtkTextView"),
+        Bug(False, 6112, "Enhancement", "netscape-like collapsable toolbars"),
+        Bug(False, 1, "Normal", "First bug :=)")]
 
 
 class ListStoreApp:
diff --git a/demos/gtk-demo/demos/appwindow.py b/demos/gtk-demo/demos/appwindow.py
index e09b029..433c9b6 100644
--- a/demos/gtk-demo/demos/appwindow.py
+++ b/demos/gtk-demo/demos/appwindow.py
@@ -98,9 +98,9 @@ def about_cb(widget, user_data=None):
                'Tomeu Vizoso',
                'and many more...']
 
-    documentors =  ['David Malcolm',
-                    'Zack Goldberg',
-                    'and many more...']
+    documentors = ['David Malcolm',
+                   'Zack Goldberg',
+                   'and many more...']
 
     license = """
 This library is free software; you can redistribute it and/or
@@ -212,13 +212,13 @@ color_action_entries = (
 shape_action_entries = (
     ("Square", None,                            # name, stock id
      "_Square", "<control>S",                   # label, accelerator
-     "Square",  SHAPE_SQUARE),                  # tooltip, value
+     "Square", SHAPE_SQUARE),                   # tooltip, value
     ("Rectangle", None,                         # name, stock id
      "_Rectangle", "<control>R",                # label, accelerator
      "Rectangle", SHAPE_RECTANGLE),             # tooltip, value
     ("Oval", None,                              # name, stock id
      "_Oval", "<control>O",                     # label, accelerator
-     "Egg", SHAPE_OVAL ),                       # tooltip, value
+     "Egg", SHAPE_OVAL),                        # tooltip, value
 )
 
 ui_info = """
diff --git a/demos/gtk-demo/demos/rotatedtext.py b/demos/gtk-demo/demos/rotatedtext.py
index 677d54a..055e03b 100644
--- a/demos/gtk-demo/demos/rotatedtext.py
+++ b/demos/gtk-demo/demos/rotatedtext.py
@@ -154,7 +154,7 @@ class RotatedTextApp:
 
         # Create a subtle gradient source and use it.
         pattern = cairo.LinearGradient(-self.RADIUS, -self.RADIUS,
-                                        self.RADIUS,  self.RADIUS)
+                                       self.RADIUS, self.RADIUS)
         pattern.add_color_stop_rgb(0.0, 0.5, 0.0, 0.0)
         pattern.add_color_stop_rgb(1.0, 0.0, 0.0, 0.5)
         cairo_ctx.set_source(pattern)
diff --git a/examples/cairo-demo.py b/examples/cairo-demo.py
index f7e50e0..7b90ec3 100755
--- a/examples/cairo-demo.py
+++ b/examples/cairo-demo.py
@@ -34,8 +34,8 @@ def bowtie(ctx):
 
 def inf(ctx):
     ctx.move_to(0, SIZE)
-    ctx.rel_curve_to(0, SIZE, SIZE, SIZE,   2 * SIZE, 0)
-    ctx.rel_curve_to(SIZE, -SIZE,  2 * SIZE, -SIZE,   2 * SIZE, 0)
+    ctx.rel_curve_to(0, SIZE, SIZE, SIZE, 2 * SIZE, 0)
+    ctx.rel_curve_to(SIZE, -SIZE, 2 * SIZE, -SIZE, 2 * SIZE, 0)
     ctx.rel_curve_to(0, SIZE, -SIZE, SIZE, - 2 * SIZE, 0)
     ctx.rel_curve_to(-SIZE, -SIZE, - 2 * SIZE, -SIZE, - 2 * SIZE, 0)
     ctx.close_path()
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 08080f8..76c0aef 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -1903,13 +1903,13 @@ class TestKeywordArgs(unittest.TestCase):
     def test_calling(self):
         kw_func = GIMarshallingTests.int_three_in_three_out
 
-        self.assertEquals(kw_func(1, 2, 3),                 (1, 2, 3))
+        self.assertEquals(kw_func(1, 2, 3), (1, 2, 3))
         self.assertEquals(kw_func(**{'a': 4, 'b': 5, 'c': 6}), (4, 5, 6))
-        self.assertEquals(kw_func(1, **{'b': 7, 'c': 8}),     (1, 7, 8))
-        self.assertEquals(kw_func(1, 7, **{'c': 8}),         (1, 7, 8))
-        self.assertEquals(kw_func(1, c=8, **{'b': 7}),       (1, 7, 8))
-        self.assertEquals(kw_func(2, c=4, b=3),             (2, 3, 4))
-        self.assertEquals(kw_func(a=2, c=4, b=3),           (2, 3, 4))
+        self.assertEquals(kw_func(1, **{'b': 7, 'c': 8}), (1, 7, 8))
+        self.assertEquals(kw_func(1, 7, **{'c': 8}), (1, 7, 8))
+        self.assertEquals(kw_func(1, c=8, **{'b': 7}), (1, 7, 8))
+        self.assertEquals(kw_func(2, c=4, b=3), (2, 3, 4))
+        self.assertEquals(kw_func(a=2, c=4, b=3), (2, 3, 4))
 
     def assertRaisesMessage(self, exception, message, func, *args, **kwargs):
         try:
diff --git a/tests/test_overrides.py b/tests/test_overrides.py
index 2e63815..f0f614c 100644
--- a/tests/test_overrides.py
+++ b/tests/test_overrides.py
@@ -97,7 +97,7 @@ class TestGLib(unittest.TestCase):
         self.assertEqual(variant.get_type_string(), 'a{sa{si}}')
         self.assertEquals(variant.n_children(), 0)
 
-        d = {'':     {'': 1, 'keyn1': 2},
+        d = {'': {'': 1, 'keyn1': 2},
              'key1': {'key11': 11, 'key12': 12}}
         variant = GLib.Variant('a{sa{si}}', d)
         self.assertEqual(variant.get_type_string(), 'a{sa{si}}')



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]