Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Silbe <sascha-pgp@silbe.org>2010-10-16 17:35:03 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2010-11-24 19:22:02 (GMT)
commit90a84c3a6d754e1531af1493d55ed928d4c37202 (patch)
treee593eaa248c26f837dbc07c160d422c702104aaa
parentc44296092e19dd1cdbbbff1245b409b67419d60f (diff)
style cleanup: use """ everywhere
Most of the code uses """, so adjust the few deviations. Reviewed-by: James Cameron <quozl@laptop.org> CC: Aleksey Lim <alsroot@member.fsf.org>
-rw-r--r--docs/release_howto.txt4
-rw-r--r--extensions/cpsection/datetime/model.py2
-rw-r--r--extensions/cpsection/keyboard/view.py2
-rw-r--r--extensions/cpsection/language/view.py6
-rw-r--r--extensions/cpsection/updater/backends/aslo.py8
-rwxr-xr-xextensions/cpsection/updater/model.py4
-rw-r--r--extensions/cpsection/updater/view.py8
-rw-r--r--src/jarabe/controlpanel/cmd.py8
-rw-r--r--src/jarabe/controlpanel/gui.py8
-rw-r--r--src/jarabe/controlpanel/sectionview.py2
-rw-r--r--src/jarabe/journal/journalactivity.py4
-rw-r--r--src/jarabe/journal/modalalert.py3
-rw-r--r--src/jarabe/model/network.py4
13 files changed, 30 insertions, 33 deletions
diff --git a/docs/release_howto.txt b/docs/release_howto.txt
index cf0957e..841809a 100644
--- a/docs/release_howto.txt
+++ b/docs/release_howto.txt
@@ -1,7 +1,7 @@
-''' This is the release process of the sugar tarballs sugar(shell),
+""" This is the release process of the sugar tarballs sugar(shell),
sugar-toolkit and sugar-base described in a pytish way and
instructions for sugar packagers
-'''
+"""
# Release sugar tarballs
diff --git a/extensions/cpsection/datetime/model.py b/extensions/cpsection/datetime/model.py
index 0a68fd7..dc17168 100644
--- a/extensions/cpsection/datetime/model.py
+++ b/extensions/cpsection/datetime/model.py
@@ -28,7 +28,7 @@ _zone_tab = '/usr/share/zoneinfo/zone.tab'
def _initialize():
- '''Initialize the docstring of the set function'''
+ """Initialize the docstring of the set function"""
if set_timezone.__doc__ is None:
# when running under 'python -OO', all __doc__ fields are None,
# so += would fail -- and this function would be unnecessary anyway.
diff --git a/extensions/cpsection/keyboard/view.py b/extensions/cpsection/keyboard/view.py
index 6dc76ff..e349255 100644
--- a/extensions/cpsection/keyboard/view.py
+++ b/extensions/cpsection/keyboard/view.py
@@ -360,7 +360,7 @@ class Keyboard(SectionView):
i += 1
def __create_add_remove_box(self):
- '''Creates gtk.Hbox with add/remove buttons'''
+ """Creates gtk.Hbox with add/remove buttons"""
add_icon = Icon(icon_name='list-add')
add_button = gtk.Button()
diff --git a/extensions/cpsection/language/view.py b/extensions/cpsection/language/view.py
index 5355890..c58b334 100644
--- a/extensions/cpsection/language/view.py
+++ b/extensions/cpsection/language/view.py
@@ -87,7 +87,7 @@ class Language(SectionView):
self.setup()
def _add_row(self, locale_code=None):
- '''Adds a row to the table'''
+ """Adds a row to the table"""
self._selected_lang_count += 1
@@ -149,7 +149,7 @@ class Language(SectionView):
ypadding=padding)
def _delete_last_row(self):
- '''Deletes the last row of the table'''
+ """Deletes the last row of the table"""
self._selected_lang_count -= 1
@@ -180,7 +180,7 @@ class Language(SectionView):
self._lang_alert.hide()
def _create_add_remove_box(self):
- '''Creates gtk.Hbox with add/remove buttons'''
+ """Creates gtk.Hbox with add/remove buttons"""
add_icon = Icon(icon_name='list-add')
add_button = gtk.Button()
diff --git a/extensions/cpsection/updater/backends/aslo.py b/extensions/cpsection/updater/backends/aslo.py
index f1c4d6d..c8c3d98 100644
--- a/extensions/cpsection/updater/backends/aslo.py
+++ b/extensions/cpsection/updater/backends/aslo.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-'''Activity information microformat parser.
+"""Activity information microformat parser.
Activity information is embedded in HTML/XHTML/XML pages using a
Resource Description Framework (RDF) http://www.w3.org/RDF/ .
@@ -46,7 +46,7 @@ An example::
</RDF:Description>
</em:targetApplication>
</RDF:Description></RDF:RDF>
-'''
+"""
import logging
from xml.etree.ElementTree import XML
@@ -149,13 +149,13 @@ class _UpdateFetcher(object):
def fetch_update_info(bundle, completion_cb):
- '''Queries the server for a newer version of the ActivityBundle.
+ """Queries the server for a newer version of the ActivityBundle.
completion_cb receives bundle, version, link, size and possibly an error
message:
def completion_cb(bundle, version, link, size, error_message):
- '''
+ """
global _fetcher
if _fetcher is not None:
diff --git a/extensions/cpsection/updater/model.py b/extensions/cpsection/updater/model.py
index 86ede06..77cc873 100755
--- a/extensions/cpsection/updater/model.py
+++ b/extensions/cpsection/updater/model.py
@@ -14,12 +14,12 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-'''Sugar bundle updater: model.
+"""Sugar bundle updater: model.
This module implements the non-GUI portions of the bundle updater, including
list of installed bundls, whether updates are needed, and the URL at which to
find the bundle updated.
-'''
+"""
import os
import logging
diff --git a/extensions/cpsection/updater/view.py b/extensions/cpsection/updater/view.py
index 63fb1e5..de50d8d 100644
--- a/extensions/cpsection/updater/view.py
+++ b/extensions/cpsection/updater/view.py
@@ -182,8 +182,8 @@ class ActivityUpdater(SectionView):
class ProgressPane(gtk.VBox):
- '''Container which replaces the `ActivityPane` during refresh or
- install.'''
+ """Container which replaces the `ActivityPane` during refresh or
+ install."""
def __init__(self):
gtk.VBox.__init__(self)
@@ -376,9 +376,7 @@ class UpdateListModel(gtk.ListStore):
def _format_size(size):
- '''
- Convert a given size in bytes to a nicer better readable unit
- '''
+ """Convert a given size in bytes to a nicer better readable unit"""
if size == 0:
# TRANS: download size is 0
return _('None')
diff --git a/src/jarabe/controlpanel/cmd.py b/src/jarabe/controlpanel/cmd.py
index 6d5f127..e7ad6d0 100644
--- a/src/jarabe/controlpanel/cmd.py
+++ b/src/jarabe/controlpanel/cmd.py
@@ -33,7 +33,7 @@ _general_error = _("sugar-control-panel: %s")
def cmd_help():
- '''Print the help to the screen'''
+ """Print the help to the screen"""
# TRANS: Translators, there's a empty line at the end of this string,
# which must appear in the translated string (msgstr) as well.
print _('Usage: sugar-control-panel [ option ] key [ args ... ] \n\
@@ -49,14 +49,14 @@ def cmd_help():
def note_restart():
- '''Instructions how to restart sugar'''
+ """Instructions how to restart sugar"""
print _('To apply your changes you have to restart sugar.\n' +
'Hit ctrl+alt+erase on the keyboard to trigger a restart.')
def load_modules():
- '''Build a list of pointers to available modules and import them.
- '''
+ """Build a list of pointers to available modules and import them.
+ """
modules = []
path = os.path.join(config.ext_path, 'cpsection')
diff --git a/src/jarabe/controlpanel/gui.py b/src/jarabe/controlpanel/gui.py
index b7dac73..d3cf8db 100644
--- a/src/jarabe/controlpanel/gui.py
+++ b/src/jarabe/controlpanel/gui.py
@@ -229,13 +229,13 @@ class ControlPanel(gtk.Window):
style.COLOR_WHITE.get_gdk_color())
def set_section_view_auto_close(self):
- '''Automatically close the control panel if there is "nothing to do"
- '''
+ """Automatically close the control panel if there is "nothing to do"
+ """
self._section_view.auto_close = True
def _get_options(self):
- '''Get the available option information from the extensions
- '''
+ """Get the available option information from the extensions
+ """
options = {}
path = os.path.join(config.ext_path, 'cpsection')
diff --git a/src/jarabe/controlpanel/sectionview.py b/src/jarabe/controlpanel/sectionview.py
index edef59f..4b5751f 100644
--- a/src/jarabe/controlpanel/sectionview.py
+++ b/src/jarabe/controlpanel/sectionview.py
@@ -50,5 +50,5 @@ class SectionView(gtk.VBox):
return self._is_valid
def undo(self):
- '''Undo here the changes that have been made in this section.'''
+ """Undo here the changes that have been made in this section."""
pass
diff --git a/src/jarabe/journal/journalactivity.py b/src/jarabe/journal/journalactivity.py
index dc83438..6e061cc 100644
--- a/src/jarabe/journal/journalactivity.py
+++ b/src/jarabe/journal/journalactivity.py
@@ -334,11 +334,11 @@ class JournalActivity(JournalWindow):
self._list_view.set_is_visible(visible)
def _check_available_space(self):
- ''' Check available space on device
+ """Check available space on device
If the available space is below 50MB an alert will be
shown which encourages to delete old journal entries.
- '''
+ """
if self._critical_space_alert:
return
diff --git a/src/jarabe/journal/modalalert.py b/src/jarabe/journal/modalalert.py
index c306b9e..877b11a 100644
--- a/src/jarabe/journal/modalalert.py
+++ b/src/jarabe/journal/modalalert.py
@@ -92,6 +92,5 @@ class ModalAlert(gtk.Window):
self.window.set_accept_focus(True)
def __show_journal_cb(self, button):
- '''The opener will listen on the destroy signal
- '''
+ """The opener will listen on the destroy signal"""
self.destroy()
diff --git a/src/jarabe/model/network.py b/src/jarabe/model/network.py
index 7e2c141..cfb04a6 100644
--- a/src/jarabe/model/network.py
+++ b/src/jarabe/model/network.py
@@ -523,9 +523,9 @@ class NMSettings(dbus.service.Object):
class SecretsResponse(object):
- ''' Intermediate object to report the secrets from the dialog
+ """Intermediate object to report the secrets from the dialog
back to the connection object and which will inform NM
- '''
+ """
def __init__(self, connection, reply_cb, error_cb):
self._connection = connection
self._reply_cb = reply_cb