Merge pull request #18 from dnarvaez/pyflakes

Make the code pyflakes clean
This commit is contained in:
Simon Schampijer
2013-05-06 06:47:51 -07:00
10 changed files with 9 additions and 8 deletions
+1
View File
@@ -17,6 +17,7 @@ EXTRA_DIST = \
SUBDIRS = bin src po
check: test
pyflakes $(top_srcdir)
test:
cd $(top_srcdir)/tests && \
-1
View File
@@ -18,7 +18,6 @@
import json
import os
from gi.repository import Gtk
from gi.repository import GConf
from gi.repository import WebKit2
from gwebsockets.server import Server
+1
View File
@@ -7,3 +7,4 @@ Heavily modified for Django's purposes.
"""
from sugar3.dispatch.dispatcher import Signal
assert Signal
+1 -1
View File
@@ -121,7 +121,7 @@ class BoundMethodWeakref(object):
except Exception, e:
try:
traceback.print_exc()
except AttributeError, err:
except AttributeError:
print '''Exception during saferef %s cleanup function %s: %s'''%(
self, function, e
)
-1
View File
@@ -545,7 +545,6 @@ class ColorToolButton(Gtk.ToolItem):
title = GObject.property(type=str, getter=get_title, setter=set_title)
def do_draw(self, cr):
child = self.get_child()
if self._palette and self._palette.is_up():
allocation = self.get_allocation()
# draw a black background, has been done by the engine before
+6 -1
View File
@@ -38,7 +38,12 @@ from sugar3.graphics.palettemenu import PaletteMenuItem
# Import these for backwards compatibility
from sugar3.graphics.palettewindow import MouseSpeedDetector, Invoker, \
WidgetInvoker, CursorInvoker, ToolInvoker, CellRendererInvoker
assert MouseSpeedDetector
assert Invoker
assert WidgetInvoker
assert CursorInvoker
assert ToolInvoker
assert CellRendererInvoker
class _HeaderItem(Gtk.MenuItem):
"""A MenuItem with a custom child widget that gets all the
-1
View File
@@ -131,7 +131,6 @@ class RadioToolButton(Gtk.RadioToolButton):
type=object, setter=set_palette_invoker, getter=get_palette_invoker)
def do_draw(self, cr):
child = self.get_child()
if self.palette and self.palette.is_up():
allocation = self.get_allocation()
# draw a black background, has been done by the engine before
-1
View File
@@ -125,7 +125,6 @@ class ToggleToolButton(Gtk.ToggleToolButton):
getter=get_accelerator)
def do_draw(self, cr):
child = self.get_child()
if self.palette and self.palette.is_up():
allocation = self.get_allocation()
# draw a black background, has been done by the engine before
-1
View File
@@ -163,7 +163,6 @@ class ToolButton(Gtk.ToolButton):
type=object, setter=set_palette_invoker, getter=get_palette_invoker)
def do_draw(self, cr):
child = self.get_child()
if self.palette and self.palette.is_up():
allocation = self.get_allocation()
# draw a black background, has been done by the engine before
-1
View File
@@ -35,7 +35,6 @@ class TestUITree(unittest.TestCase):
def show_window1():
from gi.repository import Gtk
from gi.repository import GLib
window = Gtk.Window()
window.set_title("window1")