Fixes for pep8 1.5

This commit is contained in:
Daniel Narvaez 2014-03-29 19:25:34 +00:00
parent cbf325d994
commit 01ed63ee4b
9 changed files with 24 additions and 24 deletions

View File

@ -97,7 +97,7 @@ class ContentBundle(Bundle):
self._icon = cp.get(section, 'icon') self._icon = cp.get(section, 'icon')
# Compatibility with old content bundles # Compatibility with old content bundles
if not self._global_name is None \ if self._global_name is not None \
and cp.has_option(section, 'bundle_class'): and cp.has_option(section, 'bundle_class'):
self._global_name = cp.get(section, 'bundle_class') self._global_name = cp.get(section, 'bundle_class')

View File

@ -167,7 +167,7 @@ class DSObject(object):
self._metadata.update(properties) self._metadata.update(properties)
def get_metadata(self): def get_metadata(self):
if self._metadata is None and not self.object_id is None: if self._metadata is None and self.object_id is not None:
properties = _get_data_store().get_properties(self.object_id) properties = _get_data_store().get_properties(self.object_id)
metadata = DSMetadata(properties) metadata = DSMetadata(properties)
self._metadata = metadata self._metadata = metadata
@ -180,7 +180,7 @@ class DSObject(object):
metadata = property(get_metadata, set_metadata) metadata = property(get_metadata, set_metadata)
def get_file_path(self, fetch=True): def get_file_path(self, fetch=True):
if fetch and self._file_path is None and not self.object_id is None: if fetch and self._file_path is None and self.object_id is not None:
self.set_file_path(_get_data_store().get_filename(self.object_id)) self.set_file_path(_get_data_store().get_filename(self.object_id))
self._owns_file = True self._owns_file = True
return self._file_path return self._file_path

View File

@ -75,7 +75,7 @@ class Group(GObject.GObject):
self._sig_ids[palette].append(sid) self._sig_ids[palette].append(sid)
def remove(self, palette): def remove(self, palette):
if not palette in self._palettes: if palette not in self._palettes:
# This happens when converting a window based palette to a menu # This happens when converting a window based palette to a menu
# based one. # based one.
return return

View File

@ -171,7 +171,7 @@ class ToolbarBox(Gtk.VBox):
return self.toolbar.get_nth_item(self._expanded_button_index) return self.toolbar.get_nth_item(self._expanded_button_index)
def set_expanded_button(self, button): def set_expanded_button(self, button):
if not button in self.toolbar: if button not in self.toolbar:
self._expanded_button_index = -1 self._expanded_button_index = -1
return return
self._expanded_button_index = self.toolbar.get_item_index(button) self._expanded_button_index = self.toolbar.get_item_index(button)

View File

@ -114,7 +114,7 @@ class Activity(GObject.GObject):
self._joined_buddies = {} self._joined_buddies = {}
self._get_properties_call = None self._get_properties_call = None
if not self.room_handle is None: if self.room_handle is not None:
self._start_tracking_properties() self._start_tracking_properties()
def _start_tracking_properties(self): def _start_tracking_properties(self):
@ -390,7 +390,7 @@ class Activity(GObject.GObject):
self._join_command.run() self._join_command.run()
def share(self, share_activity_cb, share_activity_error_cb): def share(self, share_activity_cb, share_activity_error_cb):
if not self.room_handle is None: if self.room_handle is not None:
raise ValueError('Already have a room handle') raise ValueError('Already have a room handle')
self._share_command = _ShareCommand(self.telepathy_conn, self._id) self._share_command = _ShareCommand(self.telepathy_conn, self._id)