diff options
author | Sascha Silbe <sascha-pgp@silbe.org> | 2010-10-15 18:23:34 (GMT) |
---|---|---|
committer | Sascha Silbe <sascha-pgp@silbe.org> | 2010-10-22 17:26:25 (GMT) |
commit | 418010122380c943035714989d95fb60b529919e (patch) | |
tree | 768035ef2816687ff7535dbd9f70b1513746e52e | |
parent | 585c5f2b8b90ed8e14a159249ded5da463ef4095 (diff) |
PEP8 cleanup: fix whitespace around operator
I've left the powers as-is because IMO they should directly follow the base,
unlike other operators.
-rw-r--r-- | src/sugar/activity/bundlebuilder.py | 3 | ||||
-rw-r--r-- | src/sugar/bundle/activitybundle.py | 2 | ||||
-rw-r--r-- | src/sugar/graphics/alert.py | 2 | ||||
-rw-r--r-- | src/sugar/network.py | 6 |
4 files changed, 7 insertions, 6 deletions
diff --git a/src/sugar/activity/bundlebuilder.py b/src/sugar/activity/bundlebuilder.py index fc8ebc8..2952d71 100644 --- a/src/sugar/activity/bundlebuilder.py +++ b/src/sugar/activity/bundlebuilder.py @@ -19,6 +19,7 @@ STABLE. """ +import operator import os import sys import zipfile @@ -84,7 +85,7 @@ class Config(object): self.version = bundle.get_activity_version() self.activity_name = bundle.get_bundle_name() self.bundle_id = bundle.get_bundle_id() - self.bundle_name = reduce(lambda x, y: x+y, self.activity_name.split()) + self.bundle_name = reduce(operator.add, self.activity_name.split()) self.bundle_root_dir = self.bundle_name + '.activity' self.tar_root_dir = '%s-%d' % (self.bundle_name, self.version) diff --git a/src/sugar/bundle/activitybundle.py b/src/sugar/bundle/activitybundle.py index 3bbc250..2bb0729 100644 --- a/src/sugar/bundle/activitybundle.py +++ b/src/sugar/bundle/activitybundle.py @@ -334,7 +334,7 @@ class ActivityBundle(Bundle): # Is anything in MANIFEST left over after accounting for all files? if manifestfiles: - err = ("Bundle %s: files in MANIFEST not included: %s"% + err = ("Bundle %s: files in MANIFEST not included: %s" % (self._name, str(manifestfiles))) if strict_manifest: raise MalformedBundleException(err) diff --git a/src/sugar/graphics/alert.py b/src/sugar/graphics/alert.py index 0202a66..f032871 100644 --- a/src/sugar/graphics/alert.py +++ b/src/sugar/graphics/alert.py @@ -357,7 +357,7 @@ class _TimeoutIcon(hippo.CanvasText, hippo.CanvasItem): radius = min(width * 0.5, height * 0.5) hippo.cairo_set_source_rgba32(cr, self.props.background_color) - cr.arc(xval, yval, radius, 0, 2*math.pi) + cr.arc(xval, yval, radius, 0, 2 * math.pi) cr.fill_preserve() diff --git a/src/sugar/network.py b/src/sugar/network.py index b72acad..069a980 100644 --- a/src/sugar/network.py +++ b/src/sugar/network.py @@ -250,11 +250,11 @@ class GlibURLDownloader(gobject.GObject): fidx = data.find(ftag) if fidx < 0: return None - fname = data[fidx+len(ftag):] + fname = data[fidx + len(ftag):] if fname[0] == '"' or fname[0] == "'": fname = fname[1:] - if fname[len(fname)-1] == '"' or fname[len(fname)-1] == "'": - fname = fname[:len(fname)-1] + if fname[len(fname) - 1] == '"' or fname[len(fname) - 1] == "'": + fname = fname[:len(fname) - 1] return fname def _read_next_chunk(self, source, condition): |