[Sugar-devel] [PATCH sugar v2 00/21] style cleanup series
Sascha Silbe
sascha-pgp at silbe.org
Fri Nov 19 16:13:08 EST 2010
This is the sugar part of the style cleanups I've wanted to land at
least two releases ago, but kept missing the window.
I have done some basic testing, but naturally cannot test all code
paths I've touched (some even appear to be unused). This is why I'd like
to land this ASAP: to ensure it gets enough testing before the next release.
There are a couple of pylint complaints remaining. Some of them are
pylint bugs, but a fair number are things that should be looked at more
closely. One even shows the cause of SL#1748.
v1->v2:
- Use line continuation style from example in PEP-8
- removed extra change in src/jarabe/util/emulator.py
Sascha Silbe (21):
fix EOL spaces
style cleanup: move globals before class and method definitions
pep8 cleanup: fix number of blank lines
PEP8 cleanup: fix spaces around operators and parentheses
PEP8 cleanup: fix inline comment spacing
PEP8 cleanup: ensure lines are shorter than 80 characters
PEP8 cleanup: don't use has_key()
style cleanup: use """ everywhere
style cleanup: prefer ' for strings
pylint cleanup: replace disable-msg with disable
pylint cleanup: remove unused imports
use logging.exception() instead of
logging.error(traceback.format_exc())
pylint cleanup: mark some variables as unused
pylint cleanup: pass format parameters to log functions instead of
using %
CurrentActivityPalette: remove dead code
ignore incorrect pylint error E1101
pylint cleanup: don't override built-in objects
pylint cleanup: fix indentation
jarabe.desktop.schoolserver: mark helper functions and classes as
private
pylint cleanup: don't override variables from outer scope
pylint cleanup: disable warnings for reasonable catch-all exception
handlers
docs/release_howto.txt | 22 +-
extensions/cpsection/aboutcomputer/__init__.py | 1 -
extensions/cpsection/aboutcomputer/model.py | 31 ++-
extensions/cpsection/aboutcomputer/view.py | 33 ++--
extensions/cpsection/aboutme/__init__.py | 2 -
extensions/cpsection/aboutme/model.py | 64 +++--
extensions/cpsection/aboutme/view.py | 34 ++--
extensions/cpsection/datetime/model.py | 26 ++-
extensions/cpsection/datetime/view.py | 42 ++--
extensions/cpsection/frame/model.py | 28 ++-
extensions/cpsection/frame/view.py | 76 +++---
extensions/cpsection/keyboard/__init__.py | 1 -
extensions/cpsection/keyboard/model.py | 20 +-
extensions/cpsection/keyboard/view.py | 65 +++---
extensions/cpsection/language/__init__.py | 1 -
extensions/cpsection/language/model.py | 41 ++--
extensions/cpsection/language/view.py | 47 ++--
.../cpsection/modemconfiguration/__init__.py | 1 -
extensions/cpsection/modemconfiguration/model.py | 13 +-
extensions/cpsection/modemconfiguration/view.py | 30 ++-
extensions/cpsection/network/__init__.py | 3 -
extensions/cpsection/network/model.py | 25 ++-
extensions/cpsection/network/view.py | 61 +++---
extensions/cpsection/power/__init__.py | 1 -
extensions/cpsection/power/model.py | 26 ++-
extensions/cpsection/power/view.py | 1 +
extensions/cpsection/updater/backends/aslo.py | 14 +-
extensions/cpsection/updater/model.py | 18 +-
extensions/cpsection/updater/view.py | 16 +-
extensions/deviceicon/battery.py | 28 ++-
extensions/deviceicon/network.py | 74 +++---
extensions/deviceicon/speaker.py | 21 +-
extensions/deviceicon/touchpad.py | 12 +-
extensions/deviceicon/volume.py | 11 +-
extensions/globalkey/screenshot.py | 7 +-
extensions/globalkey/viewsource.py | 2 +
src/jarabe/__init__.py | 1 -
src/jarabe/config.py.in | 2 +-
src/jarabe/controlpanel/__init__.py | 1 -
src/jarabe/controlpanel/cmd.py | 39 ++--
src/jarabe/controlpanel/gui.py | 37 ++--
src/jarabe/controlpanel/inlinealert.py | 10 +-
src/jarabe/controlpanel/sectionview.py | 13 +-
src/jarabe/controlpanel/toolbar.py | 9 +-
src/jarabe/desktop/__init__.py | 1 -
src/jarabe/desktop/activitieslist.py | 28 ++-
src/jarabe/desktop/favoriteslayout.py | 57 +++--
src/jarabe/desktop/favoritesview.py | 41 ++--
src/jarabe/desktop/friendview.py | 2 +-
src/jarabe/desktop/grid.py | 11 +-
src/jarabe/desktop/groupbox.py | 6 +-
src/jarabe/desktop/homebox.py | 21 +-
src/jarabe/desktop/homewindow.py | 14 +-
src/jarabe/desktop/keydialog.py | 61 +++--
src/jarabe/desktop/meshbox.py | 70 +++---
src/jarabe/desktop/networkviews.py | 34 ++--
src/jarabe/desktop/schoolserver.py | 45 ++--
src/jarabe/desktop/snowflakelayout.py | 3 +
src/jarabe/desktop/spreadlayout.py | 4 +-
src/jarabe/desktop/transitionbox.py | 7 +-
src/jarabe/frame/__init__.py | 2 +
src/jarabe/frame/activitiestray.py | 22 +-
src/jarabe/frame/clipboard.py | 20 +-
src/jarabe/frame/clipboardicon.py | 8 +-
src/jarabe/frame/clipboardmenu.py | 7 +-
src/jarabe/frame/clipboardobject.py | 17 +-
src/jarabe/frame/clipboardpanelwindow.py | 14 +-
src/jarabe/frame/clipboardtray.py | 18 +-
src/jarabe/frame/devicestray.py | 11 +-
src/jarabe/frame/eventarea.py | 14 +-
src/jarabe/frame/frame.py | 19 +-
src/jarabe/frame/frameinvoker.py | 2 +
src/jarabe/frame/framewindow.py | 1 +
src/jarabe/frame/friendstray.py | 6 +-
src/jarabe/frame/notification.py | 12 +-
src/jarabe/frame/zoomtoolbar.py | 2 +-
src/jarabe/intro/__init__.py | 1 +
src/jarabe/intro/colorpicker.py | 1 +
src/jarabe/intro/window.py | 36 ++--
src/jarabe/journal/detailview.py | 4 +-
src/jarabe/journal/expandedentry.py | 10 +-
src/jarabe/journal/journalactivity.py | 29 ++-
src/jarabe/journal/journalentrybundle.py | 4 +-
src/jarabe/journal/journaltoolbox.py | 17 +-
src/jarabe/journal/keepicon.py | 1 +
src/jarabe/journal/listmodel.py | 38 ++--
src/jarabe/journal/listview.py | 54 +++--
src/jarabe/journal/misc.py | 28 ++-
src/jarabe/journal/modalalert.py | 7 +-
src/jarabe/journal/model.py | 54 +++-
src/jarabe/journal/objectchooser.py | 8 +-
src/jarabe/journal/palettes.py | 12 +-
src/jarabe/journal/volumestoolbar.py | 30 ++--
src/jarabe/model/__init__.py | 1 -
src/jarabe/model/adhoc.py | 10 +-
src/jarabe/model/buddy.py | 10 +-
src/jarabe/model/bundleregistry.py | 44 ++--
src/jarabe/model/filetransfer.py | 26 ++-
src/jarabe/model/friends.py | 22 +-
src/jarabe/model/invites.py | 22 +-
src/jarabe/model/mimeregistry.py | 1 +
src/jarabe/model/neighborhood.py | 110 +++++----
src/jarabe/model/network.py | 257 +++++++++++---------
src/jarabe/model/notifications.py | 21 +-
src/jarabe/model/olpcmesh.py | 11 +-
src/jarabe/model/screen.py | 6 +-
src/jarabe/model/session.py | 13 +-
src/jarabe/model/shell.py | 58 ++---
src/jarabe/model/sound.py | 11 +-
src/jarabe/model/telepathyclient.py | 5 +-
src/jarabe/util/__init__.py | 1 -
src/jarabe/util/emulator.py | 28 ++-
src/jarabe/util/telepathy/__init__.py | 1 -
src/jarabe/util/telepathy/connection_watcher.py | 12 +-
src/jarabe/view/__init__.py | 1 -
src/jarabe/view/buddyicon.py | 2 +-
src/jarabe/view/buddymenu.py | 1 +
src/jarabe/view/keyhandler.py | 65 +++---
src/jarabe/view/palettes.py | 12 +-
src/jarabe/view/pulsingicon.py | 4 +
src/jarabe/view/service.py | 23 +-
src/jarabe/view/tabbinghandler.py | 3 +-
src/jarabe/view/viewsource.py | 30 ++-
123 files changed, 1543 insertions(+), 1192 deletions(-)
--
1.7.2.3
More information about the Sugar-devel
mailing list