diff options
author | Johan Dahlin <johan@gnome.org> | 2012-03-22 10:48:59 -0300 |
---|---|---|
committer | Johan Dahlin <jdahlin@litl.com> | 2012-03-22 11:31:44 -0300 |
commit | 03e597cb8f3b075efae556ee51a598695a883ad3 (patch) | |
tree | fb932c9d709a4dc00bc46c89ba3fdb2c2da00f1d | |
parent | 21aeb19107b718293116e51ecd6479d4d7198b8f (diff) | |
download | pygobject-03e597cb8f3b075efae556ee51a598695a883ad3.tar.gz |
PEP8: Fix whitespace around operators
https://bugzilla.gnome.org/show_bug.cgi?id=672627
-rw-r--r-- | demos/gtk-demo/demos/images.py | 2 | ||||
-rwxr-xr-x | examples/cairo-demo.py | 8 | ||||
-rw-r--r-- | tests/test_gi.py | 4 | ||||
-rw-r--r-- | tests/test_overrides.py | 8 | ||||
-rw-r--r-- | tests/test_properties.py | 14 | ||||
-rw-r--r-- | tests/test_signal.py | 2 |
6 files changed, 19 insertions, 19 deletions
diff --git a/demos/gtk-demo/demos/images.py b/demos/gtk-demo/demos/images.py index 488d0755..f3c946b4 100644 --- a/demos/gtk-demo/demos/images.py +++ b/demos/gtk-demo/demos/images.py @@ -162,7 +162,7 @@ class ImagesApp: Gtk.DialogFlags.DESTROY_WITH_PARENT, Gtk.MessageType.ERROR, Gtk.ButtonsType.CLOSE, - "Failure reading image file 'alphatest.png': %s" %str(e)) + "Failure reading image file 'alphatest.png': %s" % (str(e), )) self.image_stream.close() self.image_stream = None diff --git a/examples/cairo-demo.py b/examples/cairo-demo.py index 5f5bf6b1..f7e50e07 100755 --- a/examples/cairo-demo.py +++ b/examples/cairo-demo.py @@ -34,10 +34,10 @@ 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.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 1a96ce3d..5546037f 100644 --- a/tests/test_gi.py +++ b/tests/test_gi.py @@ -1972,8 +1972,8 @@ class TestPropertiesObject(unittest.TestCase): def test_char(self): # gobject-introspection thinks it has a guint8 type tag, which is # wrong; this will raise an assertion critical which we need to ignore - old_mask = GLib.log_set_always_fatal(GLib.LogLevelFlags.LEVEL_WARNING| - GLib.LogLevelFlags.LEVEL_ERROR) + old_mask = GLib.log_set_always_fatal( + GLib.LogLevelFlags.LEVEL_WARNING | GLib.LogLevelFlags.LEVEL_ERROR) self.assertEqual(self.obj.props.some_char, 0) self.obj.props.some_char = GObject.G_MAXINT8 self.assertEqual(self.obj.props.some_char, GObject.G_MAXINT8) diff --git a/tests/test_overrides.py b/tests/test_overrides.py index 21c0fc8b..96abf957 100644 --- a/tests/test_overrides.py +++ b/tests/test_overrides.py @@ -193,7 +193,7 @@ class TestGLib(unittest.TestCase): obj = {"frequency": GLib.Variant('t', 738000000), "hierarchy": GLib.Variant('i', 0), "bandwidth": GLib.Variant('x', 8), - "code-rate-hp": GLib.Variant('d', 2.0/3.0), + "code-rate-hp": GLib.Variant('d', 2.0 / 3.0), "constellation": GLib.Variant('s', "QAM16"), "guard-interval": GLib.Variant('u', 4),} variant = GLib.Variant('a{sv}', obj) @@ -201,7 +201,7 @@ class TestGLib(unittest.TestCase): self.assertEqual(variant.unpack(), {"frequency": 738000000, "hierarchy": 0, "bandwidth": 8, - "code-rate-hp": 2.0/3.0, + "code-rate-hp": 2.0 / 3.0, "constellation": "QAM16", "guard-interval": 4}) @@ -1517,8 +1517,8 @@ class TestGtk(unittest.TestCase): # FIXME: We can't easily call get_cursor() to make sure this works as # expected as we need to realize and focus the column; the following # will raise a Gtk-CRITICAL which we ignore for now - old_mask = GLib.log_set_always_fatal(GLib.LogLevelFlags.LEVEL_WARNING| - GLib.LogLevelFlags.LEVEL_ERROR) + old_mask = GLib.log_set_always_fatal( + GLib.LogLevelFlags.LEVEL_WARNING | GLib.LogLevelFlags.LEVEL_ERROR) view.set_cursor(store[1].path) view.set_cursor(str(store[1].path)) diff --git a/tests/test_properties.py b/tests/test_properties.py index 5f0bed6a..01ec20da 100644 --- a/tests/test_properties.py +++ b/tests/test_properties.py @@ -31,18 +31,18 @@ class PropertyObject(GObject.GObject): normal = GObject.Property(type=str) construct = GObject.Property( type=str, - flags=PARAM_READWRITE|PARAM_CONSTRUCT, default='default') + flags=PARAM_READWRITE | PARAM_CONSTRUCT, default='default') construct_only = GObject.Property( type=str, - flags=PARAM_READWRITE|PARAM_CONSTRUCT_ONLY) + flags=PARAM_READWRITE | PARAM_CONSTRUCT_ONLY) uint64 = GObject.Property( - type=TYPE_UINT64, flags=PARAM_READWRITE|PARAM_CONSTRUCT) + type=TYPE_UINT64, flags=PARAM_READWRITE | PARAM_CONSTRUCT) enum = GObject.Property( type=Gio.SocketType, default=Gio.SocketType.STREAM) boxed = GObject.Property( - type=GLib.Regex, flags=PARAM_READWRITE|PARAM_CONSTRUCT) + type=GLib.Regex, flags=PARAM_READWRITE | PARAM_CONSTRUCT) class TestProperties(unittest.TestCase): @@ -133,7 +133,7 @@ class TestProperties(unittest.TestCase): class TimeControl(GObject.GObject): __gproperties__ = { 'time': (TYPE_UINT64, 'Time', 'Time', - _long(0), (1<<64) - 1, _long(0), + _long(0), (1 << 64) - 1, _long(0), PARAM_READABLE) } except OverflowError: @@ -398,13 +398,13 @@ class TestProperty(unittest.TestCase): # Lower than minimum self.assertRaises(TypeError, - GObject.Property, type=gtype, minimum=min-1, + GObject.Property, type=gtype, minimum=min - 1, maximum=max) # Higher than maximum self.assertRaises(TypeError, GObject.Property, type=gtype, minimum=min, - maximum=max+1) + maximum=max + 1) def testMinMax(self): class C(GObject.GObject): diff --git a/tests/test_signal.py b/tests/test_signal.py index e4268762..918dad45 100644 --- a/tests/test_signal.py +++ b/tests/test_signal.py @@ -316,7 +316,7 @@ class SigPropClass(GObject.GObject): (GObject.TYPE_INT,))} __gproperties__ = { - 'foo': (str, None, None, '', GObject.PARAM_WRITABLE|GObject.PARAM_CONSTRUCT), + 'foo': (str, None, None, '', GObject.PARAM_WRITABLE | GObject.PARAM_CONSTRUCT), } signal_emission_failed = False |