summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--demos/gtk-demo/demos/Icon View/iconviewedit.py7
-rw-r--r--demos/gtk-demo/demos/Tree View/liststore.py28
-rw-r--r--demos/gtk-demo/demos/appwindow.py10
-rw-r--r--demos/gtk-demo/demos/rotatedtext.py2
-rwxr-xr-xexamples/cairo-demo.py4
-rw-r--r--tests/test_gi.py12
-rw-r--r--tests/test_overrides.py2
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 50d88758..f5fdd791 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 4238d850..c0a8e7b8 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 e09b029f..433c9b64 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 677d54ae..055e03b8 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 f7e50e07..7b90ec3e 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 08080f82..76c0aef0 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 2e638157..f0f614cb 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}}')