Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2009-08-24 12:51:00 (GMT)
committer Simon Schampijer <simon@schampijer.de>2009-08-24 12:51:00 (GMT)
commite1e8647de9e1b9fa79c11015ad63f6dd78a671f3 (patch)
tree99e0f2913c90e7010df8f848984ed07cb11d753e
parent496090fe62191da435044a3102378ab4dbadbda1 (diff)
pylint fixes
-rw-r--r--src/sugar/bundle/activitybundle.py3
-rw-r--r--src/sugar/graphics/icon.py5
-rw-r--r--src/sugar/graphics/palettewindow.py9
-rw-r--r--src/sugar/graphics/radiopalette.py1
-rw-r--r--src/sugar/graphics/window.py4
-rw-r--r--src/sugar/presence/buddy.py4
6 files changed, 12 insertions, 14 deletions
diff --git a/src/sugar/bundle/activitybundle.py b/src/sugar/bundle/activitybundle.py
index 6f4f578..f38d70c 100644
--- a/src/sugar/bundle/activitybundle.py
+++ b/src/sugar/bundle/activitybundle.py
@@ -260,7 +260,8 @@ class ActivityBundle(Bundle):
return os.path.join(self._path, icon_path)
else:
icon_data = self.get_file(icon_path).read()
- temp_file, temp_file_path = tempfile.mkstemp(prefix=self._icon, suffix='.svg')
+ temp_file, temp_file_path = tempfile.mkstemp(prefix=self._icon,
+ suffix='.svg')
os.write(temp_file, icon_data)
os.close(temp_file)
return util.TempFilePath(temp_file_path)
diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py
index 51bb584..6f5a167 100644
--- a/src/sugar/graphics/icon.py
+++ b/src/sugar/graphics/icon.py
@@ -1019,7 +1019,8 @@ class CellRendererIcon(gtk.GenericCellRenderer):
if self._buffer.background_color != value:
self._buffer.background_color = value
- background_color = gobject.property(type=object, setter=set_background_color)
+ background_color = gobject.property(type=object,
+ setter=set_background_color)
def set_size(self, value):
if self._buffer.width != value:
@@ -1061,7 +1062,7 @@ class CellRendererIcon(gtk.GenericCellRenderer):
if pos is None:
return False
- path, column, x, y = pos
+ path_, column, x, y = pos
for cell_renderer in column.get_cell_renderers():
if cell_renderer == self:
diff --git a/src/sugar/graphics/palettewindow.py b/src/sugar/graphics/palettewindow.py
index 82c4bba..96e4da1 100644
--- a/src/sugar/graphics/palettewindow.py
+++ b/src/sugar/graphics/palettewindow.py
@@ -26,13 +26,10 @@ import logging
import gtk
import gobject
import hippo
-import pango
from sugar.graphics import palettegroup
from sugar.graphics import animator
from sugar.graphics import style
-from sugar.graphics.icon import Icon
-from sugar import _sugarext
# Helper function to find the gap position and size of widget a
def _calculate_gap(a, b):
@@ -906,8 +903,8 @@ class CellRendererInvoker(Invoker):
def _redraw_path(self, path):
model = self._tree_view.get_model()
- iter = model.get_iter(path)
- model.row_changed(path, iter)
+ iterator = model.get_iter(path)
+ model.row_changed(path, iterator)
def __leave_notify_event_cb(self, widget, event):
self.notify_mouse_leave()
@@ -931,7 +928,7 @@ class CellRendererInvoker(Invoker):
if pos is None:
return False
- path, column, x, y = pos
+ path_, column, x, y_ = pos
for cell_renderer in column.get_cell_renderers():
if cell_renderer == self._cell_renderer:
diff --git a/src/sugar/graphics/radiopalette.py b/src/sugar/graphics/radiopalette.py
index 7667bcc..ff49e21 100644
--- a/src/sugar/graphics/radiopalette.py
+++ b/src/sugar/graphics/radiopalette.py
@@ -17,7 +17,6 @@
import gtk
-from sugar.graphics import style
from sugar.graphics.toolbutton import ToolButton
from sugar.graphics.palette import Palette
diff --git a/src/sugar/graphics/window.py b/src/sugar/graphics/window.py
index 0d53776..4b25bc0 100644
--- a/src/sugar/graphics/window.py
+++ b/src/sugar/graphics/window.py
@@ -22,7 +22,6 @@ STABLE.
import gobject
import gtk
-import logging
import warnings
from sugar.graphics.icon import Icon
@@ -101,7 +100,8 @@ class Window(gtk.Window):
self._event_box = gtk.EventBox()
self._hbox.pack_start(self._event_box)
self._event_box.show()
- self._event_box.add_events(gtk.gdk.POINTER_MOTION_HINT_MASK | gtk.gdk.POINTER_MOTION_MASK)
+ self._event_box.add_events(gtk.gdk.POINTER_MOTION_HINT_MASK
+ | gtk.gdk.POINTER_MOTION_MASK)
self._event_box.connect('motion-notify-event', self.__motion_notify_cb)
self.add(self._vbox)
diff --git a/src/sugar/presence/buddy.py b/src/sugar/presence/buddy.py
index 57cd710..877a798 100644
--- a/src/sugar/presence/buddy.py
+++ b/src/sugar/presence/buddy.py
@@ -153,9 +153,9 @@ class Buddy(gobject.GObject):
"""Retrieve our dbus object path"""
return self._object_path
- def _emit_icon_changed_signal(self, bytes):
+ def _emit_icon_changed_signal(self, icon_data):
"""Emit GObject signal when icon has changed"""
- self._icon = str(bytes)
+ self._icon = str(icon_data)
self.emit('icon-changed')
return False