[Sugar-devel] [PATCH 07/21 sugar-toolkit] PEP8 cleanup: fix spaces around keyword parameters

Sascha Silbe sascha-pgp at silbe.org
Fri Oct 15 17:01:11 EDT 2010


Signed-off-by: Sascha Silbe <sascha-pgp at silbe.org>

diff --git a/src/sugar/activity/activityhandle.py b/src/sugar/activity/activityhandle.py
index 4aeac71..b29973e 100644
--- a/src/sugar/activity/activityhandle.py
+++ b/src/sugar/activity/activityhandle.py
@@ -69,7 +69,7 @@ class ActivityHandle(object):
 def create_from_dict(handle_dict):
     """Create a handle from a dictionary of parameters"""
     result = ActivityHandle(handle_dict['activity_id'],
-        object_id = handle_dict.get('object_id'),
-        uri = handle_dict.get('uri'),
-        invited = handle_dict.get('invited'))
+        object_id=handle_dict.get('object_id'),
+        uri=handle_dict.get('uri'),
+        invited=handle_dict.get('invited'))
     return result
diff --git a/src/sugar/activity/bundlebuilder.py b/src/sugar/activity/bundlebuilder.py
index 2952d71..7bf02ed 100644
--- a/src/sugar/activity/bundlebuilder.py
+++ b/src/sugar/activity/bundlebuilder.py
@@ -64,7 +64,7 @@ def list_files(base_dir, ignore_dirs=None, ignore_files=None):

 class Config(object):

-    def __init__(self, source_dir=None, dist_dir = None, dist_name = None):
+    def __init__(self, source_dir=None, dist_dir=None, dist_name=None):
         self.source_dir = source_dir or os.getcwd()
         self.dist_dir = dist_dir or os.path.join(self.source_dir, 'dist')
         self.dist_name = dist_name
diff --git a/src/sugar/bundle/activitybundle.py b/src/sugar/bundle/activitybundle.py
index 2bb0729..dfec7a8 100644
--- a/src/sugar/bundle/activitybundle.py
+++ b/src/sugar/bundle/activitybundle.py
@@ -135,7 +135,7 @@ class ActivityBundle(Bundle):

         return lines

-    def get_files(self, manifest = None):
+    def get_files(self, manifest=None):
         files = [line for line in (manifest or self.manifest) if line]

         if self.is_file('MANIFEST'):
diff --git a/src/sugar/graphics/tray.py b/src/sugar/graphics/tray.py
index 172123a..0e048d8 100644
--- a/src/sugar/graphics/tray.py
+++ b/src/sugar/graphics/tray.py
@@ -170,7 +170,7 @@ class _TrayScrollButton(ToolButton):

         self.set_size_request(style.GRID_CELL_SIZE, style.GRID_CELL_SIZE)

-        self.icon = Icon(icon_name = icon_name,
+        self.icon = Icon(icon_name=icon_name,
                          icon_size=gtk.ICON_SIZE_SMALL_TOOLBAR)
         # The alignment is a hack to work around gtk.ToolButton code
         # that sets the icon_size when the icon_widget is a gtk.Image
diff --git a/src/sugar/util.py b/src/sugar/util.py
index 3625f21..9a3b5d0 100644
--- a/src/sugar/util.py
+++ b/src/sugar/util.py
@@ -50,7 +50,7 @@ def sha_data(data):
     return sha_hash.digest()


-def unique_id(data = ''):
+def unique_id(data=''):
     """Generate a likely-unique ID for whatever purpose

     data -- suffix appended to working data before hashing
--
1.7.1



More information about the Sugar-devel mailing list