← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/PEP8 into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/PEP8 into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~trb143/openlp/PEP8/+merge/208960

Not working yet but requested to help debugging.

PEP8 cleanup for the SONGS plugin.
-- 
https://code.launchpad.net/~trb143/openlp/PEP8/+merge/208960
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/PEP8 into lp:openlp.
=== modified file 'openlp/core/ui/wizard.py'
--- openlp/core/ui/wizard.py	2013-12-28 21:33:38 +0000
+++ openlp/core/ui/wizard.py	2014-03-02 09:40:29 +0000
@@ -65,37 +65,27 @@
     Ready = translate('OpenLP.Ui', 'Ready.')
     StartingImport = translate('OpenLP.Ui', 'Starting import...')
     YouSpecifyFile = translate('OpenLP.Ui', 'You need to specify one '
-        '%s file to import from.', 'A file type e.g. OpenSong')
+                               '%s file to import from.', 'A file type e.g. OpenSong')
     YouSpecifyFiles = translate('OpenLP.Ui', 'You need to specify at '
-        'least one %s file to import from.', 'A file type e.g. OpenSong')
+                                'least one %s file to import from.', 'A file type e.g. OpenSong')
     YouSpecifyFolder = translate('OpenLP.Ui', 'You need to specify one '
-        '%s folder to import from.', 'A song format e.g. PowerSong')
+                                 '%s folder to import from.', 'A song format e.g. PowerSong')
 
 
 class OpenLPWizard(QtGui.QWizard):
     """
     Generic OpenLP wizard to provide generic functionality and a unified look
     and feel.
-
-    ``parent``
-        The QWidget-derived parent of the wizard.
-
-    ``plugin``
-        Plugin this wizard is part of. The plugin will be saved in the "plugin" variable.
-        The plugin will also be used as basis for the file dialog methods this class provides.
-
-    ``name``
-        The object name this wizard should have.
-
-    ``image``
-        The image to display on the "welcome" page of the wizard. Should be 163x350.
-
-    ``add_progress_page``
-        Whether to add a progress page with a progressbar at the end of the wizard.
     """
     def __init__(self, parent, plugin, name, image, add_progress_page=True):
         """
         Constructor
+        :param parent: The QWidget-derived parent of the wizard.
+        :param plugin: Plugin this wizard is part of. The plugin will be saved in the "plugin" variable.
+        The plugin will also be used as basis for the file dialog methods this class provides.
+        :param name: The object name this wizard should have.
+        :param image: The image to display on the "welcome" page of the wizard. Should be 163x350.
+        :param add_progress_page: Whether to add a progress page with a progressbar at the end of the wizard.
         """
         super(OpenLPWizard, self).__init__(parent)
         self.plugin = plugin
@@ -120,8 +110,8 @@
         """
         self.setModal(True)
         self.setWizardStyle(QtGui.QWizard.ModernStyle)
-        self.setOptions(QtGui.QWizard.IndependentPages |
-            QtGui.QWizard.NoBackButtonOnStartPage | QtGui.QWizard.NoBackButtonOnLastPage)
+        self.setOptions(QtGui.QWizard.IndependentPages | QtGui.QWizard.NoBackButtonOnStartPage |
+                        QtGui.QWizard.NoBackButtonOnLastPage)
         add_welcome_page(self, image)
         self.add_custom_pages()
         if self.with_progress_page:
@@ -209,16 +199,17 @@
             Registry().execute('openlp_stop_wizard')
         self.done(QtGui.QDialog.Rejected)
 
-    def on_current_id_changed(self, pageId):
+    def on_current_id_changed(self, page_id):
         """
         Perform necessary functions depending on which wizard page is active.
+        :param page_id: The page number
         """
-        if self.with_progress_page and self.page(pageId) == self.progress_page:
+        if self.with_progress_page and self.page(page_id) == self.progress_page:
             self.pre_wizard()
-            self.performWizard()
+            self.perform_wizard()
             self.post_wizard()
         else:
-            self.custom_page_changed(pageId)
+            self.custom_page_changed(page_id)
 
     def custom_page_changed(self, pageId):
         """
@@ -242,11 +233,8 @@
         """
         Update the wizard progress page.
 
-        ``status_text``
-            Current status information to display.
-
-        ``increment``
-            The value to increment the progress bar by.
+        :param status_text: Current status information to display.
+        :param increment: The value to increment the progress bar by.
         """
         log.debug('IncrementBar %s', status_text)
         self.progress_label.setText(status_text)
@@ -276,26 +264,19 @@
         """
         Opens a QFileDialog and saves the filename to the given editbox.
 
-        ``title``
-            The title of the dialog (unicode).
-
-        ``editbox``
-            An editbox (QLineEdit).
-
-        ``setting_name``
-            The place where to save the last opened directory.
-
-        ``filters``
-            The file extension filters. It should contain the file description
+        :param title: The title of the dialog (unicode).
+        :param editbox: An editbox (QLineEdit).
+        :param setting_name: The place where to save the last opened directory.
+        :param filters: The file extension filters. It should contain the file description
             as well as the file extension. For example::
-
                 u'OpenLP 2.0 Databases (*.sqlite)'
         """
         if filters:
             filters += ';;'
         filters += '%s (*)' % UiStrings().AllFiles
         filename = QtGui.QFileDialog.getOpenFileName(self, title,
-            os.path.dirname(Settings().value(self.plugin.settings_section + '/' + setting_name)), filters)
+                                                     os.path.dirname(Settings().value(self.plugin.settings_section +
+                                                                                      '/' + setting_name)), filters)
         if filename:
             editbox.setText(filename)
         Settings().setValue(self.plugin.settings_section + '/' + setting_name, filename)
@@ -304,25 +285,21 @@
         """
         Opens a QFileDialog and saves the selected folder to the given editbox.
 
-        ``title``
-            The title of the dialog (unicode).
-
-        ``editbox``
-            An editbox (QLineEdit).
-
-        ``setting_name``
-            The place where to save the last opened directory.
+        :param title: The title of the dialog (unicode).
+        :param editbox: An editbox (QLineEdit).
+        :param setting_name: The place where to save the last opened directory.
         """
         folder = QtGui.QFileDialog.getExistingDirectory(self, title,
-            Settings().value(self.plugin.settings_section + '/' + setting_name), QtGui.QFileDialog.ShowDirsOnly)
+                                                        Settings().value(self.plugin.settings_section +
+                                                                         '/' + setting_name),
+                                                        QtGui.QFileDialog.ShowDirsOnly)
         if folder:
             editbox.setText(folder)
         Settings().setValue(self.plugin.settings_section + '/' + setting_name, folder)
 
     def _get_application(self):
         """
-        Adds the openlp to the class dynamically.
-        Windows needs to access the application in a dynamic manner.
+        Adds the openlp to the class dynamically. Windows needs to access the application in a dynamic manner.
         """
         if os.name == 'nt':
             return Registry().get('application')

=== modified file 'openlp/plugins/bibles/forms/bibleimportform.py'
--- openlp/plugins/bibles/forms/bibleimportform.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/bibles/forms/bibleimportform.py	2014-03-02 09:40:29 +0000
@@ -86,9 +86,9 @@
         Set up the UI for the bible wizard.
         """
         super(BibleImportForm, self).setupUi(image)
-        self.formatComboBox.currentIndexChanged.connect(self.onCurrentIndexChanged)
+        self.formatComboBox.currentIndexChanged.connect(self.on_current_index_changed)
 
-    def onCurrentIndexChanged(self, index):
+    def on_current_index_changed(self, index):
         """
         Called when the format combo box's index changed. We have to check if
         the import is available and accordingly to disable or enable the next
@@ -524,7 +524,7 @@
             self.progress_label.setText(WizardStrings.StartingImport)
         self.application.process_events()
 
-    def performWizard(self):
+    def perform_wizard(self):
         """
         Perform the actual import.
         """

=== modified file 'openlp/plugins/bibles/forms/bibleupgradeform.py'
--- openlp/plugins/bibles/forms/bibleupgradeform.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/bibles/forms/bibleupgradeform.py	2014-03-02 09:40:29 +0000
@@ -107,7 +107,7 @@
         """
         if self.page(pageId) == self.progress_page:
             self.pre_wizard()
-            self.performWizard()
+            self.perform_wizard()
             self.post_wizard()
         elif self.page(pageId) == self.selectPage and not self.files:
             self.next()
@@ -338,7 +338,7 @@
         self.progress_label.setText(translate('BiblesPlugin.UpgradeWizardForm', 'Starting upgrade...'))
         self.application.process_events()
 
-    def performWizard(self):
+    def perform_wizard(self):
         """
         Perform the actual upgrade.
         """

=== modified file 'openlp/plugins/songs/forms/authorsform.py'
--- openlp/plugins/songs/forms/authorsform.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/authorsform.py	2014-03-02 09:40:29 +0000
@@ -110,9 +110,9 @@
             return False
         elif not self.display_edit.text():
             if critical_error_message_box(
-                message=translate('SongsPlugin.AuthorsForm',
-                    'You have not set a display name for the author, combine the first and last names?'),
-                parent=self, question=True) == QtGui.QMessageBox.Yes:
+                message=translate('SongsPlugin.AuthorsForm', 'You have not set a display name for the author, '
+                                                             'combine the first and last names?'),
+                    parent=self, question=True) == QtGui.QMessageBox.Yes:
                 self.display_edit.setText(self.first_name_edit.text() + ' ' + self.last_name_edit.text())
                 return QtGui.QDialog.accept(self)
             else:

=== modified file 'openlp/plugins/songs/forms/duplicatesongremovalform.py'
--- openlp/plugins/songs/forms/duplicatesongremovalform.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/forms/duplicatesongremovalform.py	2014-03-02 09:40:29 +0000
@@ -56,19 +56,16 @@
         """
         Instantiate the wizard, and run any extra setup we need to.
 
-        ``parent``
-            The QWidget-derived parent of the wizard.
-
-        ``plugin``
-            The songs plugin.
+        :param plugin: The songs plugin.
         """
         self.duplicate_song_list = []
         self.review_current_count = 0
         self.review_total_count = 0
         # Used to interrupt ongoing searches when cancel is clicked.
         self.break_search = False
-        super(DuplicateSongRemovalForm, self).__init__(Registry().get('main_window'),
-            plugin, 'duplicateSongRemovalWizard', ':/wizards/wizard_duplicateremoval.bmp', False)
+        super(DuplicateSongRemovalForm, self).__init__(Registry().get('main_window'), plugin,
+                                                       'duplicateSongRemovalWizard',
+                                                       ':/wizards/wizard_duplicateremoval.bmp', False)
         self.setMinimumWidth(730)
 
     def custom_signals(self):
@@ -127,23 +124,23 @@
         """
         self.setWindowTitle(translate('Wizard', 'Wizard'))
         self.title_label.setText(WizardStrings.HeaderStyle % translate('OpenLP.Ui',
-            'Welcome to the Duplicate Song Removal Wizard'))
+                                 'Welcome to the Duplicate Song Removal Wizard'))
         self.information_label.setText(translate("Wizard",
-            'This wizard will help you to remove duplicate songs from the song database. You will have a chance to '
-            'review every potential duplicate song before it is deleted. So no songs will be deleted without your '
-            'explicit approval.'))
+                                       'This wizard will help you to remove duplicate songs from the song database. '
+                                       'You will have a chance to review every potential duplicate song before it is '
+                                       'deleted. So no songs will be deleted without your explicit approval.'))
         self.searching_page.setTitle(translate('Wizard', 'Searching for duplicate songs.'))
         self.searching_page.setSubTitle(translate('Wizard', 'Please wait while your songs database is analyzed.'))
         self.update_review_counter_text()
         self.review_page.setSubTitle(translate('Wizard',
-            'Here you can decide which songs to remove and which ones to keep.'))
+                                     'Here you can decide which songs to remove and which ones to keep.'))
 
     def update_review_counter_text(self):
         """
         Set the wizard review page header text.
         """
-        self.review_page.setTitle(translate('Wizard', 'Review duplicate songs (%s/%s)') % \
-                (self.review_current_count, self.review_total_count))
+        self.review_page.setTitle(translate('Wizard', 'Review duplicate songs (%s/%s)') %
+                                 (self.review_current_count, self.review_total_count))
 
     def custom_page_changed(self, page_id):
         """
@@ -173,10 +170,10 @@
                     for inner_song_counter in range(outer_song_counter + 1, max_songs):
                         if songs_probably_equal(songs[outer_song_counter], songs[inner_song_counter]):
                             duplicate_added = self.add_duplicates_to_song_list(songs[outer_song_counter],
-                                songs[inner_song_counter])
+                                                                               songs[inner_song_counter])
                             if duplicate_added:
                                 self.found_duplicates_edit.appendPlainText(songs[outer_song_counter].title + "  =  " +
-                                    songs[inner_song_counter].title)
+                                                                           songs[inner_song_counter].title)
                         self.duplicate_search_progress_bar.setValue(self.duplicate_search_progress_bar.value() + 1)
                         # The call to process_events() will keep the GUI responsive.
                         self.application.process_events()
@@ -194,15 +191,15 @@
 
     def notify_no_duplicates(self):
         """
-        Notifies the user, that there were no duplicates found in the database.
+        Notifies the user, that there were no duplicates found in the sdatabase.
         """
         self.button(QtGui.QWizard.FinishButton).show()
         self.button(QtGui.QWizard.FinishButton).setEnabled(True)
         self.button(QtGui.QWizard.NextButton).hide()
         self.button(QtGui.QWizard.CancelButton).hide()
         QtGui.QMessageBox.information(self, translate('Wizard', 'Information'),
-            translate('Wizard', 'No duplicate songs have been found in the database.'),
-            QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
+                                      translate('Wizard', 'No duplicate songs have been found in the database.'),
+                                      QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
 
     def add_duplicates_to_song_list(self, search_song, duplicate_song):
         """
@@ -360,4 +357,3 @@
             return self._application
 
     application = property(_get_application)
-

=== modified file 'openlp/plugins/songs/forms/editsongdialog.py'
--- openlp/plugins/songs/forms/editsongdialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/editsongdialog.py	2014-03-02 09:40:29 +0000
@@ -153,8 +153,8 @@
         self.topics_layout.setObjectName('topics_layout')
         self.topic_add_layout = QtGui.QHBoxLayout()
         self.topic_add_layout.setObjectName('topic_add_layout')
-        self.topicsComboBox = create_combo_box(self.topics_group_box, 'topicsComboBox')
-        self.topic_add_layout.addWidget(self.topicsComboBox)
+        self.topics_combo_box = create_combo_box(self.topics_group_box, 'topics_combo_box')
+        self.topic_add_layout.addWidget(self.topics_combo_box)
         self.topic_add_button = QtGui.QPushButton(self.topics_group_box)
         self.topic_add_button.setObjectName('topic_add_button')
         self.topic_add_layout.addWidget(self.topic_add_button)
@@ -296,7 +296,7 @@
         self.verse_edit_all_button.setText(translate('SongsPlugin.EditSongForm', 'Ed&it All'))
         self.verse_delete_button.setText(UiStrings().Delete)
         self.song_tab_widget.setTabText(self.song_tab_widget.indexOf(self.lyrics_tab),
-            translate('SongsPlugin.EditSongForm', 'Title && Lyrics'))
+                                        translate('SongsPlugin.EditSongForm', 'Title && Lyrics'))
         self.authors_group_box.setTitle(SongStrings.Authors)
         self.author_add_button.setText(translate('SongsPlugin.EditSongForm', '&Add to Song'))
         self.author_remove_button.setText(translate('SongsPlugin.EditSongForm', '&Remove'))
@@ -308,7 +308,7 @@
         self.song_book_name_label.setText(translate('SongsPlugin.EditSongForm', 'Book:'))
         self.song_book_number_label.setText(translate('SongsPlugin.EditSongForm', 'Number:'))
         self.song_tab_widget.setTabText(self.song_tab_widget.indexOf(self.authors_tab),
-            translate('SongsPlugin.EditSongForm', 'Authors, Topics && Song Book'))
+                                        translate('SongsPlugin.EditSongForm', 'Authors, Topics && Song Book'))
         self.theme_group_box.setTitle(UiStrings().Theme)
         self.theme_add_button.setText(translate('SongsPlugin.EditSongForm', 'New &Theme'))
         self.rights_group_box.setTitle(translate('SongsPlugin.EditSongForm', 'Copyright Information'))
@@ -316,9 +316,9 @@
         self.ccli_label.setText(UiStrings().CCLINumberLabel)
         self.comments_group_box.setTitle(translate('SongsPlugin.EditSongForm', 'Comments'))
         self.song_tab_widget.setTabText(self.song_tab_widget.indexOf(self.theme_tab),
-            translate('SongsPlugin.EditSongForm', 'Theme, Copyright Info && Comments'))
+                                        translate('SongsPlugin.EditSongForm', 'Theme, Copyright Info && Comments'))
         self.song_tab_widget.setTabText(self.song_tab_widget.indexOf(self.audio_tab),
-            translate('SongsPlugin.EditSongForm', 'Linked Audio'))
+                                        translate('SongsPlugin.EditSongForm', 'Linked Audio'))
         self.from_file_button.setText(translate('SongsPlugin.EditSongForm', 'Add &File(s)'))
         self.from_media_button.setText(translate('SongsPlugin.EditSongForm', 'Add &Media'))
         self.audio_remove_button.setText(translate('SongsPlugin.EditSongForm', '&Remove'))

=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2014-03-02 09:40:29 +0000
@@ -111,6 +111,9 @@
     def _load_objects(self, cls, combo, cache):
         """
         Generically load a set of objects into a cache and a combobox.
+        :param cls: Database class, like Author or Books.
+        :param combo: Combo box to be loaded
+        :param cache: list to be loaded for completer.
         """
         objects = self.manager.get_all_objects(cls, order_by_ref=cls.name)
         combo.clear()
@@ -125,12 +128,20 @@
     def _add_author_to_list(self, author):
         """
         Add an author to the author list.
+
+        :param author: The song author name
         """
         author_item = QtGui.QListWidgetItem(str(author.display_name))
         author_item.setData(QtCore.Qt.UserRole, author.id)
         self.authors_list_view.addItem(author_item)
 
     def _extract_verse_order(self, verse_order):
+        """
+        Find the verse order data
+
+        :param verse_order: The order of the verses
+        :return:
+        """
         order = []
         order_names = str(verse_order).split()
         for item in order_names:
@@ -153,6 +164,13 @@
         return order
 
     def _validate_verse_list(self, verse_order, verse_count):
+        """
+        Validate the song verse list
+
+        :param verse_order: Order of the verses
+        :param verse_count: number of verses
+        :return:
+        """
         verses = []
         invalid_verses = []
         verse_names = []
@@ -171,12 +189,14 @@
             valid = create_separated_list(verse_names)
             if len(invalid_verses) > 1:
                 msg = translate('SongsPlugin.EditSongForm', 'There are no verses corresponding to "%(invalid)s".'
-                    'Valid entries are %(valid)s.\nPlease enter the verses seperated by spaces.') \
-                    % {'invalid' : ', '.join(invalid_verses), 'valid' : valid}
+                                                            'Valid entries are %(valid)s.\nPlease enter the verses '
+                                                            'separated by spaces.') \
+                                                            % {'invalid': ', '.join(invalid_verses), 'valid': valid}
             else:
                 msg = translate('SongsPlugin.EditSongForm', 'There is no verse corresponding to "%(invalid)s".'
-                    'Valid entries are %(valid)s.\nPlease enter the verses seperated by spaces.') \
-                    % {'invalid' : invalid_verses[0], 'valid' : valid}
+                                                            'Valid entries are %(valid)s.\nPlease enter the verses '
+                                                            'separated by spaces.') \
+                                                            % {'invalid' : invalid_verses[0], 'valid' : valid}
             critical_error_message_box(title=translate('SongsPlugin.EditSongForm', 'Invalid Verse Order'),
                                        message=msg)
         return len(invalid_verses) == 0
@@ -214,8 +234,10 @@
         text = self.song_book_combo_box.currentText()
         if self.song_book_combo_box.findText(text, QtCore.Qt.MatchExactly) < 0:
             if QtGui.QMessageBox.question(self, translate('SongsPlugin.EditSongForm', 'Add Book'),
-                    translate('SongsPlugin.EditSongForm', 'This song book does not exist, do you want to add it?'),
-                    QtGui.QMessageBox.Yes | QtGui.QMessageBox.No, QtGui.QMessageBox.Yes) == QtGui.QMessageBox.Yes:
+                                          translate('SongsPlugin.EditSongForm', 'This song book does not exist, '
+                                                                                'do you want to add it?'),
+                                          QtGui.QMessageBox.Yes | QtGui.QMessageBox.No, QtGui.QMessageBox.Yes) == \
+                    QtGui.QMessageBox.Yes:
                 book = Book.populate(name=text, publisher='')
                 self.manager.save_object(book)
             else:
@@ -228,39 +250,38 @@
         """
         # This method must only be run after the self.song = Song() assignment.
         log.debug('_processLyrics')
-        sxml = None
+        song_xml = None
         try:
-            sxml = SongXML()
+            song_xml = SongXML()
             multiple = []
             for i in range(self.verse_list_widget.rowCount()):
                 item = self.verse_list_widget.item(i, 0)
                 verse_id = item.data(QtCore.Qt.UserRole)
                 verse_tag = verse_id[0]
                 verse_num = verse_id[1:]
-                sxml.add_verse_to_lyrics(verse_tag, verse_num, item.text())
+                song_xml.add_verse_to_lyrics(verse_tag, verse_num, item.text())
                 if verse_num > '1' and verse_tag not in multiple:
                     multiple.append(verse_tag)
-            self.song.lyrics = str(sxml.extract_xml(), 'utf-8')
+            self.song.lyrics = str(song_xml.extract_xml(), 'utf-8')
             for verse in multiple:
-                self.song.verse_order = re.sub('([' + verse.upper() + verse.lower() + '])(\W|$)',
-                    r'\g<1>1\2', self.song.verse_order)
+                self.song.verse_order = re.sub('([' + verse.upper() + verse.lower() + '])(\W|$)', r'\g<1>1\2',
+                                               self.song.verse_order)
         except:
-            log.exception('Problem processing song Lyrics \n%s', sxml.dump_xml())
+            log.exception('Problem processing song Lyrics \n%s', song_xml.dump_xml())
             raise
 
     def keyPressEvent(self, event):
         """
-        Reimplement the keyPressEvent to react on Return/Enter keys. When some combo boxes have focus we do not want
+        Re-implement the keyPressEvent to react on Return/Enter keys. When some combo boxes have focus we do not want
         dialog's default action be triggered but instead our own.
 
-        ``event``
-            A QtGui.QKeyEvent event.
+        :param event: A QtGui.QKeyEvent event.
         """
         if event.key() in (QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return):
             if self.authors_combo_box.hasFocus() and self.authors_combo_box.currentText():
                 self.on_author_add_button_clicked()
                 return
-            if self.topicsComboBox.hasFocus() and self.topicsComboBox.currentText():
+            if self.topics_combo_box.hasFocus() and self.topics_combo_box.currentText():
                 self.on_topic_add_button_clicked()
                 return
         QtGui.QDialog.keyPressEvent(self, event)
@@ -294,7 +315,7 @@
         Load the topics into the combobox.
         """
         self.topics = []
-        self._load_objects(Topic, self.topicsComboBox, self.topics)
+        self._load_objects(Topic, self.topics_combo_box, self.topics)
 
     def load_books(self):
         """
@@ -321,7 +342,7 @@
         for plugin in self.plugin_manager.plugins:
             if plugin.name == 'media' and plugin.status == PluginStatus.Active:
                 self.from_media_button.setVisible(True)
-                self.media_form.populateFiles(plugin.media_item.get_list(MediaType.Audio))
+                self.media_form.populate_files(plugin.media_item.get_list(MediaType.Audio))
                 break
 
     def new_song(self):
@@ -356,13 +377,10 @@
 
     def load_song(self, song_id, preview=False):
         """
-        Loads a song.
-
-        ``song_id``
-            The song id (int).
-
-        ``preview``
-            Should be ``True`` if the song is also previewed (boolean).
+        Loads a song from database.
+
+        :param song_id: The song id (int).
+        :param preview: Should be ``True`` if the song is also previewed (boolean).
         """
         log.debug('Load Song')
         self.initialise()
@@ -395,38 +413,29 @@
         self.verse_list_widget.clear()
         self.verse_list_widget.setRowCount(0)
         verse_tags_translated = False
-        if self.song.lyrics.startswith('<?xml version='):
-            songXML = SongXML()
-            verse_list = songXML.get_verses(self.song.lyrics)
-            for count, verse in enumerate(verse_list):
-                self.verse_list_widget.setRowCount(self.verse_list_widget.rowCount() + 1)
-                # This silently migrates from localized verse type markup.
-                # If we trusted the database, this would be unnecessary.
-                verse_tag = verse[0]['type']
-                index = None
-                if len(verse_tag) > 1:
-                    index = VerseType.from_translated_string(verse_tag)
-                    if index is None:
-                        index = VerseType.from_string(verse_tag, None)
-                    else:
-                        verse_tags_translated = True
+        song_XML = SongXML()
+        verse_list = song_XML.get_verses(self.song.lyrics)
+        for count, verse in enumerate(verse_list):
+            self.verse_list_widget.setRowCount(self.verse_list_widget.rowCount() + 1)
+            # This silently migrates from localized verse type markup.
+            # If we trusted the database, this would be unnecessary.
+            verse_tag = verse[0]['type']
+            index = None
+            if len(verse_tag) > 1:
+                index = VerseType.from_translated_string(verse_tag)
                 if index is None:
-                    index = VerseType.from_tag(verse_tag)
-                verse[0]['type'] = VerseType.tags[index]
-                if verse[0]['label'] == '':
-                    verse[0]['label'] = '1'
-                verse_def = '%s%s' % (verse[0]['type'], verse[0]['label'])
-                item = QtGui.QTableWidgetItem(verse[1])
-                item.setData(QtCore.Qt.UserRole, verse_def)
-                self.verse_list_widget.setItem(count, 0, item)
-        else:
-            verses = self.song.lyrics.split('\n\n')
-            for count, verse in enumerate(verses):
-                self.verse_list_widget.setRowCount(self.verse_list_widget.rowCount() + 1)
-                item = QtGui.QTableWidgetItem(verse)
-                verse_def = '%s%s' % (VerseType.tags[VerseType.Verse], str(count + 1))
-                item.setData(QtCore.Qt.UserRole, verse_def)
-                self.verse_list_widget.setItem(count, 0, item)
+                    index = VerseType.from_string(verse_tag, None)
+                else:
+                    verse_tags_translated = True
+            if index is None:
+                index = VerseType.from_tag(verse_tag)
+            verse[0]['type'] = VerseType.tags[index]
+            if verse[0]['label'] == '':
+                verse[0]['label'] = '1'
+            verse_def = '%s%s' % (verse[0]['type'], verse[0]['label'])
+            item = QtGui.QTableWidgetItem(verse[1])
+            item.setData(QtCore.Qt.UserRole, verse_def)
+            self.verse_list_widget.setItem(count, 0, item)
         if self.song.verse_order:
             # we translate verse order
             translated = []
@@ -492,15 +501,16 @@
             # Index 0 is a blank string, so add 1
             item = self.authors.index(text) + 1
         if item == 0 and text:
-            if QtGui.QMessageBox.question(self,
-                translate('SongsPlugin.EditSongForm', 'Add Author'),
-                translate('SongsPlugin.EditSongForm', 'This author does not exist, do you want to add them?'),
-                QtGui.QMessageBox.Yes | QtGui.QMessageBox.No, QtGui.QMessageBox.Yes) == QtGui.QMessageBox.Yes:
+            if QtGui.QMessageBox.question(self, translate('SongsPlugin.EditSongForm', 'Add Author'),
+                                          translate('SongsPlugin.EditSongForm', 'This author does not exist, '
+                                                                                'do you want to add them?'),
+                                          QtGui.QMessageBox.Yes | QtGui.QMessageBox.No,
+                                          QtGui.QMessageBox.Yes) == QtGui.QMessageBox.Yes:
                 if text.find(' ') == -1:
                     author = Author.populate(first_name='', last_name='', display_name=text)
                 else:
                     author = Author.populate(first_name=text.rsplit(' ', 1)[0],
-                        last_name=text.rsplit(' ', 1)[1], display_name=text)
+                                             last_name=text.rsplit(' ', 1)[1], display_name=text)
                 self.manager.save_object(author)
                 self._add_author_to_list(author)
                 self.load_authors()
@@ -510,8 +520,7 @@
         elif item > 0:
             item_id = (self.authors_combo_box.itemData(item))
             author = self.manager.get_object(Author, item_id)
-            if self.authors_list_view.findItems(str(author.display_name),
-                QtCore.Qt.MatchExactly):
+            if self.authors_list_view.findItems(str(author.display_name), QtCore.Qt.MatchExactly):
                 critical_error_message_box(
                     message=translate('SongsPlugin.EditSongForm', 'This author is already in the list.'))
             else:
@@ -519,9 +528,11 @@
             self.authors_combo_box.setCurrentIndex(0)
         else:
             QtGui.QMessageBox.warning(self, UiStrings().NISs,
-                translate('SongsPlugin.EditSongForm', 'You have not selected a valid author. Either select an author '
-                    'from the list, or type in a new author and click the "Add Author to Song" button to add '
-                    'the new author.'))
+                                      translate('SongsPlugin.EditSongForm', 'You have not selected a valid author. '
+                                                                            'Either select an author from the list, '
+                                                                            'or type in a new author and click'
+                                                                            ' the "Add Author to Song" button to add '
+                                                                            'the new author.'))
 
     def on_authors_list_view_clicked(self):
         """
@@ -540,55 +551,74 @@
         self.authors_list_view.takeItem(row)
 
     def on_topic_add_button_clicked(self):
-        item = int(self.topicsComboBox.currentIndex())
-        text = self.topicsComboBox.currentText()
+        """
+        The add topic button has been clicked.
+        """
+        item = int(self.topics_combo_box.currentIndex())
+        text = self.topics_combo_box.currentText()
         if item == 0 and text:
             if QtGui.QMessageBox.question(self, translate('SongsPlugin.EditSongForm', 'Add Topic'),
-                    translate('SongsPlugin.EditSongForm', 'This topic does not exist, do you want to add it?'),
-                    QtGui.QMessageBox.Yes | QtGui.QMessageBox.No, QtGui.QMessageBox.Yes) == QtGui.QMessageBox.Yes:
+                                          translate('SongsPlugin.EditSongForm', 'This topic does not exist, '
+                                                                                'do you want to add it?'),
+                                          QtGui.QMessageBox.Yes | QtGui.QMessageBox.No, QtGui.QMessageBox.Yes) == \
+                                          QtGui.QMessageBox.Yes:
                 topic = Topic.populate(name=text)
                 self.manager.save_object(topic)
                 topic_item = QtGui.QListWidgetItem(str(topic.name))
                 topic_item.setData(QtCore.Qt.UserRole, topic.id)
                 self.topics_list_view.addItem(topic_item)
                 self.load_topics()
-                self.topicsComboBox.setCurrentIndex(0)
+                self.topics_combo_box.setCurrentIndex(0)
             else:
                 return
         elif item > 0:
-            item_id = (self.topicsComboBox.itemData(item))
+            item_id = (self.topics_combo_box.itemData(item))
             topic = self.manager.get_object(Topic, item_id)
-            if self.topics_list_view.findItems(str(topic.name),
-                QtCore.Qt.MatchExactly):
+            if self.topics_list_view.findItems(str(topic.name), QtCore.Qt.MatchExactly):
                 critical_error_message_box(
                     message=translate('SongsPlugin.EditSongForm', 'This topic is already in the list.'))
             else:
                 topic_item = QtGui.QListWidgetItem(str(topic.name))
                 topic_item.setData(QtCore.Qt.UserRole, topic.id)
                 self.topics_list_view.addItem(topic_item)
-            self.topicsComboBox.setCurrentIndex(0)
+            self.topics_combo_box.setCurrentIndex(0)
         else:
             QtGui.QMessageBox.warning(self, UiStrings().NISs,
-                translate('SongsPlugin.EditSongForm', 'You have not selected a valid topic. Either select a topic '
-                'from the list, or type in a new topic and click the "Add Topic to Song" button to add the new topic.'))
+                                      translate('SongsPlugin.EditSongForm', 'You have not selected a valid topic. '
+                                                                            'Either select a topic '
+                                                                            'from the list, or type in a new topic '
+                                                                            'and click the "Add Topic to Song" button'
+                                                                            ' to add the new topic.'))
 
     def on_topic_list_view_clicked(self):
+        """
+        Support clicking the topic list view
+        """
         self.topic_remove_button.setEnabled(True)
 
     def on_topic_remove_button_clicked(self):
+        """
+        Support clicking the topic list button
+        """
         self.topic_remove_button.setEnabled(False)
         item = self.topics_list_view.currentItem()
         row = self.topics_list_view.row(item)
         self.topics_list_view.takeItem(row)
 
     def on_verse_list_view_clicked(self):
+        """
+        Support clicking the verse list view
+        """
         self.verse_edit_button.setEnabled(True)
         self.verse_delete_button.setEnabled(True)
 
     def on_verse_add_button_clicked(self):
+        """
+        Support clicking the verse list button
+        """
         self.verse_form.set_verse('', True)
         if self.verse_form.exec_():
-            after_text, verse_tag, verse_num = self.verse_form.get_verse()
+            after_text, verse_tag, verse_num = self.verse_form.get_verse
             verse_def = '%s%s' % (verse_tag, verse_num)
             item = QtGui.QTableWidgetItem(after_text)
             item.setData(QtCore.Qt.UserRole, verse_def)
@@ -600,13 +630,16 @@
         self.on_verse_order_text_changed(self.verse_order_edit.text())
 
     def on_verse_edit_button_clicked(self):
+        """
+        Support the verse edit button
+        """
         item = self.verse_list_widget.currentItem()
         if item:
             temp_text = item.text()
             verse_id = item.data(QtCore.Qt.UserRole)
             self.verse_form.set_verse(temp_text, True, verse_id)
             if self.verse_form.exec_():
-                after_text, verse_tag, verse_num = self.verse_form.get_verse()
+                after_text, verse_tag, verse_num = self.verse_form.get_verse
                 verse_def = '%s%s' % (verse_tag, verse_num)
                 item.setData(QtCore.Qt.UserRole, verse_def)
                 item.setText(after_text)
@@ -628,6 +661,9 @@
         self.on_verse_order_text_changed(self.verse_order_edit.text())
 
     def on_verse_edit_all_button_clicked(self):
+        """
+        Support the verse edit all button
+        """
         verse_list = ''
         if self.verse_list_widget.rowCount() > 0:
             for row in range(self.verse_list_widget.rowCount()):
@@ -643,7 +679,7 @@
             self.verse_form.set_verse('')
         if not self.verse_form.exec_():
             return
-        verse_list = self.verse_form.get_all_verses()
+        verse_list = self.verse_form.get_all_verses
         verse_list = str(verse_list.replace('\r\n', '\n'))
         self.verse_list_widget.clear()
         self.verse_list_widget.setRowCount(0)
@@ -653,7 +689,7 @@
                     if count == 0:
                         if len(parts) == 0:
                             continue
-                        # handling carefully user inputted versetags
+                        # handling carefully user inputted verse tags
                         separator = parts.find(':')
                         if separator >= 0:
                             verse_name = parts[0:separator].strip()
@@ -686,6 +722,9 @@
         self.on_verse_order_text_changed(self.verse_order_edit.text())
 
     def on_verse_delete_button_clicked(self):
+        """
+        Support the verse delete button
+        """
         self.verse_list_widget.removeRow(self.verse_list_widget.currentRow())
         if not self.verse_list_widget.selectedItems():
             self.verse_edit_button.setEnabled(False)
@@ -696,8 +735,7 @@
         Checks if the verse order is complete or missing. Shows a error message according to the state of the verse
         order.
 
-        ``text``
-            The text of the verse order edit (ignored).
+        :param text: The text of the verse order edit (ignored).
         """
         # Extract all verses which were used in the order.
         verses_in_order = self._extract_verse_order(self.verse_order_edit.text())
@@ -719,6 +757,9 @@
         self.warning_label.setText(label_text)
 
     def on_copyright_insert_button_triggered(self):
+        """
+        Support the copyright insert button
+        """
         text = self.copyright_edit.text()
         pos = self.copyright_edit.cursorPosition()
         sign = SongStrings.CopyrightSymbol
@@ -728,6 +769,9 @@
         self.copyright_edit.setCursorPosition(pos + len(sign))
 
     def on_maintenance_button_clicked(self):
+        """
+        Support the maintenance button
+        """
         temp_song_book = None
         item = int(self.song_book_combo_box.currentIndex())
         text = self.song_book_combo_box.currentText()
@@ -745,8 +789,7 @@
         Save and Preview button clicked.
         The Song is valid so as the plugin to add it to preview to see.
 
-        ``button``
-            A button (QPushButton).
+        :param button: A button (QPushButton).
         """
         log.debug('onPreview')
         if button.objectName() == 'preview_button':
@@ -758,9 +801,9 @@
         Loads file(s) from the filesystem.
         """
         filters = '%s (*)' % UiStrings().AllFiles
-        filenames = FileDialog.getOpenFileNames(self,
-            translate('SongsPlugin.EditSongForm', 'Open File(s)'), '', filters)
-        for filename in filenames:
+        file_names = FileDialog.getOpenFileNames(self,
+                                                 translate('SongsPlugin.EditSongForm', 'Open File(s)'), '', filters)
+        for filename in file_names:
             item = QtGui.QListWidgetItem(os.path.split(str(filename))[1])
             item.setData(QtCore.Qt.UserRole, filename)
             self.audio_list_widget.addItem(item)
@@ -770,7 +813,7 @@
         Loads file(s) from the media plugin.
         """
         if self.media_form.exec_():
-            for filename in self.media_form.getSelectedFiles():
+            for filename in self.media_form.get_selected_files:
                 item = QtGui.QListWidgetItem(os.path.split(str(filename))[1])
                 item.setData(QtCore.Qt.UserRole, filename)
                 self.audio_list_widget.addItem(item)
@@ -848,8 +891,7 @@
         (Authors, Books and Topics) have been saved before this function is
         called.
 
-        ``preview``
-            Should be ``True`` if the song is also previewed (boolean).
+        :param preview:  Should be ``True`` if the song is also previewed (boolean).
         """
         # The Song() assignment. No database calls should be made while a
         # Song() is in a partially complete state.
@@ -863,9 +905,9 @@
         self.song.search_lyrics = ''
         self.song.verse_order = ''
         self.song.comments = self.comments_edit.toPlainText()
-        ordertext = self.verse_order_edit.text()
+        order_text = self.verse_order_edit.text()
         order = []
-        for item in ordertext.split():
+        for item in order_text.split():
             verse_tag = VerseType.tags[VerseType.from_translated_tag(item[0])]
             verse_num = item[1:].lower()
             order.append('%s%s' % (verse_tag, verse_num))
@@ -874,8 +916,7 @@
         self.song.song_number = self.song_book_number_edit.text()
         book_name = self.song_book_combo_box.currentText()
         if book_name:
-            self.song.book = self.manager.get_object_filtered(Book,
-                Book.name == book_name)
+            self.song.book = self.manager.get_object_filtered(Book, Book.name == book_name)
         else:
             self.song.book = None
         theme_name = self.theme_combo_box.currentText()
@@ -887,15 +928,15 @@
         self.song.authors = []
         for row in range(self.authors_list_view.count()):
             item = self.authors_list_view.item(row)
-            authorId = (item.data(QtCore.Qt.UserRole))
-            author = self.manager.get_object(Author, authorId)
+            author_id = (item.data(QtCore.Qt.UserRole))
+            author = self.manager.get_object(Author, author_id)
             if author is not None:
                 self.song.authors.append(author)
         self.song.topics = []
         for row in range(self.topics_list_view.count()):
             item = self.topics_list_view.item(row)
-            topicId = (item.data(QtCore.Qt.UserRole))
-            topic = self.manager.get_object(Topic, topicId)
+            topic_id = (item.data(QtCore.Qt.UserRole))
+            topic = self.manager.get_object(Topic, topic_id)
             if topic is not None:
                 self.song.topics.append(topic)
         # Save the song here because we need a valid id for the audio files.
@@ -904,7 +945,7 @@
         audio_files = [a.file_name for a in self.song.media_files]
         log.debug(audio_files)
         save_path = os.path.join(AppLocation.get_section_data_path(self.media_item.plugin.name), 'audio',
-            str(self.song.id))
+                                 str(self.song.id))
         check_directory_exists(save_path)
         self.song.media_files = []
         files = []
@@ -912,8 +953,8 @@
             item = self.audio_list_widget.item(row)
             filename = item.data(QtCore.Qt.UserRole)
             if not filename.startswith(save_path):
-                oldfile, filename = filename, os.path.join(save_path, os.path.split(filename)[1])
-                shutil.copyfile(oldfile, filename)
+                old_file, filename = filename, os.path.join(save_path, os.path.split(filename)[1])
+                shutil.copyfile(old_file, filename)
             files.append(filename)
             media_file = MediaFile()
             media_file.file_name = filename

=== modified file 'openlp/plugins/songs/forms/editversedialog.py'
--- openlp/plugins/songs/forms/editversedialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/editversedialog.py	2014-03-02 09:40:29 +0000
@@ -86,4 +86,4 @@
         self.split_button.setToolTip(UiStrings().SplitToolTip)
         self.insert_button.setText(translate('SongsPlugin.EditVerseForm', '&Insert'))
         self.insert_button.setToolTip(translate('SongsPlugin.EditVerseForm',
-            'Split a slide into two by inserting a verse splitter.'))
+                                      'Split a slide into two by inserting a verse splitter.'))

=== modified file 'openlp/plugins/songs/forms/editverseform.py'
--- openlp/plugins/songs/forms/editverseform.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/editverseform.py	2014-03-02 09:40:29 +0000
@@ -50,16 +50,15 @@
         """
         super(EditVerseForm, self).__init__(parent)
         self.setupUi(self)
-        self.verse_text_edit.customContextMenuRequested.connect(self.context_menu)
         self.insert_button.clicked.connect(self.on_insert_button_clicked)
         self.split_button.clicked.connect(self.on_split_button_clicked)
         self.verse_text_edit.cursorPositionChanged.connect(self.on_cursor_position_changed)
         self.verse_type_combo_box.currentIndexChanged.connect(self.on_verse_type_combo_box_changed)
 
-    def context_menu(self, point):
-        item = self.serviceManagerList.itemAt(point)
-
     def insert_verse(self, verse_tag, verse_num=1):
+        """
+        Insert a new verse
+        """
         if self.verse_text_edit.textCursor().columnNumber() != 0:
             self.verse_text_edit.insertPlainText('\n')
         verse_tag = VerseType.translated_name(verse_tag)
@@ -67,24 +66,36 @@
         self.verse_text_edit.setFocus()
 
     def on_split_button_clicked(self):
+        """
+        Support the split button
+        """
         text = self.verse_text_edit.toPlainText()
         position = self.verse_text_edit.textCursor().position()
         insert_string = '[---]'
         if position and text[position-1] != '\n':
             insert_string = '\n' + insert_string
-        if position ==  len(text) or text[position] != '\n':
+        if position == len(text) or text[position] != '\n':
             insert_string += '\n'
         self.verse_text_edit.insertPlainText(insert_string)
         self.verse_text_edit.setFocus()
 
     def on_insert_button_clicked(self):
+        """
+        Support the insert button
+        """
         verse_type_index = self.verse_type_combo_box.currentIndex()
         self.insert_verse(VerseType.tags[verse_type_index], self.verse_number_box.value())
 
     def on_verse_type_combo_box_changed(self):
+        """
+        Support the verse type combo box
+        """
         self.update_suggested_verse_number()
 
     def on_cursor_position_changed(self):
+        """
+        Support a change of cursor position
+        """
         self.update_suggested_verse_number()
 
     def update_suggested_verse_number(self):
@@ -108,8 +119,6 @@
         text = text[:position + 4]
         match = VERSE_REGEX.match(text)
         if match:
-            # TODO: Not used, remove?
-            # verse_tag = match.group(1)
             try:
                 verse_num = int(match.group(2)) + 1
             except ValueError:
@@ -117,6 +126,12 @@
             self.verse_number_box.setValue(verse_num)
 
     def set_verse(self, text, single=False, tag='%s1' % VerseType.tags[VerseType.Verse]):
+        """
+        Set the verse text on the screen before the UI is displayed
+        :param text: The text to be displayed
+        :param single: One verse of many?
+        :param tag: Verse split tag.
+        """
         self.has_single_verse = single
         if single:
             verse_type_index = VerseType.from_tag(tag[0], None)
@@ -136,10 +151,18 @@
         self.verse_text_edit.moveCursor(QtGui.QTextCursor.End)
 
     def get_verse(self):
+        """
+        Return the UI verse text
+        :return: text string
+        """
         return self.verse_text_edit.toPlainText(), VerseType.tags[self.verse_type_combo_box.currentIndex()], \
             str(self.verse_number_box.value())
 
     def get_all_verses(self):
+        """
+        Return all the UI text
+        :return: text string
+        """
         text = self.verse_text_edit.toPlainText()
         if not text.startswith('---['):
             text = '---[%s:1]---\n%s' % (VerseType.translated_names[VerseType.Verse], text)

=== modified file 'openlp/plugins/songs/forms/mediafilesdialog.py'
--- openlp/plugins/songs/forms/mediafilesdialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/mediafilesdialog.py	2014-03-02 09:40:29 +0000
@@ -69,5 +69,6 @@
         """
         media_files_dialog.setWindowTitle(translate('SongsPlugin.MediaFilesForm', 'Select Media File(s)'))
         self.select_label.setText(translate('SongsPlugin.MediaFilesForm',
-            'Select one or more audio files from the list below, and click OK to import them into this song.'))
+                                  'Select one or more audio files from the list below, and click OK to import them '
+                                  'into this song.'))
 

=== modified file 'openlp/plugins/songs/forms/mediafilesform.py'
--- openlp/plugins/songs/forms/mediafilesform.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/mediafilesform.py	2014-03-02 09:40:29 +0000
@@ -47,13 +47,21 @@
         super(MediaFilesForm, self).__init__()
         self.setupUi(self)
 
-    def populateFiles(self, files):
+    def populate_files(self, files):
+        """
+        Load the list with files
+        :param files: list of file names
+        """
         self.file_list_widget.clear()
         for file in files:
             item = QtGui.QListWidgetItem(os.path.split(file)[1])
             item.setData(QtCore.Qt.UserRole, file)
             self.file_list_widget.addItem(item)
 
-    def getSelectedFiles(self):
+    def get_selected_files(self):
+        """
+        Return the selected file
+        :return:
+        """
         return [item.data(QtCore.Qt.UserRole) for item in self.file_list_widget.selectedItems()]
 

=== modified file 'openlp/plugins/songs/forms/songbookform.py'
--- openlp/plugins/songs/forms/songbookform.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/songbookform.py	2014-03-02 09:40:29 +0000
@@ -52,8 +52,7 @@
         """
         Execute the song book form.
 
-        ``clear``
-            Clear the fields on the form before displaying it.
+        :param clear: Clear the fields on the form before displaying it.
         """
         if clear:
             self.name_edit.clear()

=== modified file 'openlp/plugins/songs/forms/songexportform.py'
--- openlp/plugins/songs/forms/songexportform.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/forms/songexportform.py	2014-03-02 09:40:29 +0000
@@ -82,71 +82,71 @@
         """
         Song wizard specific signals.
         """
-        self.availableListWidget.itemActivated.connect(self.onItemActivated)
-        self.searchLineEdit.textEdited.connect(self.onSearchLineEditChanged)
-        self.uncheckButton.clicked.connect(self.onUncheckButtonClicked)
-        self.checkButton.clicked.connect(self.onCheckButtonClicked)
-        self.directoryButton.clicked.connect(self.onDirectoryButtonClicked)
+        self.available_list_widget.item_activated.connect(self.on_item_activated)
+        self.search_line_edit.textEdited.connect(self.on_search_line_edit_changed)
+        self.uncheck_button.clicked.connect(self.on_uncheck_button_clicked)
+        self.check_button.clicked.connect(self.on_check_button_clicked)
+        self.directory_button.clicked.connect(self.on_directory_button_clicked)
 
     def add_custom_pages(self):
         """
         Add song wizard specific pages.
         """
         # The page with all available songs.
-        self.availableSongsPage = QtGui.QWizardPage()
-        self.availableSongsPage.setObjectName('availableSongsPage')
-        self.availableSongsLayout = QtGui.QHBoxLayout(self.availableSongsPage)
-        self.availableSongsLayout.setObjectName('availableSongsLayout')
-        self.verticalLayout = QtGui.QVBoxLayout()
-        self.verticalLayout.setObjectName('verticalLayout')
-        self.availableListWidget = QtGui.QListWidget(self.availableSongsPage)
-        self.availableListWidget.setObjectName('availableListWidget')
-        self.verticalLayout.addWidget(self.availableListWidget)
-        self.horizontalLayout = QtGui.QHBoxLayout()
-        self.horizontalLayout.setObjectName('horizontalLayout')
-        self.searchLabel = QtGui.QLabel(self.availableSongsPage)
-        self.searchLabel.setObjectName('searchLabel')
-        self.horizontalLayout.addWidget(self.searchLabel)
-        self.searchLineEdit = QtGui.QLineEdit(self.availableSongsPage)
-        self.searchLineEdit.setObjectName('searchLineEdit')
-        self.horizontalLayout.addWidget(self.searchLineEdit)
+        self.available_songs_page = QtGui.QWizardPage()
+        self.available_songs_page.setObjectName('available_songs_page')
+        self.available_songs_layout = QtGui.QHBoxLayout(self.available_songs_page)
+        self.available_songs_layout.setObjectName('available_songs_layout')
+        self.vertical_layout = QtGui.QVBoxLayout()
+        self.vertical_layout.setObjectName('vertical_layout')
+        self.available_list_widget = QtGui.QListWidget(self.available_songs_page)
+        self.available_list_widget.setObjectName('available_list_widget')
+        self.vertical_layout.addWidget(self.available_list_widget)
+        self.horizontal_layout = QtGui.QHBoxLayout()
+        self.horizontal_layout.setObjectName('horizontal_layout')
+        self.search_label = QtGui.QLabel(self.available_songs_page)
+        self.search_label.setObjectName('search_label')
+        self.horizontal_layout.addWidget(self.search_label)
+        self.search_line_edit = QtGui.QLineEdit(self.available_songs_page)
+        self.search_line_edit.setObjectName('search_line_edit')
+        self.horizontal_layout.addWidget(self.search_line_edit)
         spacer_item = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
-        self.horizontalLayout.addItem(spacer_item)
-        self.uncheckButton = QtGui.QPushButton(self.availableSongsPage)
-        self.uncheckButton.setObjectName('uncheckButton')
-        self.horizontalLayout.addWidget(self.uncheckButton)
-        self.checkButton = QtGui.QPushButton(self.availableSongsPage)
-        self.checkButton.setObjectName('selectButton')
-        self.horizontalLayout.addWidget(self.checkButton)
-        self.verticalLayout.addLayout(self.horizontalLayout)
-        self.availableSongsLayout.addLayout(self.verticalLayout)
-        self.addPage(self.availableSongsPage)
+        self.horizontal_layout.addItem(spacer_item)
+        self.uncheck_button = QtGui.QPushButton(self.available_songs_page)
+        self.uncheck_button.setObjectName('uncheck_button')
+        self.horizontal_layout.addWidget(self.uncheck_button)
+        self.check_button = QtGui.QPushButton(self.available_songs_page)
+        self.check_button.setObjectName('selectButton')
+        self.horizontal_layout.addWidget(self.check_button)
+        self.vertical_layout.addLayout(self.horizontal_layout)
+        self.available_songs_layout.addLayout(self.vertical_layout)
+        self.addPage(self.available_songs_page)
         # The page with the selected songs.
-        self.exportSongPage = QtGui.QWizardPage()
-        self.exportSongPage.setObjectName('availableSongsPage')
-        self.exportSongLayout = QtGui.QHBoxLayout(self.exportSongPage)
-        self.exportSongLayout.setObjectName('exportSongLayout')
-        self.gridLayout = QtGui.QGridLayout()
-        self.gridLayout.setObjectName('gridLayout')
-        self.selectedListWidget = QtGui.QListWidget(self.exportSongPage)
-        self.selectedListWidget.setObjectName('selectedListWidget')
-        self.gridLayout.addWidget(self.selectedListWidget, 1, 0, 1, 1)
-        # FIXME: self.horizontalLayout is already defined above?!?!?
-        self.horizontalLayout = QtGui.QHBoxLayout()
-        self.horizontalLayout.setObjectName('horizontalLayout')
-        self.directoryLabel = QtGui.QLabel(self.exportSongPage)
-        self.directoryLabel.setObjectName('directoryLabel')
-        self.horizontalLayout.addWidget(self.directoryLabel)
-        self.directoryLineEdit = QtGui.QLineEdit(self.exportSongPage)
-        self.directoryLineEdit.setObjectName('directoryLineEdit')
-        self.horizontalLayout.addWidget(self.directoryLineEdit)
-        self.directoryButton = QtGui.QToolButton(self.exportSongPage)
-        self.directoryButton.setIcon(build_icon(':/exports/export_load.png'))
-        self.directoryButton.setObjectName('directoryButton')
-        self.horizontalLayout.addWidget(self.directoryButton)
-        self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
-        self.exportSongLayout.addLayout(self.gridLayout)
-        self.addPage(self.exportSongPage)
+        self.export_song_page = QtGui.QWizardPage()
+        self.export_song_page.setObjectName('available_songs_page')
+        self.export_song_layout = QtGui.QHBoxLayout(self.export_song_page)
+        self.export_song_layout.setObjectName('export_song_layout')
+        self.grid_layout = QtGui.QGridLayout()
+        self.grid_layout.setObjectName('grid_layout')
+        self.selected_list_widget = QtGui.QListWidget(self.export_song_page)
+        self.selected_list_widget.setObjectName('selected_list_widget')
+        self.grid_layout.addWidget(self.selected_list_widget, 1, 0, 1, 1)
+        # FIXME: self.horizontal_layout is already defined above?!?!?
+        self.horizontal_layout = QtGui.QHBoxLayout()
+        self.horizontal_layout.setObjectName('horizontal_layout')
+        self.directory_label = QtGui.QLabel(self.export_song_page)
+        self.directory_label.setObjectName('directory_label')
+        self.horizontal_layout.addWidget(self.directory_label)
+        self.directory_line_edit = QtGui.QLineEdit(self.export_song_page)
+        self.directory_line_edit.setObjectName('directory_line_edit')
+        self.horizontal_layout.addWidget(self.directory_line_edit)
+        self.directory_button = QtGui.QToolButton(self.export_song_page)
+        self.directory_button.setIcon(build_icon(':/exports/export_load.png'))
+        self.directory_button.setObjectName('directory_button')
+        self.horizontal_layout.addWidget(self.directory_button)
+        self.grid_layout.addLayout(self.horizontal_layout, 0, 0, 1, 1)
+        self.export_song_layout.addLayout(self.grid_layout)
+        self.addPage(self.export_song_page)
 
     def retranslateUi(self):
         """
@@ -154,22 +154,23 @@
         """
         self.setWindowTitle(translate('SongsPlugin.ExportWizardForm', 'Song Export Wizard'))
         self.title_label.setText(WizardStrings.HeaderStyle %
-            translate('OpenLP.Ui', 'Welcome to the Song Export Wizard'))
+                                 translate('OpenLP.Ui', 'Welcome to the Song Export Wizard'))
         self.information_label.setText(translate('SongsPlugin.ExportWizardForm', 'This wizard will help to'
-            ' export your songs to the open and free <strong>OpenLyrics </strong> worship song format.'))
-        self.availableSongsPage.setTitle(translate('SongsPlugin.ExportWizardForm', 'Select Songs'))
-        self.availableSongsPage.setSubTitle(translate('SongsPlugin.ExportWizardForm',
-            'Check the songs you want to export.'))
-        self.searchLabel.setText('%s:' % UiStrings().Search)
-        self.uncheckButton.setText(translate('SongsPlugin.ExportWizardForm', 'Uncheck All'))
-        self.checkButton.setText(translate('SongsPlugin.ExportWizardForm', 'Check All'))
-        self.exportSongPage.setTitle(translate('SongsPlugin.ExportWizardForm', 'Select Directory'))
-        self.exportSongPage.setSubTitle(translate('SongsPlugin.ExportWizardForm',
-            'Select the directory where you want the songs to be saved.'))
-        self.directoryLabel.setText(translate('SongsPlugin.ExportWizardForm', 'Directory:'))
+                                       ' export your songs to the open and free <strong>OpenLyrics </strong> '
+                                       'worship song format.'))
+        self.available_songs_page.setTitle(translate('SongsPlugin.ExportWizardForm', 'Select Songs'))
+        self.available_songs_page.setSubTitle(translate('SongsPlugin.ExportWizardForm',
+                                              'Check the songs you want to export.'))
+        self.search_label.setText('%s:' % UiStrings().Search)
+        self.uncheck_button.setText(translate('SongsPlugin.ExportWizardForm', 'Uncheck All'))
+        self.check_button.setText(translate('SongsPlugin.ExportWizardForm', 'Check All'))
+        self.export_song_page.setTitle(translate('SongsPlugin.ExportWizardForm', 'Select Directory'))
+        self.export_song_page.setSubTitle(translate('SongsPlugin.ExportWizardForm',
+                                          'Select the directory where you want the songs to be saved.'))
+        self.directory_label.setText(translate('SongsPlugin.ExportWizardForm', 'Directory:'))
         self.progress_page.setTitle(translate('SongsPlugin.ExportWizardForm', 'Exporting'))
         self.progress_page.setSubTitle(translate('SongsPlugin.ExportWizardForm',
-            'Please wait while your songs are exported.'))
+                                       'Please wait while your songs are exported.'))
         self.progress_label.setText(WizardStrings.Ready)
         self.progress_bar.setFormat(WizardStrings.PercentSymbolFormat)
 
@@ -179,33 +180,33 @@
         """
         if self.currentPage() == self.welcome_page:
             return True
-        elif self.currentPage() == self.availableSongsPage:
+        elif self.currentPage() == self.available_songs_page:
             items = [
-                item for item in self._findListWidgetItems(
-                self.availableListWidget) if item.checkState()
+                item for item in self._findList_widget_items(self.available_list_widget) if item.checkState()
             ]
             if not items:
                 critical_error_message_box(UiStrings().NISp,
-                    translate('SongsPlugin.ExportWizardForm', 'You need to add at least one Song to export.'))
+                                           translate('SongsPlugin.ExportWizardForm',
+                                                     'You need to add at least one Song to export.'))
                 return False
-            self.selectedListWidget.clear()
+            self.selected_list_widget.clear()
             # Add the songs to the list of selected songs.
             for item in items:
                 song = QtGui.QListWidgetItem(item.text())
                 song.setData(QtCore.Qt.UserRole, item.data(QtCore.Qt.UserRole))
                 song.setFlags(QtCore.Qt.ItemIsEnabled)
-                self.selectedListWidget.addItem(song)
+                self.selected_list_widget.addItem(song)
             return True
-        elif self.currentPage() == self.exportSongPage:
-            if not self.directoryLineEdit.text():
+        elif self.currentPage() == self.export_song_page:
+            if not self.directory_line_edit.text():
                 critical_error_message_box(
                     translate('SongsPlugin.ExportWizardForm', 'No Save Location specified'),
                     translate('SongsPlugin.ExportWizardForm', 'You need to specify a directory.'))
                 return False
             return True
         elif self.currentPage() == self.progress_page:
-            self.availableListWidget.clear()
-            self.selectedListWidget.clear()
+            self.available_list_widget.clear()
+            self.selected_list_widget.clear()
             return True
 
     def setDefaults(self):
@@ -215,10 +216,10 @@
         self.restart()
         self.finish_button.setVisible(False)
         self.cancel_button.setVisible(True)
-        self.availableListWidget.clear()
-        self.selectedListWidget.clear()
-        self.directoryLineEdit.clear()
-        self.searchLineEdit.clear()
+        self.available_list_widget.clear()
+        self.selected_list_widget.clear()
+        self.directory_line_edit.clear()
+        self.search_line_edit.clear()
         # Load the list of songs.
         self.application.set_busy_cursor()
         songs = self.plugin.manager.get_all_objects(Song)
@@ -233,7 +234,7 @@
             item.setData(QtCore.Qt.UserRole, song)
             item.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsUserCheckable | QtCore.Qt.ItemIsEnabled)
             item.setCheckState(QtCore.Qt.Unchecked)
-            self.availableListWidget.addItem(item)
+            self.available_list_widget.addItem(item)
         self.application.set_normal_cursor()
 
     def pre_wizard(self):
@@ -244,86 +245,82 @@
         self.progress_label.setText(translate('SongsPlugin.ExportWizardForm', 'Starting export...'))
         self.application.process_events()
 
-    def performWizard(self):
+    def perform_wizard(self):
         """
         Perform the actual export. This creates an *openlyricsexport* instance
         and calls the *do_export* method.
         """
         songs = [
             song.data(QtCore.Qt.UserRole)
-            for song in self._findListWidgetItems(self.selectedListWidget)
+            for song in self._findList_widget_items(self.selected_list_widget)
         ]
-        exporter = OpenLyricsExport(self, songs, self.directoryLineEdit.text())
+        exporter = OpenLyricsExport(self, songs, self.directory_line_edit.text())
         if exporter.do_export():
             self.progress_label.setText(translate('SongsPlugin.SongExportForm',
-                    'Finished export. To import these files use the <strong>OpenLyrics</strong> importer.'))
+                                        'Finished export. To import these files use the <strong>OpenLyrics</strong> '
+                                        'importer.'))
         else:
             self.progress_label.setText(translate('SongsPlugin.SongExportForm', 'Your song export failed.'))
 
-    def _findListWidgetItems(self, listWidget, text=''):
+    def _findList_widget_items(self, list_widget, text=''):
         """
-        Returns a list of *QListWidgetItem*s of the ``listWidget``. Note, that
+        Returns a list of *QList_widget_item*s of the ``list_widget``. Note, that
         hidden items are included.
 
-        ``listWidget``
-            The widget to get all items from. (QListWidget)
-
-        ``text``
-            The text to search for. (unicode string)
+        :param list_widget: The widget to get all items from. (QList_widget)
+        :param text:  The text to search for.
         """
         return [
-            item for item in listWidget.findItems(text, QtCore.Qt.MatchContains)
+            item for item in list_widget.findItems(text, QtCore.Qt.MatchContains)
         ]
 
-    def onItemActivated(self, item):
+    def on_item_activated(self, item):
         """
-        Called, when an item in the *availableListWidget* has been triggered.
+        Called, when an item in the *available_list_widget* has been triggered.
         The item is check if it was not checked, whereas it is unchecked when it
         was checked.
 
-        ``item``
-            The *QListWidgetItem* which was triggered.
+        :param item:  The *QList_widget_item* which was triggered.
         """
         item.setCheckState(
             QtCore.Qt.Unchecked if item.checkState() else QtCore.Qt.Checked)
 
-    def onSearchLineEditChanged(self, text):
+    def on_search_line_edit_changed(self, text):
         """
-        The *searchLineEdit*'s text has been changed. Update the list of
+        The *search_line_edit*'s text has been changed. Update the list of
         available songs. Note that any song, which does not match the ``text``
         will be hidden, but not unchecked!
 
-        ``text``
-            The text of the *searchLineEdit*.
+        :param text: The text of the *search_line_edit*.
         """
         search_result = [
-            song for song in self._findListWidgetItems(self.availableListWidget, text)
+            song for song in self._findList_widget_items(self.available_list_widget, text)
         ]
-        for item in self._findListWidgetItems(self.availableListWidget):
+        for item in self._findList_widget_items(self.available_list_widget):
             item.setHidden(item not in search_result)
 
-    def onUncheckButtonClicked(self):
-        """
-        The *uncheckButton* has been clicked. Set all visible songs unchecked.
-        """
-        for row in range(self.availableListWidget.count()):
-            item = self.availableListWidget.item(row)
+    def on_uncheck_button_clicked(self):
+        """
+        The *uncheck_button* has been clicked. Set all visible songs unchecked.
+        """
+        for row in range(self.available_list_widget.count()):
+            item = self.available_list_widget.item(row)
             if not item.isHidden():
                 item.setCheckState(QtCore.Qt.Unchecked)
 
-    def onCheckButtonClicked(self):
-        """
-        The *checkButton* has been clicked. Set all visible songs checked.
-        """
-        for row in range(self.availableListWidget.count()):
-            item = self.availableListWidget.item(row)
+    def on_check_button_clicked(self):
+        """
+        The *check_button* has been clicked. Set all visible songs checked.
+        """
+        for row in range(self.available_list_widget.count()):
+            item = self.available_list_widget.item(row)
             if not item.isHidden():
                 item.setCheckState(QtCore.Qt.Checked)
 
-    def onDirectoryButtonClicked(self):
+    def on_directory_button_clicked(self):
         """
-        Called when the *directoryButton* was clicked. Opens a dialog and writes
-        the path to *directoryLineEdit*.
+        Called when the *directory_button* was clicked. Opens a dialog and writes
+        the path to *directory_line_edit*.
         """
         self.get_folder(translate('SongsPlugin.ExportWizardForm', 'Select Destination Folder'),
-            self.directoryLineEdit, 'last directory export')
+                        self.directory_line_edit, 'last directory export')

=== modified file 'openlp/plugins/songs/forms/songimportform.py'
--- openlp/plugins/songs/forms/songimportform.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/forms/songimportform.py	2014-03-02 09:40:29 +0000
@@ -72,9 +72,9 @@
         super(SongImportForm, self).setupUi(image)
         self.current_format = SongFormat.OpenLyrics
         self.format_stack.setCurrentIndex(self.current_format)
-        self.format_combo_box.currentIndexChanged.connect(self.onCurrentIndexChanged)
+        self.format_combo_box.currentIndexChanged.connect(self.on_current_index_changed)
 
-    def onCurrentIndexChanged(self, index):
+    def on_current_index_changed(self, index):
         """
         Called when the format combo box's index changed.
         """
@@ -98,11 +98,11 @@
         for song_format in SongFormat.get_format_list():
             select_mode = SongFormat.get(song_format, 'selectMode')
             if select_mode == SongFormatSelect.MultipleFiles:
-                self.format_widgets[song_format]['addButton'].clicked.connect(self.on_add_button_clicked)
-                self.format_widgets[song_format]['removeButton'].clicked.connect(self.onRemoveButtonClicked)
+                self.format_widgets[song_format]['add_button'].clicked.connect(self.on_add_button_clicked)
+                self.format_widgets[song_format]['remove_button'].clicked.connect(self.on_remove_button_clicked)
             else:
-                self.format_widgets[song_format]['browseButton'].clicked.connect(self.on_browse_button_clicked)
-                self.format_widgets[song_format]['file_path_edit'].textChanged.connect(self.onFilepathEditTextChanged)
+                self.format_widgets[song_format]['browse_button'].clicked.connect(self.on_browse_button_clicked)
+                self.format_widgets[song_format]['file_path_edit'].text_changed.connect(self.on_filepath_edit_text_changed)
 
     def add_custom_pages(self):
         """
@@ -142,31 +142,32 @@
         self.setWindowTitle(translate('SongsPlugin.ImportWizardForm', 'Song Import Wizard'))
         self.title_label.setText(WizardStrings.HeaderStyle % translate('OpenLP.Ui', 'Welcome to the Song Import Wizard'))
         self.information_label.setText(translate('SongsPlugin.ImportWizardForm',
-            'This wizard will help you to import songs from a variety of '
-            'formats. Click the next button below to start the process by selecting a format to import from.'))
+                                       'This wizard will help you to import songs from a variety of '
+                                       'formats. Click the next button below to start the process by selecting a '
+                                       'format to import from.'))
         self.source_page.setTitle(WizardStrings.ImportSelect)
         self.source_page.setSubTitle(WizardStrings.ImportSelectLong)
         self.format_label.setText(WizardStrings.FormatLabel)
-        for format in SongFormat.get_format_list():
+        for format_list in SongFormat.get_format_list():
             format_name, custom_combo_text, description_text, select_mode = \
-                SongFormat.get(format, 'name', 'comboBoxText', 'descriptionText', 'selectMode')
+                SongFormat.get(format_list, 'name', 'comboBoxText', 'descriptionText', 'selectMode')
             combo_box_text = (custom_combo_text if custom_combo_text else format_name)
             self.format_combo_box.setItemText(format, combo_box_text)
             if description_text is not None:
                 self.format_widgets[format]['description_label'].setText(description_text)
             if select_mode == SongFormatSelect.MultipleFiles:
-                self.format_widgets[format]['addButton'].setText(
+                self.format_widgets[format]['add_button'].setText(
                     translate('SongsPlugin.ImportWizardForm', 'Add Files...'))
-                self.format_widgets[format]['removeButton'].setText(
+                self.format_widgets[format]['remove_button'].setText(
                     translate('SongsPlugin.ImportWizardForm', 'Remove File(s)'))
             else:
-                self.format_widgets[format]['browseButton'].setText(UiStrings().Browse)
+                self.format_widgets[format]['browse_button'].setText(UiStrings().Browse)
                 f_label = 'Filename:'
                 if select_mode == SongFormatSelect.SingleFolder:
                     f_label = 'Folder:'
-                self.format_widgets[format]['filepathLabel'].setText(translate('SongsPlugin.ImportWizardForm', f_label))
-        for format in self.disablable_formats:
-            self.format_widgets[format]['disabled_label'].setText(SongFormat.get(format, 'disabledLabelText'))
+                self.format_widgets[format]['file_path_label'].setText(translate('SongsPlugin.ImportWizardForm', f_label))
+        for format_list in self.disablable_formats:
+            self.format_widgets[format_list]['disabled_label'].setText(SongFormat.get(format, 'disabledLabelText'))
         self.progress_page.setTitle(WizardStrings.Importing)
         self.progress_page.setSubTitle(
             translate('SongsPlugin.ImportWizardForm', 'Please wait while your songs are imported.'))
@@ -175,20 +176,19 @@
         self.error_copy_to_button.setText(translate('SongsPlugin.ImportWizardForm', 'Copy'))
         self.error_save_to_button.setText(translate('SongsPlugin.ImportWizardForm', 'Save to File'))
         # Align all QFormLayouts towards each other.
-        formats = [f for f in SongFormat.get_format_list() if 'filepathLabel' in self.format_widgets[f]]
-        labels = [self.format_widgets[f]['filepathLabel'] for f in formats]
+        formats = [f for f in SongFormat.get_format_list() if 'file_path_label' in self.format_widgets[f]]
+        labels = [self.format_widgets[f]['file_path_label'] for f in formats]
         # Get max width of all labels
         max_label_width = max(self.format_label.minimumSizeHint().width(),
-            max([label.minimumSizeHint().width() for label in labels]))
+                              max([label.minimumSizeHint().width() for label in labels]))
         self.format_spacer.changeSize(max_label_width, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
         spacers = [self.format_widgets[f]['filepathSpacer'] for f in formats]
         for index, spacer in enumerate(spacers):
-            spacer.changeSize(
-                max_label_width - labels[index].minimumSizeHint().width(), 0,
-                QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
-        # Align descriptionLabels with rest of layout
-        for format in SongFormat.get_format_list():
-            if SongFormat.get(format, 'descriptionText') is not None:
+            spacer.changeSize(max_label_width - labels[index].minimumSizeHint().width(), 0,
+                              QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        # Align description_labels with rest of layout
+        for format_list in SongFormat.get_format_list():
+            if SongFormat.get(format_list, 'descriptionText') is not None:
                 self.format_widgets[format]['descriptionSpacer'].changeSize(
                     max_label_width + self.format_h_spacing, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
 
@@ -197,7 +197,7 @@
         Called when changing to a page other than the progress page.
         """
         if self.page(page_id) == self.source_page:
-            self.onCurrentIndexChanged(self.format_stack.currentIndex())
+            self.on_current_index_changed(self.format_stack.currentIndex())
 
     def validateCurrentPage(self):
         """
@@ -213,12 +213,12 @@
             if select_mode == SongFormatSelect.MultipleFiles:
                 import_source = self.get_list_of_files(self.format_widgets[this_format]['file_list_widget'])
                 error_title = UiStrings().IFSp
-                focus_button = self.format_widgets[this_format]['addButton']
+                focus_button = self.format_widgets[this_format]['add_button']
             else:
                 import_source = self.format_widgets[this_format]['file_path_edit'].text()
                 error_title = (UiStrings().IFSs if select_mode == SongFormatSelect.SingleFile else UiStrings().IFdSs)
-                focus_button = self.format_widgets[this_format]['browseButton']
-            if not class_.isValidSource(import_source):
+                focus_button = self.format_widgets[this_format]['browse_button']
+            if not class_.is_valid_source(import_source):
                 critical_error_message_box(error_title, error_msg)
                 focus_button.setFocus()
                 return False
@@ -230,37 +230,34 @@
         """
         Opens a QFileDialog and writes the filenames to the given listbox.
 
-        ``title``
-            The title of the dialog (unicode).
-
-        ``listbox``
-            A listbox (QListWidget).
-
-        ``filters``
-            The file extension filters. It should contain the file descriptions
+        :param title: The title of the dialog
+        :param listbox: A listbox (QListWidget).
+        :param filters: The file extension filters. It should contain the file descriptions
             as well as the file extensions. For example::
-
                 u'SongBeamer Files (*.sng)'
         """
         if filters:
             filters += ';;'
         filters += '%s (*)' % UiStrings().AllFiles
         filenames = FileDialog.getOpenFileNames(self, title,
-            Settings().value(self.plugin.settings_section + '/last directory import'), filters)
+                                                Settings().value(self.plugin.settings_section +
+                                                                 '/last directory import'), filters)
         if filenames:
             listbox.addItems(filenames)
             Settings().setValue(self.plugin.settings_section + '/last directory import',
-                os.path.split(str(filenames[0]))[0])
+                                os.path.split(str(filenames[0]))[0])
 
     def get_list_of_files(self, listbox):
         """
         Return a list of file from the listbox
+        :param listbox: Object to have the list added to
         """
         return [listbox.item(i).text() for i in range(listbox.count())]
 
     def remove_selected_items(self, list_box):
         """
         Remove selected list_box items
+        :param list_box: List box to be processed
         """
         for item in list_box.selectedItems():
             item = list_box.takeItem(list_box.row(item))
@@ -291,14 +288,14 @@
             self.get_files(title, self.format_widgets[this_format]['file_list_widget'], ext_filter)
             self.source_page.emit(QtCore.SIGNAL('completeChanged()'))
 
-    def onRemoveButtonClicked(self):
+    def on_remove_button_clicked(self):
         """
         Remove a file from the list.
         """
         self.remove_selected_items(self.format_widgets[self.current_format]['file_list_widget'])
         self.source_page.emit(QtCore.SIGNAL('completeChanged()'))
 
-    def onFilepathEditTextChanged(self):
+    def on_filepath_edit_text_changed(self):
         """
         Called when the content of the Filename/Folder edit box changes.
         """
@@ -315,8 +312,8 @@
         if last_import_type < 0 or last_import_type >= self.format_combo_box.count():
             last_import_type = 0
         self.format_combo_box.setCurrentIndex(last_import_type)
-        for format in SongFormat.get_format_list():
-            select_mode = SongFormat.get(format, 'selectMode')
+        for format_list in SongFormat.get_format_list():
+            select_mode = SongFormat.get(format_list, 'selectMode')
             if select_mode == SongFormatSelect.MultipleFiles:
                 self.format_widgets[format]['file_list_widget'].clear()
             else:
@@ -334,24 +331,25 @@
         self.progress_label.setText(WizardStrings.StartingImport)
         self.application.process_events()
 
-    def performWizard(self):
+    def perform_wizard(self):
         """
         Perform the actual import. This method pulls in the correct importer
-        class, and then runs the ``doImport`` method of the importer to do
+        class, and then runs the ``do_import`` method of the importer to do
         the actual importing.
         """
         source_format = self.current_format
         select_mode = SongFormat.get(source_format, 'selectMode')
         if select_mode == SongFormatSelect.SingleFile:
-            importer = self.plugin.importSongs(source_format,
-                filename=self.format_widgets[source_format]['file_path_edit'].text())
+            importer = self.plugin.import_songs(source_format,
+                                                filename=self.format_widgets[source_format]['file_path_edit'].text())
         elif select_mode == SongFormatSelect.SingleFolder:
-            importer = self.plugin.importSongs(source_format,
-                folder=self.format_widgets[source_format]['file_path_edit'].text())
+            importer = self.plugin.import_songs(source_format,
+                                                folder=self.format_widgets[source_format]['file_path_edit'].text())
         else:
-            importer = self.plugin.importSongs(source_format,
-                filenames=self.get_list_of_files(self.format_widgets[source_format]['file_list_widget']))
-        importer.doImport()
+            importer = self.plugin.import_songs(source_format,
+                                                filenames=self.get_list_of_files(self.format_widgets[source_format]
+                                                ['file_list_widget']))
+        importer.do_import()
         self.progress_label.setText(WizardStrings.FinishedImport)
 
     def on_error_copy_to_button_clicked(self):
@@ -365,7 +363,8 @@
         Save the error report to a file.
         """
         filename = QtGui.QFileDialog.getSaveFileName(self,
-            Settings().value(self.plugin.settings_section + '/last directory import'))
+                                                     Settings().value(self.plugin.settings_section +
+                                                                      '/last directory import'))
         if not filename:
             return
         report_file = codecs.open(filename, 'w', 'utf-8')
@@ -382,75 +381,75 @@
         page = QtGui.QWidget()
         page.setObjectName(prefix + 'Page')
         if can_disable:
-            importWidget = self.disablableWidget(page, prefix)
+            import_widget = self.disablableWidget(page, prefix)
         else:
-            importWidget = page
-        importLayout = QtGui.QVBoxLayout(importWidget)
-        importLayout.setMargin(0)
-        importLayout.setObjectName(prefix + 'ImportLayout')
+            import_widget = page
+        import_layout = QtGui.QVBoxLayout(import_widget)
+        import_layout.setMargin(0)
+        import_layout.setObjectName(prefix + 'Import_layout')
         if description_text is not None:
-            descriptionLayout = QtGui.QHBoxLayout()
-            descriptionLayout.setObjectName(prefix + 'DescriptionLayout')
-            descriptionSpacer = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
-            descriptionLayout.addSpacerItem(descriptionSpacer)
-            description_label = QtGui.QLabel(importWidget)
+            description_layout = QtGui.QHBoxLayout()
+            description_layout.setObjectName(prefix + 'Description_layout')
+            description_spacer = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+            description_layout.addSpacerItem(description_spacer)
+            description_label = QtGui.QLabel(import_widget)
             description_label.setWordWrap(True)
             description_label.setOpenExternalLinks(True)
             description_label.setObjectName(prefix + '_description_label')
-            descriptionLayout.addWidget(description_label)
-            importLayout.addLayout(descriptionLayout)
+            description_layout.addWidget(description_label)
+            import_layout.addLayout(description_layout)
             self.format_widgets[this_format]['description_label'] = description_label
-            self.format_widgets[this_format]['descriptionSpacer'] = descriptionSpacer
+            self.format_widgets[this_format]['descriptionSpacer'] = description_spacer
         if select_mode == SongFormatSelect.SingleFile or select_mode == SongFormatSelect.SingleFolder:
             file_path_layout = QtGui.QHBoxLayout()
             file_path_layout.setObjectName(prefix + '_file_path_layout')
             file_path_layout.setContentsMargins(0, self.format_v_spacing, 0, 0)
-            filepathLabel = QtGui.QLabel(importWidget)
-            filepathLabel.setObjectName(prefix + 'FilepathLabel')
-            file_path_layout.addWidget(filepathLabel)
+            file_path_label = QtGui.QLabel(import_widget)
+            file_path_label.setObjectName(prefix + 'FilepathLabel')
+            file_path_layout.addWidget(file_path_label)
             filepathSpacer = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
             file_path_layout.addSpacerItem(filepathSpacer)
-            file_path_edit = QtGui.QLineEdit(importWidget)
+            file_path_edit = QtGui.QLineEdit(import_widget)
             file_path_edit.setObjectName(prefix + '_file_path_edit')
             file_path_layout.addWidget(file_path_edit)
-            browseButton = QtGui.QToolButton(importWidget)
-            browseButton.setIcon(self.open_icon)
-            browseButton.setObjectName(prefix + 'BrowseButton')
-            file_path_layout.addWidget(browseButton)
-            importLayout.addLayout(file_path_layout)
-            importLayout.addSpacerItem(self.stack_spacer)
-            self.format_widgets[this_format]['filepathLabel'] = filepathLabel
+            browse_button = QtGui.QToolButton(import_widget)
+            browse_button.setIcon(self.open_icon)
+            browse_button.setObjectName(prefix + 'Browse_button')
+            file_path_layout.addWidget(browse_button)
+            import_layout.addLayout(file_path_layout)
+            import_layout.addSpacerItem(self.stack_spacer)
+            self.format_widgets[this_format]['file_path_label'] = file_path_label
             self.format_widgets[this_format]['filepathSpacer'] = filepathSpacer
             self.format_widgets[this_format]['file_path_layout'] = file_path_layout
             self.format_widgets[this_format]['file_path_edit'] = file_path_edit
-            self.format_widgets[this_format]['browseButton'] = browseButton
+            self.format_widgets[this_format]['browse_button'] = browse_button
         elif select_mode == SongFormatSelect.MultipleFiles:
-            fileListWidget = QtGui.QListWidget(importWidget)
-            fileListWidget.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
-            fileListWidget.setObjectName(prefix + 'FileListWidget')
-            importLayout.addWidget(fileListWidget)
+            file_list_widget = QtGui.QListWidget(import_widget)
+            file_list_widget.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
+            file_list_widget.setObjectName(prefix + 'FileListWidget')
+            import_layout.addWidget(file_list_widget)
             button_layout = QtGui.QHBoxLayout()
             button_layout.setObjectName(prefix + '_button_layout')
-            addButton = QtGui.QPushButton(importWidget)
-            addButton.setIcon(self.open_icon)
-            addButton.setObjectName(prefix + 'AddButton')
-            button_layout.addWidget(addButton)
+            add_button = QtGui.QPushButton(import_widget)
+            add_button.setIcon(self.open_icon)
+            add_button.setObjectName(prefix + 'Add_button')
+            button_layout.addWidget(add_button)
             button_layout.addStretch()
-            removeButton = QtGui.QPushButton(importWidget)
-            removeButton.setIcon(self.delete_icon)
-            removeButton.setObjectName(prefix + 'RemoveButton')
-            button_layout.addWidget(removeButton)
-            importLayout.addLayout(button_layout)
-            self.format_widgets[this_format]['file_list_widget'] = fileListWidget
+            remove_button = QtGui.QPushButton(import_widget)
+            remove_button.setIcon(self.delete_icon)
+            remove_button.setObjectName(prefix + 'Remove_button')
+            button_layout.addWidget(remove_button)
+            import_layout.addLayout(button_layout)
+            self.format_widgets[this_format]['file_list_widget'] = file_list_widget
             self.format_widgets[this_format]['button_layout'] = button_layout
-            self.format_widgets[this_format]['addButton'] = addButton
-            self.format_widgets[this_format]['removeButton'] = removeButton
+            self.format_widgets[this_format]['add_button'] = add_button
+            self.format_widgets[this_format]['remove_button'] = remove_button
         self.format_stack.addWidget(page)
         self.format_widgets[this_format]['page'] = page
-        self.format_widgets[this_format]['importLayout'] = importLayout
+        self.format_widgets[this_format]['import_layout'] = import_layout
         self.format_combo_box.addItem('')
 
-    def disablableWidget(self, page, prefix):
+    def disablable_widget(self, page, prefix):
         """
         Disable a widget.
         """

=== modified file 'openlp/plugins/songs/forms/songmaintenancedialog.py'
--- openlp/plugins/songs/forms/songmaintenancedialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/songmaintenancedialog.py	2014-03-02 09:40:29 +0000
@@ -161,6 +161,7 @@
         self.add_book_button.setText(UiStrings().Add)
         self.edit_book_button.setText(UiStrings().Edit)
         self.delete_book_button.setText(UiStrings().Delete)
-        typeListWidth = max(self.fontMetrics().width(SongStrings.Authors),
-            self.fontMetrics().width(SongStrings.Topics), self.fontMetrics().width(SongStrings.SongBooks))
-        self.type_list_widget.setFixedWidth(typeListWidth + self.type_list_widget.iconSize().width() + 32)
+        type_list_width = max(self.fontMetrics().width(SongStrings.Authors),
+                              self.fontMetrics().width(SongStrings.Topics),
+                              self.fontMetrics().width(SongStrings.SongBooks))
+        self.type_list_widget.setFixedWidth(type_list_width + self.type_list_widget.iconSize().width() + 32)

=== modified file 'openlp/plugins/songs/forms/songmaintenanceform.py'
--- openlp/plugins/songs/forms/songmaintenanceform.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/forms/songmaintenanceform.py	2014-03-02 09:40:29 +0000
@@ -82,8 +82,7 @@
         """
         Show the dialog.
 
-        ``from_song_edit``
-            Indicates if the maintenance dialog has been opened from song edit
+        :param from_song_edit: Indicates if the maintenance dialog has been opened from song edit
             or from the media manager. Defaults to **False**.
         """
         self.from_song_edit = from_song_edit
@@ -98,8 +97,7 @@
         """
         Get the ID of the currently selected item.
 
-        ``list_widget``
-            The list widget to examine.
+        :param list_widget: The list widget to examine.
         """
         item = list_widget.currentItem()
         if item:
@@ -111,6 +109,13 @@
     def _delete_item(self, item_class, list_widget, reset_func, dlg_title, del_text, err_text):
         """
         Delete an item.
+
+        :param item_class: What am I deleting
+        :param list_widget: The widget it is resides in
+        :param reset_func: The correct reset function call back
+        :param dlg_title: The message title
+        :param del_text: The message text
+        :param err_text: The error text
         """
         item_id = self._get_current_item_id(list_widget)
         if item_id != -1:
@@ -163,6 +168,9 @@
     def check_author_exists(self, new_author, edit=False):
         """
         Returns *False* if the given Author already exists, otherwise *True*.
+
+        :param new_author: Name of the new author
+        :param edit: Are we editing?
         """
         authors = self.manager.get_all_objects(
             Author,
@@ -172,29 +180,36 @@
                 Author.display_name == new_author.display_name
             )
         )
-        return self.__check_object_exists(authors, new_author, edit)
+        return self._check_object_exists(authors, new_author, edit)
 
     def check_topic_exists(self, new_topic, edit=False):
         """
         Returns *False* if the given Topic already exists, otherwise *True*.
+
+        :param new_topic: Name of the new topic
+        :param edit: Are we editing?
         """
         topics = self.manager.get_all_objects(Topic, Topic.name == new_topic.name)
-        return self.__check_object_exists(topics, new_topic, edit)
+        return self._check_object_exists(topics, new_topic, edit)
 
     def check_song_book_exists(self, new_book, edit=False):
         """
         Returns *False* if the given Topic already exists, otherwise *True*.
+
+        :param new_book: Name of the new book
+        :param edit: Are we editing?
         """
         books = self.manager.get_all_objects(Book,
-            and_(Book.name == new_book.name, Book.publisher == new_book.publisher))
-        return self.__check_object_exists(books, new_book, edit)
+                                             and_(Book.name == new_book.name, Book.publisher == new_book.publisher))
+        return self._check_object_exists(books, new_book, edit)
 
-    def __check_object_exists(self, existing_objects, new_object, edit):
+    def _check_object_exists(self, existing_objects, new_object, edit):
         """
         Utility method to check for an existing object.
 
-        ``edit``
-            If we edit an item, this should be *True*.
+        :param existing_objects: 
+        :param new_object: 
+        :param edit: If we edit an item, this should be *True*.
         """
         if existing_objects:
             # If we edit an existing object, we need to make sure that we do
@@ -297,8 +312,7 @@
                 'author %s use the existing author %s?') %
                     (author.display_name, temp_display_name, author.display_name), parent=self, question=True) == \
                     QtGui.QMessageBox.Yes:
-                self._merge_objects(author, self.merge_authors,
-                    self.reset_authors)
+                self._merge_objects(author, self.merge_authors, self.reset_authors)
             else:
                 # We restore the author's old first and last name as well as
                 # his display name.
@@ -328,17 +342,16 @@
                 else:
                     critical_error_message_box(
                         message=translate('SongsPlugin.SongMaintenanceForm', 'Could not save your changes.'))
-            elif critical_error_message_box(
-                message=translate('SongsPlugin.SongMaintenanceForm',
-                'The topic %s already exists. Would you like to make songs with topic %s use the existing topic %s?') %
-                (topic.name, temp_name, topic.name), parent=self, question=True) == QtGui.QMessageBox.Yes:
+            elif critical_error_message_box(message=translate('SongsPlugin.SongMaintenanceForm',
+                                            'The topic %s already exists. Would you like to make songs with topic %s '
+                                            'use the existing topic %s?') % (topic.name, temp_name, topic.name),
+                                            parent=self, question=True) == QtGui.QMessageBox.Yes:
                 self._merge_objects(topic, self.merge_topics, self.reset_topics)
             else:
                 # We restore the topics's old name.
                 topic.name = temp_name
-                critical_error_message_box(
-                    message=translate('SongsPlugin.SongMaintenanceForm',
-                    'Could not save your modified topic, because it already exists.'))
+                critical_error_message_box(message=translate('SongsPlugin.SongMaintenanceForm',
+                                           'Could not save your modified topic, because it already exists.'))
 
     def on_edit_book_button_clicked(self):
         """
@@ -365,10 +378,10 @@
                 else:
                     critical_error_message_box(
                         message=translate('SongsPlugin.SongMaintenanceForm', 'Could not save your changes.'))
-            elif critical_error_message_box(
-                message=translate('SongsPlugin.SongMaintenanceForm',
-                    'The book %s already exists. Would you like to make songs with book %s use the existing book %s?') %
-                (book.name, temp_name, book.name), parent=self, question=True) == QtGui.QMessageBox.Yes:
+            elif critical_error_message_box(message=translate('SongsPlugin.SongMaintenanceForm',
+                                            'The book %s already exists. Would you like to make songs with book %s '
+                                            'use the existing book %s?') % (book.name, temp_name, book.name),
+                                            parent=self, question=True) == QtGui.QMessageBox.Yes:
                 self._merge_objects(book, self.merge_song_books, self.reset_song_books)
             else:
                 # We restore the book's old name and publisher.
@@ -378,6 +391,10 @@
     def _merge_objects(self, db_object, merge, reset):
         """
         Utility method to merge two objects to leave one in the database.
+
+        :param db_object: Object to be merged
+        :param merge: Merge function
+        :param reset: Function to invoke on a reset
         """
         self.application.set_busy_cursor()
         merge(db_object)
@@ -390,8 +407,7 @@
         """
         Merges two authors into one author.
 
-        ``old_author``
-            The object, which was edited, that will be deleted
+        :param old_author: The object, which was edited, that will be deleted
         """
         # Find the duplicate.
         existing_author = self.manager.get_object_filtered(
@@ -418,8 +434,7 @@
         """
         Merges two topics into one topic.
 
-        ``old_topic``
-            The object, which was edited, that will be deleted
+        :param old_topic: The object, which was edited, that will be deleted
         """
         # Find the duplicate.
         existing_topic = self.manager.get_object_filtered(
@@ -443,8 +458,7 @@
         """
         Merges two books into one book.
 
-        ``old_song_book``
-            The object, which was edited, that will be deleted
+        :param old_song_book: The object, which was edited, that will be deleted
         """
         # Find the duplicate.
         existing_book = self.manager.get_object_filtered(
@@ -467,46 +481,56 @@
         Delete the author if the author is not attached to any songs.
         """
         self._delete_item(Author, self.authors_list_widget, self.reset_authors,
-            translate('SongsPlugin.SongMaintenanceForm', 'Delete Author'),
-            translate('SongsPlugin.SongMaintenanceForm', 'Are you sure you want to delete the selected author?'),
-            translate('SongsPlugin.SongMaintenanceForm',
-                'This author cannot be deleted, they are currently assigned to at least one song.'))
+                          translate('SongsPlugin.SongMaintenanceForm', 'Delete Author'),
+                          translate('SongsPlugin.SongMaintenanceForm', 'Are you sure you want to delete the selected '
+                                                                       'author?'),
+                          translate('SongsPlugin.SongMaintenanceForm',
+                                    'This author cannot be deleted, they are currently assigned to at least one song'
+                                    '.'))
 
     def on_delete_topic_button_clicked(self):
         """
         Delete the Book if the Book is not attached to any songs.
         """
         self._delete_item(Topic, self.topics_list_widget, self.reset_topics,
-            translate('SongsPlugin.SongMaintenanceForm', 'Delete Topic'),
-            translate('SongsPlugin.SongMaintenanceForm', 'Are you sure you want to delete the selected topic?'),
-            translate('SongsPlugin.SongMaintenanceForm',
-                'This topic cannot be deleted, it is currently assigned to at least one song.'))
+                          translate('SongsPlugin.SongMaintenanceForm', 'Delete Topic'),
+                          translate('SongsPlugin.SongMaintenanceForm', 'Are you sure you want to delete the selected '
+                                                                       'topic?'),
+                          translate('SongsPlugin.SongMaintenanceForm',
+                                    'This topic cannot be deleted, it is currently assigned to at least one song.'))
 
     def on_delete_book_button_clicked(self):
         """
         Delete the Book if the Book is not attached to any songs.
         """
         self._delete_item(Book, self.song_books_list_widget, self.reset_song_books,
-            translate('SongsPlugin.SongMaintenanceForm', 'Delete Book'),
-            translate('SongsPlugin.SongMaintenanceForm', 'Are you sure you want to delete the selected book?'),
-            translate('SongsPlugin.SongMaintenanceForm',
-                'This book cannot be deleted, it is currently assigned to at least one song.'))
+                          translate('SongsPlugin.SongMaintenanceForm', 'Delete Book'),
+                          translate('SongsPlugin.SongMaintenanceForm', 'Are you sure you want to delete the selected '
+                                                                       'book?'),
+                          translate('SongsPlugin.SongMaintenanceForm',
+                                    'This book cannot be deleted, it is currently assigned to at least one song.'))
 
     def on_authors_list_row_changed(self, row):
         """
         Called when the *authors_list_widget*'s current row has changed.
+
+        :param row: The current row.
         """
         self._row_change(row, self.edit_author_button, self.delete_author_button)
 
     def on_topics_list_row_changed(self, row):
         """
         Called when the *topics_list_widget*'s current row has changed.
+
+        :param row: The current row.
         """
         self._row_change(row, self.edit_topic_button, self.delete_topic_button)
 
     def on_song_books_list_row_changed(self, row):
         """
         Called when the *song_books_list_widget*'s current row has changed.
+
+        :param row: The current row.
         """
         self._row_change(row, self.edit_book_button, self.delete_book_button)
 
@@ -514,8 +538,9 @@
         """
         Utility method to toggle if buttons are enabled.
 
-        ``row``
-            The current row. If there is no current row, the value is -1.
+        :param row: The current row. If there is no current row, the value is -1.
+        :param edit_button: The ddit button object
+        :param delete_button: The delete button object
         """
         if row == -1:
             delete_button.setEnabled(False)

=== modified file 'openlp/plugins/songs/forms/songreviewwidget.py'
--- openlp/plugins/songs/forms/songreviewwidget.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/songreviewwidget.py	2014-03-02 09:40:29 +0000
@@ -165,7 +165,7 @@
             self.song_info_verse_list_widget.setItem(verse_number, 0, item)
 
             # We cannot use from_loose_input() here, because database
-            # is supposed to contain English lowercase singlechar tags.
+            # is supposed to contain English lowercase single char tags.
             verse_tag = verse[0]['type']
             verse_index = None
             if len(verse_tag) > 1:
@@ -186,7 +186,7 @@
         # Some pixels are missing at the bottom of the table, but all themes I tried still allowed
         # to read the last verse line, so I'll just leave it at that.
         self.song_info_verse_list_widget.setFixedHeight(self.song_info_verse_list_widget.verticalHeader().length() +
-            self.song_info_verse_list_widget.verticalHeader().offset() + 6)
+                                                        self.song_info_verse_list_widget.verticalHeader().offset() + 6)
         self.song_group_box_layout.addWidget(self.song_info_verse_list_widget)
         self.song_group_box_layout.addStretch()
         self.song_vertical_layout.addWidget(self.song_group_box)

=== modified file 'openlp/plugins/songs/forms/topicsform.py'
--- openlp/plugins/songs/forms/topicsform.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/topicsform.py	2014-03-02 09:40:29 +0000
@@ -62,8 +62,7 @@
         Override the inherited method to check before we close.
         """
         if not self.name_edit.text():
-            critical_error_message_box(message=translate('SongsPlugin.TopicsForm',
-                'You need to type in a topic name.'))
+            critical_error_message_box(message=translate('SongsPlugin.TopicsForm', 'You need to type in a topic name.'))
             self.name_edit.setFocus()
             return False
         else:

=== modified file 'openlp/plugins/songs/lib/__init__.py'
--- openlp/plugins/songs/lib/__init__.py	2013-12-24 09:24:32 +0000
+++ openlp/plugins/songs/lib/__init__.py	2014-03-02 09:40:29 +0000
@@ -197,11 +197,8 @@
         """
         Return the translated UPPERCASE tag for a given tag, used to show translated verse tags in UI
 
-        ``verse_tag``
-            The string to return a VerseType for
-
-        ``default``
-            Default return value if no matching tag is found
+        :param verse_tag: The string to return a VerseType for
+        :param default: Default return value if no matching tag is found
         """
         verse_tag = verse_tag[0].lower()
         for num, tag in enumerate(VerseType.tags):
@@ -217,11 +214,8 @@
         """
         Return the translated name for a given tag
 
-        ``verse_tag``
-            The string to return a VerseType for
-
-        ``default``
-            Default return value if no matching tag is found
+        :param verse_tag: The string to return a VerseType for
+        :param default: Default return value if no matching tag is found
         """
         verse_tag = verse_tag[0].lower()
         for num, tag in enumerate(VerseType.tags):
@@ -237,11 +231,8 @@
         """
         Return the VerseType for a given tag
 
-        ``verse_tag``
-            The string to return a VerseType for
-
-        ``default``
-            Default return value if no matching tag is found
+        :param verse_tag: The string to return a VerseType for
+        :param default: Default return value if no matching tag is found
         """
         verse_tag = verse_tag[0].lower()
         for num, tag in enumerate(VerseType.tags):
@@ -277,11 +268,8 @@
         """
         Return the VerseType for a given string
 
-        ``verse_name``
-            The string to return a VerseType for
-
-        ``default``
-            Default return value if no matching tag is found
+        :param verse_name: The string to return a VerseType for
+        :param default: Default return value if no matching tag is found
         """
         verse_name = verse_name.lower()
         for num, name in enumerate(VerseType.names):
@@ -294,8 +282,7 @@
         """
         Return the VerseType for a given string
 
-        ``verse_name``
-            The string to return a VerseType for
+        :param verse_name: The string to return a VerseType for
         """
         verse_name = verse_name.lower()
         for num, translation in enumerate(VerseType.translated_names):
@@ -307,11 +294,8 @@
         """
         Return the VerseType for a given string
 
-        ``verse_name``
-            The string to return a VerseType for
-
-        ``default``
-            Default return value if no matching tag is found
+        :param verse_name: The string to return a VerseType for
+        :param default: Default return value if no matching tag is found
         """
         if len(verse_name) > 1:
             verse_index = VerseType.from_translated_string(verse_name)
@@ -331,35 +315,34 @@
     Determines which encoding to use on an information source. The process uses both automated detection, which is
     passed to this method as a recommendation, and user confirmation to return an encoding.
 
-    ``recommendation``
-        A recommended encoding discovered programmatically for the user to confirm.
+    :param recommendation: A recommended encoding discovered programmatically for the user to confirm.
     """
     # map chardet result to compatible windows standard code page
     codepage_mapping = {'IBM866': 'cp866', 'TIS-620': 'cp874',
-        'SHIFT_JIS': 'cp932', 'GB2312': 'cp936', 'HZ-GB-2312': 'cp936',
-        'EUC-KR': 'cp949', 'Big5': 'cp950', 'ISO-8859-2': 'cp1250',
-        'windows-1250': 'cp1250', 'windows-1251': 'cp1251',
-        'windows-1252': 'cp1252', 'ISO-8859-7': 'cp1253',
-        'windows-1253': 'cp1253', 'ISO-8859-8': 'cp1255',
-        'windows-1255': 'cp1255'}
+                        'SHIFT_JIS': 'cp932', 'GB2312': 'cp936', 'HZ-GB-2312': 'cp936',
+                        'EUC-KR': 'cp949', 'Big5': 'cp950', 'ISO-8859-2': 'cp1250',
+                        'windows-1250': 'cp1250', 'windows-1251': 'cp1251',
+                        'windows-1252': 'cp1252', 'ISO-8859-7': 'cp1253',
+                        'windows-1253': 'cp1253', 'ISO-8859-8': 'cp1255',
+                        'windows-1255': 'cp1255'}
     if recommendation in codepage_mapping:
         recommendation = codepage_mapping[recommendation]
 
     # Show dialog for encoding selection
     encodings = [('cp1256', translate('SongsPlugin', 'Arabic (CP-1256)')),
-        ('cp1257', translate('SongsPlugin', 'Baltic (CP-1257)')),
-        ('cp1250', translate('SongsPlugin', 'Central European (CP-1250)')),
-        ('cp1251', translate('SongsPlugin', 'Cyrillic (CP-1251)')),
-        ('cp1253', translate('SongsPlugin', 'Greek (CP-1253)')),
-        ('cp1255', translate('SongsPlugin', 'Hebrew (CP-1255)')),
-        ('cp932', translate('SongsPlugin', 'Japanese (CP-932)')),
-        ('cp949', translate('SongsPlugin', 'Korean (CP-949)')),
-        ('cp936', translate('SongsPlugin', 'Simplified Chinese (CP-936)')),
-        ('cp874', translate('SongsPlugin', 'Thai (CP-874)')),
-        ('cp950', translate('SongsPlugin', 'Traditional Chinese (CP-950)')),
-        ('cp1254', translate('SongsPlugin', 'Turkish (CP-1254)')),
-        ('cp1258', translate('SongsPlugin', 'Vietnam (CP-1258)')),
-        ('cp1252', translate('SongsPlugin', 'Western European (CP-1252)'))]
+                 ('cp1257', translate('SongsPlugin', 'Baltic (CP-1257)')),
+                 ('cp1250', translate('SongsPlugin', 'Central European (CP-1250)')),
+                 ('cp1251', translate('SongsPlugin', 'Cyrillic (CP-1251)')),
+                 ('cp1253', translate('SongsPlugin', 'Greek (CP-1253)')),
+                 ('cp1255', translate('SongsPlugin', 'Hebrew (CP-1255)')),
+                 ('cp932', translate('SongsPlugin', 'Japanese (CP-932)')),
+                 ('cp949', translate('SongsPlugin', 'Korean (CP-949)')),
+                 ('cp936', translate('SongsPlugin', 'Simplified Chinese (CP-936)')),
+                 ('cp874', translate('SongsPlugin', 'Thai (CP-874)')),
+                 ('cp950', translate('SongsPlugin', 'Traditional Chinese (CP-950)')),
+                 ('cp1254', translate('SongsPlugin', 'Turkish (CP-1254)')),
+                 ('cp1258', translate('SongsPlugin', 'Vietnam (CP-1258)')),
+                 ('cp1252', translate('SongsPlugin', 'Western European (CP-1252)'))]
     recommended_index = -1
     if recommendation:
         for index in range(len(encodings)):
@@ -368,16 +351,19 @@
                 break
     if recommended_index > -1:
         choice = QtGui.QInputDialog.getItem(None,
-            translate('SongsPlugin', 'Character Encoding'),
-            translate('SongsPlugin', 'The codepage setting is responsible\n'
-                'for the correct character representation.\nUsually you are fine with the preselected choice.'),
-            [pair[1] for pair in encodings], recommended_index, False)
+                                            translate('SongsPlugin', 'Character Encoding'),
+                                            translate('SongsPlugin', 'The codepage setting is responsible\n'
+                                                                     'for the correct character representation.\n'
+                                                                     'Usually you are fine with the preselected '
+                                                                     'choice.'),
+                                            [pair[1] for pair in encodings], recommended_index, False)
     else:
         choice = QtGui.QInputDialog.getItem(None,
-            translate('SongsPlugin', 'Character Encoding'),
-            translate('SongsPlugin', 'Please choose the character encoding.\n'
-                'The encoding is responsible for the correct character representation.'),
-                [pair[1] for pair in encodings], 0, False)
+                                            translate('SongsPlugin', 'Character Encoding'),
+                                            translate('SongsPlugin', 'Please choose the character encoding.\n'
+                                                                     'The encoding is responsible for the correct '
+                                                                     'character representation.'),
+                                            [pair[1] for pair in encodings], 0, False)
     if not choice[1]:
         return None
     return next(filter(lambda item: item[1] == choice[0], encodings))[0]
@@ -386,6 +372,8 @@
 def clean_string(string):
     """
     Strips punctuation from the passed string to assist searching.
+
+    :param string: The string to be cleaned
     """
     return WHITESPACE.sub(' ', APOSTROPHE.sub('', string)).lower()
 
@@ -393,6 +381,8 @@
 def clean_title(title):
     """
     Cleans the song title by removing Unicode control chars groups C0 & C1, as well as any trailing spaces.
+
+    :param title: The title to be cleaned
     """
     return CONTROL_CHARS.sub('', title).rstrip()
 
@@ -402,11 +392,8 @@
     Cleans the search title, rebuilds the search lyrics, adds a default author if the song does not have one and other
     clean ups. This should always called when a new song is added or changed.
 
-    ``manager``
-        The song's manager.
-
-    ``song``
-        The song object.
+    :param manager: The song's manager
+    :param song: The song object
     """
     from .xml import SongXML
 
@@ -425,8 +412,7 @@
         # keeps the database clean. This can be removed when everybody has cleaned his songs.
         song.lyrics = song.lyrics.replace('<lyrics language="en">', '<lyrics>')
         verses = SongXML().get_verses(song.lyrics)
-        song.search_lyrics = ' '.join([clean_string(verse[1])
-            for verse in verses])
+        song.search_lyrics = ' '.join([clean_string(verse[1]) for verse in verses])
         # We need a new and clean SongXML instance.
         sxml = SongXML()
         # Rebuild the song's verses, to remove any wrong verse names (for  example translated ones), which might have
@@ -466,8 +452,7 @@
                 break
     else:
         verses = SongXML().get_verses(song.lyrics)
-        song.search_lyrics = ' '.join([clean_string(verse[1])
-            for verse in verses])
+        song.search_lyrics = ' '.join([clean_string(verse[1]) for verse in verses])
 
     # The song does not have any author, add one.
     if not song.authors:
@@ -484,17 +469,10 @@
     """
     Finds an encoding to use. Asks user, if necessary.
 
-    ``font``
-        The number of currently active font.
-
-    ``font_table``
-        Dictionary of fonts and respective encodings.
-
-    ``default_encoding``
-        The default encoding to use when font_table is empty or no font is used.
-
-    ``failed``
-        A boolean indicating whether the previous encoding didn't work.
+    :param font: The number of currently active font.
+    :param font_table: Dictionary of fonts and respective encodings.
+    :param default_encoding: The default encoding to use when font_table is empty or no font is used.
+    :param failed: A boolean indicating whether the previous encoding didn't work.
     """
     encoding = None
     if font in font_table:
@@ -513,13 +491,11 @@
     This function strips RTF control structures and returns an unicode string.
 
     Thanks to Markus Jarderot (MizardX) for this code, used by permission.
+
     http://stackoverflow.com/questions/188545
 
-    ``text``
-        RTF-encoded text, a string.
-
-    ``default_encoding``
-        Default encoding to use when no encoding is specified.
+    :param text: RTF-encoded text, a string
+    :param default_encoding: Default encoding to use when no encoding is specified.
     """
     # Current font is the font tag we last met.
     font = ''
@@ -623,11 +599,8 @@
     Deletes a song from the database. Media files associated to the song
     are removed prior to the deletion of the song.
 
-    ``song_id``
-        The ID of the song to delete.
-
-    ``song_plugin``
-        The song plugin instance.
+    :param song_id: The ID of the song to delete.
+    :param song_plugin: The song plugin instance
     """
     media_files = song_plugin.manager.get_all_objects(MediaFile, MediaFile.song_id == song_id)
     for media_file in media_files:

=== modified file 'openlp/plugins/songs/lib/cclifileimport.py'
--- openlp/plugins/songs/lib/cclifileimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/cclifileimport.py	2014-03-02 09:40:29 +0000
@@ -38,6 +38,7 @@
 
 log = logging.getLogger(__name__)
 
+
 class CCLIFileImport(SongImport):
     """
     The :class:`CCLIFileImport` class provides OpenLP with the ability to import
@@ -49,15 +50,12 @@
         """
         Initialise the import.
 
-        ``manager``
-            The song manager for the running OpenLP installation.
-
-        ``filenames``
-            The files to be imported.
+        :param manager: The song manager for the running OpenLP installation.
+        :param kwargs: The files to be imported.
         """
         SongImport.__init__(self, manager, **kwargs)
 
-    def doImport(self):
+    def do_import(self):
         """
         Import either a ``.usr`` or a ``.txt`` SongSelect file.
         """
@@ -85,26 +83,25 @@
                 ext = os.path.splitext(filename)[1]
                 if ext.lower() == '.usr':
                     log.info('SongSelect .usr format file found: %s', filename)
-                    if not self.doImportUsrFile(lines):
+                    if not self.do_importUsrFile(lines):
                         self.logError(filename)
                 elif ext.lower() == '.txt':
                     log.info('SongSelect .txt format file found: %s', filename)
-                    if not self.doImportTxtFile(lines):
+                    if not self.do_importTxtFile(lines):
                         self.logError(filename)
                 else:
                     self.logError(filename,
-                        translate('SongsPlugin.CCLIFileImport', 'The file does not have a valid extension.'))
+                                  translate('SongsPlugin.CCLIFileImport', 'The file does not have a valid extension.'))
                     log.info('Extension %s is not valid', filename)
             if self.stop_import_flag:
                 return
 
-    def doImportUsrFile(self, textList):
+    def do_import_usr_file(self, textList):
         """
-        The :func:`doImport_usr_file` method provides OpenLP with the ability
+        The :func:`do_import_usr_file` method provides OpenLP with the ability
         to import CCLI SongSelect songs in *USR* file format.
 
-        ``textList``
-            An array of strings containing the usr file content.
+        :param textList: An array of strings containing the usr file content.
 
         **SongSelect .usr file format**
 
@@ -176,7 +173,7 @@
                 song_topics = line[7:].strip().replace(' | ', '/t')
             elif line.startswith('Fields='):
                 # Fields contain single line indicating verse, chorus, etc,
-                # /t delimited, same as with words field. store seperately
+                # /t delimited, same as with words field. store separately
                 # and process at end.
                 song_fields = line[7:].strip()
             elif line.startswith('Words='):
@@ -227,13 +224,12 @@
         self.topics = [topic.strip() for topic in song_topics.split('/t')]
         return self.finish()
 
-    def doImportTxtFile(self, textList):
+    def do_import_txt_file(self, textList):
         """
-        The :func:`doImport_txt_file` method provides OpenLP with the ability
+        The :func:`do_import_txt_file` method provides OpenLP with the ability
         to import CCLI SongSelect songs in *TXT* file format.
 
-        ``textList``
-            An array of strings containing the txt file content.
+        :param textList: An array of strings containing the txt file content.
 
         SongSelect .txt file format::
 

=== modified file 'openlp/plugins/songs/lib/db.py'
--- openlp/plugins/songs/lib/db.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/db.py	2014-03-02 09:40:29 +0000
@@ -174,86 +174,76 @@
 
     # Definition of the "authors" table
     authors_table = Table('authors', metadata,
-        Column('id', types.Integer(), primary_key=True),
-        Column('first_name', types.Unicode(128)),
-        Column('last_name', types.Unicode(128)),
-        Column('display_name', types.Unicode(255), index=True, nullable=False)
+                          Column('id', types.Integer(), primary_key=True),
+                          Column('first_name', types.Unicode(128)),
+                          Column('last_name', types.Unicode(128)),
+                          Column('display_name', types.Unicode(255), index=True, nullable=False)
     )
 
     # Definition of the "media_files" table
     media_files_table = Table('media_files', metadata,
-        Column('id', types.Integer(), primary_key=True),
-        Column('song_id', types.Integer(), ForeignKey('songs.id'),
-            default=None),
-        Column('file_name', types.Unicode(255), nullable=False),
-        Column('type', types.Unicode(64), nullable=False, default='audio'),
-        Column('weight', types.Integer(), default=0)
+                              Column('id', types.Integer(), primary_key=True),
+                              Column('song_id', types.Integer(), ForeignKey('songs.id'), default=None),
+                              Column('file_name', types.Unicode(255), nullable=False),
+                              Column('type', types.Unicode(64), nullable=False, default='audio'),
+                              Column('weight', types.Integer(), default=0)
     )
 
     # Definition of the "song_books" table
     song_books_table = Table('song_books', metadata,
-        Column('id', types.Integer(), primary_key=True),
-        Column('name', types.Unicode(128), nullable=False),
-        Column('publisher', types.Unicode(128))
+                             Column('id', types.Integer(), primary_key=True),
+                             Column('name', types.Unicode(128), nullable=False),
+                             Column('publisher', types.Unicode(128))
     )
 
     # Definition of the "songs" table
     songs_table = Table('songs', metadata,
-        Column('id', types.Integer(), primary_key=True),
-        Column('song_book_id', types.Integer(),
-            ForeignKey('song_books.id'), default=None),
-        Column('title', types.Unicode(255), nullable=False),
-        Column('alternate_title', types.Unicode(255)),
-        Column('lyrics', types.UnicodeText, nullable=False),
-        Column('verse_order', types.Unicode(128)),
-        Column('copyright', types.Unicode(255)),
-        Column('comments', types.UnicodeText),
-        Column('ccli_number', types.Unicode(64)),
-        Column('song_number', types.Unicode(64)),
-        Column('theme_name', types.Unicode(128)),
-        Column('search_title', types.Unicode(255), index=True, nullable=False),
-        Column('search_lyrics', types.UnicodeText, nullable=False),
-        Column('create_date', types.DateTime(), default=func.now()),
-        Column('last_modified', types.DateTime(), default=func.now(),
-            onupdate=func.now()),
-        Column('temporary', types.Boolean(), default=False)
+                        Column('id', types.Integer(), primary_key=True),
+                        Column('song_book_id', types.Integer(), ForeignKey('song_books.id'), default=None),
+                        Column('title', types.Unicode(255), nullable=False),
+                        Column('alternate_title', types.Unicode(255)),
+                        Column('lyrics', types.UnicodeText, nullable=False),
+                        Column('verse_order', types.Unicode(128)),
+                        Column('copyright', types.Unicode(255)),
+                        Column('comments', types.UnicodeText),
+                        Column('ccli_number', types.Unicode(64)),
+                        Column('song_number', types.Unicode(64)),
+                        Column('theme_name', types.Unicode(128)),
+                        Column('search_title', types.Unicode(255), index=True, nullable=False),
+                        Column('search_lyrics', types.UnicodeText, nullable=False),
+                        Column('create_date', types.DateTime(), default=func.now()),
+                        Column('last_modified', types.DateTime(), default=func.now(), onupdate=func.now()),
+                        Column('temporary', types.Boolean(), default=False)
     )
 
     # Definition of the "topics" table
     topics_table = Table('topics', metadata,
-        Column('id', types.Integer(), primary_key=True),
-        Column('name', types.Unicode(128), index=True, nullable=False)
+                         Column('id', types.Integer(), primary_key=True),
+                         Column('name', types.Unicode(128), index=True, nullable=False)
     )
 
     # Definition of the "authors_songs" table
     authors_songs_table = Table('authors_songs', metadata,
-        Column('author_id', types.Integer(),
-            ForeignKey('authors.id'), primary_key=True),
-        Column('song_id', types.Integer(),
-            ForeignKey('songs.id'), primary_key=True)
+                                Column('author_id', types.Integer(), ForeignKey('authors.id'), primary_key=True),
+                                Column('song_id', types.Integer(), ForeignKey('songs.id'), primary_key=True)
     )
 
     # Definition of the "songs_topics" table
     songs_topics_table = Table('songs_topics', metadata,
-        Column('song_id', types.Integer(),
-            ForeignKey('songs.id'), primary_key=True),
-        Column('topic_id', types.Integer(),
-            ForeignKey('topics.id'), primary_key=True)
+                               Column('song_id', types.Integer(), ForeignKey('songs.id'), primary_key=True),
+                               Column('topic_id', types.Integer(), ForeignKey('topics.id'), primary_key=True)
     )
 
     mapper(Author, authors_table)
     mapper(Book, song_books_table)
     mapper(MediaFile, media_files_table)
-    mapper(Song, songs_table,
-        properties={
-            'authors': relation(Author, backref='songs',
-                secondary=authors_songs_table, lazy=False),
-            'book': relation(Book, backref='songs'),
-            'media_files': relation(MediaFile, backref='songs',
-                order_by=media_files_table.c.weight),
-            'topics': relation(Topic, backref='songs',
-                secondary=songs_topics_table)
-        })
+    mapper(Song, songs_table, properties={'authors': relation(Author, backref='songs', secondary=authors_songs_table,
+                                                              lazy=False),
+                                          'book': relation(Book, backref='songs'),
+                                          'media_files': relation(MediaFile, backref='songs',
+                                                                  order_by=media_files_table.c.weight),
+                                          'topics': relation(Topic, backref='songs', secondary=songs_topics_table)
+                                          })
     mapper(Topic, topics_table)
 
     metadata.create_all(checkfirst=True)

=== modified file 'openlp/plugins/songs/lib/dreambeamimport.py'
--- openlp/plugins/songs/lib/dreambeamimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/dreambeamimport.py	2014-03-02 09:40:29 +0000
@@ -40,6 +40,7 @@
 
 log = logging.getLogger(__name__)
 
+
 class DreamBeamImport(SongImport):
     """
     The :class:`DreamBeamImport` class provides the ability to import song files from
@@ -83,7 +84,7 @@
         * \*.xml
     """
 
-    def doImport(self):
+    def do_import(self):
         """
         Receive a single file or a list of files to import.
         """
@@ -103,8 +104,8 @@
                 xml = etree.tostring(parsed_file).decode()
                 song_xml = objectify.fromstring(xml)
                 if song_xml.tag != 'DreamSong':
-                    self.logError(file,
-                        translate('SongsPlugin.DreamBeamImport', 'Invalid DreamBeam song file. Missing DreamSong tag.'))
+                    self.logError(file, translate('SongsPlugin.DreamBeamImport',
+                                                  'Invalid DreamBeam song file. Missing DreamSong tag.'))
                     continue
                 if hasattr(song_xml, 'Version'):
                     self.version = float(song_xml.Version.text)
@@ -129,7 +130,7 @@
                     if hasattr(song_xml, 'Sequence'):
                         for LyricsSequenceItem in (song_xml.Sequence.iterchildren()):
                             self.verseOrderList.append("%s%s" % (LyricsSequenceItem.get('Type')[:1],
-                                LyricsSequenceItem.get('Number')))
+                                                       LyricsSequenceItem.get('Number')))
                     if hasattr(song_xml, 'Notes'):
                         self.comments = str(song_xml.Notes.text)
                 else:
@@ -143,9 +144,8 @@
                         author_copyright = song_xml.Text2.Text.text
                 if author_copyright:
                     author_copyright = str(author_copyright)
-                    if author_copyright.find(
-                        str(SongStrings.CopyrightSymbol)) >= 0:
-                        self.addCopyright(author_copyright)
+                    if author_copyright.find(str(SongStrings.CopyrightSymbol)) >= 0:
+                        self.add_copyright(author_copyright)
                     else:
                         self.parse_author(author_copyright)
                 if not self.finish():

=== modified file 'openlp/plugins/songs/lib/easyslidesimport.py'
--- openlp/plugins/songs/lib/easyslidesimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/easyslidesimport.py	2014-03-02 09:40:29 +0000
@@ -37,6 +37,7 @@
 
 log = logging.getLogger(__name__)
 
+
 class EasySlidesImport(SongImport):
     """
     Import songs exported from EasySlides
@@ -50,7 +51,7 @@
         """
         SongImport.__init__(self, manager, **kwargs)
 
-    def doImport(self):
+    def do_import(self):
         log.info('Importing EasySlides XML file %s', self.import_source)
         parser = etree.XMLParser(remove_blank_text=True)
         parsed_file = etree.parse(self.import_source, parser)
@@ -60,9 +61,9 @@
         for song in song_xml.Item:
             if self.stop_import_flag:
                 return
-            self._parseSong(song)
+            self._parse_song(song)
 
-    def _parseSong(self, song):
+    def _parse_song(self, song):
         self._success = True
         self._add_unicode_attribute('title', song.Title1, True)
         if hasattr(song, 'Title2'):
@@ -71,7 +72,7 @@
             self._add_unicode_attribute('songNumber', song.SongNumber)
         if self.songNumber == '0':
             self.songNumber = ''
-        self._addAuthors(song)
+        self._add_uthors(song)
         if hasattr(song, 'Copyright'):
             self._add_copyright(song.Copyright)
         if hasattr(song, 'LicenceAdmin1'):
@@ -80,7 +81,7 @@
             self._add_copyright(song.LicenceAdmin2)
         if hasattr(song, 'BookReference'):
             self._add_unicode_attribute('songBookName', song.BookReference)
-        self._parseAndAddLyrics(song)
+        self._parse_and_add_lyrics(song)
         if self._success:
             if not self.finish():
                 self.logError(song.Title1 if song.Title1 else '')
@@ -94,14 +95,9 @@
         present _success is set to False so the importer can react
         appropriately.
 
-        ``self_attribute``
-            The attribute in the song model to populate.
-
-        ``import_attribute``
-            The imported value to convert to unicode and save to the song.
-
-        ``mandatory``
-            Signals that this attribute must exist in a valid song.
+        :param self_attribute: The attribute in the song model to populate.
+        :param import_attribute: The imported value to convert to unicode and save to the song.
+        :param mandatory: Signals that this attribute must exist in a valid song.
         """
         try:
             setattr(self, self_attribute, str(import_attribute).strip())
@@ -113,7 +109,7 @@
             if mandatory:
                 self._success = False
 
-    def _addAuthors(self, song):
+    def _add_authors(self, song):
         try:
             authors = str(song.Writer).split(',')
             self.authors = [author.strip() for author in authors if author.strip()]
@@ -128,18 +124,22 @@
         Add a piece of copyright to the total copyright information for the
         song.
 
-        ``element``
-            The imported variable to get the data from.
+        :param element: The imported variable to get the data from.
         """
         try:
-            self.addCopyright(str(element).strip())
+            self.add_copyright(str(element).strip())
         except UnicodeDecodeError:
             log.exception('Unicode error on decoding copyright: %s' % element)
             self._success = False
         except AttributeError:
             pass
 
-    def _parseAndAddLyrics(self, song):
+    def _parse_and_add_lyrics(self, song):
+        """
+        Process Song and add Lyrics
+        
+        :param song: Song object
+        """
         try:
             lyrics = str(song.Contents).strip()
         except UnicodeDecodeError:
@@ -151,29 +151,29 @@
         lines = lyrics.split('\n')
         # we go over all lines first, to determine information,
         # which tells us how to parse verses later
-        regionlines = {}
-        separatorlines = 0
+        region_lines = {}
+        separator_lines = 0
         for line in lines:
             line = line.strip()
             if not line:
                 continue
             elif line[1:7] == 'region':
                 # this is region separator, probably [region 2]
-                region = self._extractRegion(line)
-                regionlines[region] = 1 + regionlines.get(region, 0)
+                region = self._extract_region(line)
+                region_lines[region] = 1 + region_lines.get(region, 0)
             elif line[0] == '[':
-                separatorlines += 1
+                separator_lines += 1
         # if the song has separators
-        separators = (separatorlines > 0)
+        separators = (separator_lines > 0)
         # the number of different regions in song - 1
-        if len(regionlines) > 1:
+        if len(region_lines) > 1:
             log.info('EasySlidesImport: the file contained a song named "%s"'
-                'with more than two regions, but only two regions are tested, encountered regions were: %s',
-                self.title, ','.join(list(regionlines.keys())))
+                     'with more than two regions, but only two regions are tested, encountered regions were: %s',
+                     self.title, ','.join(list(region_lines.keys())))
         # if the song has regions
-        regions = (len(regionlines) > 0)
+        regions = (len(region_lines) > 0)
         # if the regions are inside verses
-        regionsInVerses = (regions and regionlines[list(regionlines.keys())[0]] > 1)
+        regions_in_verses = (regions and region_lines[list(region_lines.keys())[0]] > 1)
         MarkTypes = {
             'CHORUS': VerseType.tags[VerseType.Chorus],
             'VERSE': VerseType.tags[VerseType.Verse],
@@ -185,21 +185,20 @@
         verses = {}
         # list as [region, versetype, versenum, instance]
         our_verse_order = []
-        defaultregion = '1'
-        reg = defaultregion
+        default_region = '1'
+        reg = default_region
         verses[reg] = {}
         # instance differentiates occurrences of same verse tag
         vt = 'V'
         vn = '1'
         inst = 1
-
         for line in lines:
             line = line.strip()
             if not line:
                 if separators:
                     # separators are used, so empty line means slide break
                     # inside verse
-                    if self._listHas(verses, [reg, vt, vn, inst]):
+                    if self._list_has(verses, [reg, vt, vn, inst]):
                         inst += 1
                 else:
                     # separators are not used, so empty line starts a new verse
@@ -207,9 +206,9 @@
                     vn = len(verses[reg].get(vt, {})) + 1
                     inst = 1
             elif line[0:7] == '[region':
-                reg = self._extractRegion(line)
+                reg = self._extract_region(line)
                 verses.setdefault(reg, {})
-                if not regionsInVerses:
+                if not regions_in_verses:
                     vt = 'V'
                     vn = '1'
                     inst = 1
@@ -224,10 +223,10 @@
                     marker = match.group(1).strip()
                     vn = match.group(2)
                 vt = MarkTypes.get(marker, 'O') if marker else 'V'
-                if regionsInVerses:
-                    region = defaultregion
+                if regions_in_verses:
+                    region = default_region
                 inst = 1
-                if self._listHas(verses, [reg, vt, vn, inst]):
+                if self._list_has(verses, [reg, vt, vn, inst]):
                     inst = len(verses[reg][vt][vn]) + 1
             else:
                 if not [reg, vt, vn, inst] in our_verse_order:
@@ -237,19 +236,17 @@
                 verses[reg][vt][vn].setdefault(inst, [])
                 verses[reg][vt][vn][inst].append(self.tidyText(line))
         # done parsing
-
-        versetags = []
+        verse_tags = []
         # we use our_verse_order to ensure, we insert lyrics in the same order
         # as these appeared originally in the file
         for [reg, vt, vn, inst] in our_verse_order:
-            if self._listHas(verses, [reg, vt, vn, inst]):
+            if self._list_has(verses, [reg, vt, vn, inst]):
                 # this is false, but needs user input
                 lang = None
                 versetag = '%s%s' % (vt, vn)
-                versetags.append(versetag)
+                verse_tags.append(versetag)
                 lines = '\n'.join(verses[reg][vt][vn][inst])
                 self.verses.append([versetag, lines, lang])
-
         SeqTypes = {
             'p': 'P1',
             'q': 'P2',
@@ -270,18 +267,24 @@
                     tag = SeqTypes[tag.lower()]
                 else:
                     continue
-                if tag in versetags:
+                if tag in verse_tags:
                     self.verseOrderList.append(tag)
                 else:
-                    log.info('Got order item %s, which is not in versetags, dropping item from presentation order',
-                        tag)
+                    log.info('Got order item %s, which is not in verse_tags, dropping item from presentation order',
+                             tag)
         except UnicodeDecodeError:
             log.exception('Unicode decode error while decoding Sequence')
             self._success = False
         except AttributeError:
             pass
 
-    def _listHas(self, lst, subitems):
+    def _list_has(self, lst, subitems):
+        """
+        Does the list has sub items?
+        :param lst: List to be checked
+        :param subitems: Sun items to be tested
+        :return: True / False
+        """
         for subitem in subitems:
             if subitem in lst:
                 lst = lst[subitem]
@@ -289,7 +292,12 @@
                 return False
         return True
 
-    def _extractRegion(self, line):
+    def _extract_region(self, line):
         # this was true already: line[0:7] == u'[region':
+        """
+        Find the Region tag
+        :param line: Line to be tested
+        :return: resulting string.
+        """
         right_bracket = line.find(']')
         return line[7:right_bracket].strip()

=== modified file 'openlp/plugins/songs/lib/ewimport.py'
--- openlp/plugins/songs/lib/ewimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/ewimport.py	2014-03-02 09:40:29 +0000
@@ -75,7 +75,11 @@
     def __init__(self, manager, **kwargs):
         SongImport.__init__(self, manager, **kwargs)
 
-    def doImport(self):
+    def do_import(self):
+        """
+        Process the Easy Worship Song Importer
+        :return:
+        """
         # Open the DB and MB files if they exist
         import_source_mb = self.import_source.replace('.DB', '.MB')
         if not os.path.isfile(self.import_source) or not os.path.isfile(import_source_mb):
@@ -84,12 +88,12 @@
         if db_size < 0x800:
             return
         db_file = open(self.import_source, 'rb')
-        self.memoFile = open(import_source_mb, 'rb')
+        self.memo_file = open(import_source_mb, 'rb')
         # Don't accept files that are clearly not paradox files
         record_size, header_size, block_size, first_block, num_fields = struct.unpack('<hhxb8xh17xh', db_file.read(35))
         if header_size != 0x800 or block_size < 1 or block_size > 4:
             db_file.close()
-            self.memoFile.close()
+            self.memo_file.close()
             return
         # Take a stab at how text is encoded
         self.encoding = 'cp1252'
@@ -128,16 +132,16 @@
         for i, field_name in enumerate(field_names):
             field_type, field_size = struct.unpack_from('BB', field_info, i * 2)
             field_descs.append(FieldDescEntry(field_name, field_type, field_size))
-        self.setRecordStruct(field_descs)
+        self.set_record_structure(field_descs)
         # Pick out the field description indexes we will need
         try:
             success = True
-            fi_title = self.findField(b'Title')
-            fi_author = self.findField(b'Author')
-            fi_copy = self.findField(b'Copyright')
-            fi_admin = self.findField(b'Administrator')
-            fi_words = self.findField(b'Words')
-            fi_ccli = self.findField(b'Song Number')
+            fi_title = self.find_field(b'Title')
+            fi_author = self.find_field(b'Author')
+            fi_copy = self.find_field(b'Copyright')
+            fi_admin = self.find_field(b'Administrator')
+            fi_words = self.find_field(b'Words')
+            fi_ccli = self.find_field(b'Song Number')
         except IndexError:
             # This is the wrong table
             success = False
@@ -162,15 +166,15 @@
                 if self.stop_import_flag:
                     break
                 raw_record = db_file.read(record_size)
-                self.fields = self.recordStruct.unpack(raw_record)
+                self.fields = self.record_structure.unpack(raw_record)
                 self.setDefaults()
-                self.title = self.getField(fi_title).decode()
+                self.title = self.get_field(fi_title).decode()
                 # Get remaining fields.
-                copy = self.getField(fi_copy)
-                admin = self.getField(fi_admin)
-                ccli = self.getField(fi_ccli)
-                authors = self.getField(fi_author)
-                words = self.getField(fi_words)
+                copy = self.get_field(fi_copy)
+                admin = self.get_field(fi_admin)
+                ccli = self.get_field(fi_ccli)
+                authors = self.get_field(fi_author)
+                words = self.get_field(fi_words)
                 # Set the SongImport object members.
                 if copy:
                     self.copyright = copy.decode()
@@ -230,43 +234,57 @@
                         self.addVerse(verse_split[-1].strip() if first_line_is_tag else verse, verse_type)
                 if len(self.comments) > 5:
                     self.comments += str(translate('SongsPlugin.EasyWorshipSongImport',
-                        '\n[above are Song Tags with notes imported from EasyWorship]'))
+                                         '\n[above are Song Tags with notes imported from EasyWorship]'))
                 if self.stop_import_flag:
                     break
                 if not self.finish():
                     self.logError(self.import_source)
         db_file.close()
-        self.memoFile.close()
-
-    def findField(self, field_name):
-        return [i for i, x in enumerate(self.fieldDescs) if x.name == field_name][0]
-
-    def setRecordStruct(self, field_descs):
+        self.memo_file.close()
+
+    def find_field(self, field_name):
+        """
+        Find the field in the descriptions
+        :param field_name: The field name to find
+        :return:
+        """
+        return [i for i, x in enumerate(self.field_description) if x.name == field_name][0]
+
+    def set_record_structure(self, field_descriptions):
+        """
+        Set the Record structure
+        :param field_descriptions: An array of fields
+        """
         # Begin with empty field struct list
         fsl = ['>']
-        for field_desc in field_descs:
-            if field_desc.field_type == FieldType.String:
-                fsl.append('%ds' % field_desc.size)
-            elif field_desc.field_type == FieldType.Int16:
+        for field_description in field_descriptions:
+            if field_description.field_type == FieldType.String:
+                fsl.append('%ds' % field_description.size)
+            elif field_description.field_type == FieldType.Int16:
                 fsl.append('H')
-            elif field_desc.field_type == FieldType.Int32:
+            elif field_description.field_type == FieldType.Int32:
                 fsl.append('I')
-            elif field_desc.field_type == FieldType.Logical:
+            elif field_description.field_type == FieldType.Logical:
                 fsl.append('B')
-            elif field_desc.field_type == FieldType.Memo:
-                fsl.append('%ds' % field_desc.size)
-            elif field_desc.field_type == FieldType.Blob:
-                fsl.append('%ds' % field_desc.size)
-            elif field_desc.field_type == FieldType.Timestamp:
+            elif field_description.field_type == FieldType.Memo:
+                fsl.append('%ds' % field_description.size)
+            elif field_description.field_type == FieldType.Blob:
+                fsl.append('%ds' % field_description.size)
+            elif field_description.field_type == FieldType.Timestamp:
                 fsl.append('Q')
             else:
-                fsl.append('%ds' % field_desc.size)
-        self.recordStruct = struct.Struct(''.join(fsl))
-        self.fieldDescs = field_descs
+                fsl.append('%ds' % field_description.size)
+        self.record_structure = struct.Struct(''.join(fsl))
+        self.field_description = field_description
 
-    def getField(self, field_desc_index):
+    def get_field(self, field_desc_index):
+        """
+        Extract a field
+        :param field_desc_index: Index number of the field
+        :return:
+        """
         field = self.fields[field_desc_index]
-        field_desc = self.fieldDescs[field_desc_index]
+        field_desc = self.field_description[field_desc_index]
         # Return None in case of 'blank' entries
         if isinstance(field, bytes):
             if not field.rstrip(b'\0'):
@@ -281,23 +299,23 @@
         elif field_desc.field_type == FieldType.Int32:
             return field ^ 0x80000000
         elif field_desc.field_type == FieldType.Logical:
-            return (field ^ 0x80 == 1)
+            return field ^ 0x80 == 1
         elif field_desc.field_type == FieldType.Memo or field_desc.field_type == FieldType.Blob:
             block_start, blob_size = struct.unpack_from('<II', field, len(field)-10)
             sub_block = block_start & 0xff
             block_start &= ~0xff
-            self.memoFile.seek(block_start)
-            memo_block_type, = struct.unpack('b', self.memoFile.read(1))
+            self.memo_file.seek(block_start)
+            memo_block_type, = struct.unpack('b', self.memo_file.read(1))
             if memo_block_type == 2:
-                self.memoFile.seek(8, os.SEEK_CUR)
+                self.memo_file.seek(8, os.SEEK_CUR)
             elif memo_block_type == 3:
                 if sub_block > 63:
                     return b''
-                self.memoFile.seek(11 + (5 * sub_block), os.SEEK_CUR)
-                sub_block_start, = struct.unpack('B', self.memoFile.read(1))
-                self.memoFile.seek(block_start + (sub_block_start * 16))
+                self.memo_file.seek(11 + (5 * sub_block), os.SEEK_CUR)
+                sub_block_start, = struct.unpack('B', self.memo_file.read(1))
+                self.memo_file.seek(block_start + (sub_block_start * 16))
             else:
                 return b''
-            return self.memoFile.read(blob_size)
+            return self.memo_file.read(blob_size)
         else:
             return 0

=== modified file 'openlp/plugins/songs/lib/foilpresenterimport.py'
--- openlp/plugins/songs/lib/foilpresenterimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/foilpresenterimport.py	2014-03-02 09:40:29 +0000
@@ -106,6 +106,7 @@
 
 log = logging.getLogger(__name__)
 
+
 class FoilPresenterImport(SongImport):
     """
     This provides the Foilpresenter import.
@@ -116,9 +117,9 @@
         """
         log.debug('initialise FoilPresenterImport')
         SongImport.__init__(self, manager, **kwargs)
-        self.FoilPresenter = FoilPresenter(self.manager, self)
+        self.foil_presenter = FoilPresenter(self.manager, self)
 
-    def doImport(self):
+    def do_import(self):
         """
         Imports the songs.
         """
@@ -131,7 +132,7 @@
             try:
                 parsed_file = etree.parse(file_path, parser)
                 xml = etree.tostring(parsed_file).decode()
-                self.FoilPresenter.xml_to_song(xml)
+                self.foil_presenter.xml_to_song(xml)
             except etree.XMLSyntaxError:
                 self.logError(file_path, SongStrings.XMLSyntaxError)
                 log.exception('XML syntax error in file %s' % file_path)
@@ -210,8 +211,7 @@
         """
         Create and save a song from Foilpresenter format xml to the database.
 
-        ``xml``
-            The XML to parse (unicode).
+        :param xml: The XML to parse (unicode).
         """
         # No xml get out of here.
         if not xml:
@@ -245,8 +245,7 @@
         """
         This returns the text of an element as unicode string.
 
-        ``element``
-            The element.
+        :param element: The element.
         """
         if element is not None:
             return str(element)
@@ -256,11 +255,8 @@
         """
         Adds the authors specified in the XML to the song.
 
-        ``foilpresenterfolie``
-            The property object (lxml.objectify.ObjectifiedElement).
-
-        ``song``
-            The song object.
+        :param foilpresenterfolie: The property object (lxml.objectify.ObjectifiedElement).
+        :param song: The song object.
         """
         authors = []
         try:
@@ -302,10 +298,10 @@
                 temp = copyright.partition('Rechte')
                 copyright = temp[0]
             markers = ['Text +u\.?n?d? +Melodie[\w\,\. ]*:',
-                'Text +u\.?n?d? +Musik', 'T & M', 'Melodie und Satz',
-                'Text[\w\,\. ]*:', 'Melodie', 'Musik', 'Satz',
-                'Weise', '[dD]eutsch', '[dD]t[\.\:]', 'Englisch',
-                '[oO]riginal', 'Bearbeitung', '[R|r]efrain']
+                       'Text +u\.?n?d? +Musik', 'T & M', 'Melodie und Satz',
+                       'Text[\w\,\. ]*:', 'Melodie', 'Musik', 'Satz',
+                       'Weise', '[dD]eutsch', '[dD]t[\.\:]', 'Englisch',
+                       '[oO]riginal', 'Bearbeitung', '[R|r]efrain']
             for marker in markers:
                 copyright = re.compile(marker).sub('<marker>', copyright, re.U)
             copyright = re.compile('(?<=<marker>) *:').sub('', copyright)
@@ -349,7 +345,7 @@
             if author is None:
                 # We need to create a new author, as the author does not exist.
                 author = Author.populate(display_name=display_name, last_name=display_name.split(' ')[-1],
-                    first_name=' '.join(display_name.split(' ')[:-1]))
+                                         first_name=' '.join(display_name.split(' ')[:-1]))
                 self.manager.save_object(author)
             song.authors.append(author)
 
@@ -357,11 +353,8 @@
         """
         Adds the CCLI number to the song.
 
-        ``foilpresenterfolie``
-            The property object (lxml.objectify.ObjectifiedElement).
-
-        ``song``
-            The song object.
+        :param foilpresenterfolie: The property object (lxml.objectify.ObjectifiedElement).
+        :param song: The song object.
         """
         try:
             song.ccli_number = self._child(foilpresenterfolie.ccliid)
@@ -372,11 +365,8 @@
         """
         Joins the comments specified in the XML and add it to the song.
 
-        ``foilpresenterfolie``
-            The property object (lxml.objectify.ObjectifiedElement).
-
-        ``song``
-            The song object.
+        :param foilpresenterfolie: The property object (lxml.objectify.ObjectifiedElement).
+        :param song:  The song object.
         """
         try:
             song.comments = self._child(foilpresenterfolie.notiz)
@@ -387,11 +377,8 @@
         """
         Adds the copyright to the song.
 
-        ``foilpresenterfolie``
-            The property object (lxml.objectify.ObjectifiedElement).
-
-        ``song``
-            The song object.
+        :param foilpresenterfolie:  The property object (lxml.objectify.ObjectifiedElement).
+        :param song: The song object.
         """
         try:
             song.copyright = self._child(foilpresenterfolie.copyright.text_)
@@ -402,11 +389,8 @@
         """
         Processes the verses and search_lyrics for the song.
 
-        ``foilpresenterfolie``
-            The foilpresenterfolie object (lxml.objectify.ObjectifiedElement).
-
-        ``song``
-            The song object.
+        :param foilpresenterfolie:  The foilpresenterfolie object (lxml.objectify.ObjectifiedElement).
+        :param song: The song object.
         """
         sxml = SongXML()
         temp_verse_order = {}
@@ -425,7 +409,7 @@
         if not hasattr(foilpresenterfolie.strophen, 'strophe'):
             self.importer.logError(self._child(foilpresenterfolie.titel),
                 str(translate('SongsPlugin.FoilPresenterSongImport',
-                'Invalid Foilpresenter song file. No verses found.')))
+                              'Invalid Foilpresenter song file. No verses found.')))
             self.save_song = False
             return
         for strophe in foilpresenterfolie.strophen.strophe:
@@ -506,11 +490,8 @@
         """
         Adds the song book and song number specified in the XML to the song.
 
-        ``foilpresenterfolie``
-            The property object (lxml.objectify.ObjectifiedElement).
-
-        ``song``
-            The song object.
+        :param foilpresenterfolie: The property object (lxml.objectify.ObjectifiedElement).
+        :param song: The song object.
         """
         song.song_book_id = 0
         song.song_number = ''
@@ -539,11 +520,8 @@
         """
         Processes the titles specified in the song's XML.
 
-        ``foilpresenterfolie``
-            The property object (lxml.objectify.ObjectifiedElement).
-
-        ``song``
-            The song object.
+        :param foilpresenterfolie: The property object (lxml.objectify.ObjectifiedElement).
+        :param song: The song object.
         """
         try:
             for title_string in foilpresenterfolie.titel.titelstring:
@@ -561,11 +539,8 @@
         """
         Adds the topics to the song.
 
-        ``foilpresenterfolie``
-            The property object (lxml.objectify.ObjectifiedElement).
-
-        ``song``
-            The song object.
+        :param foilpresenterfolie: The property object (lxml.objectify.ObjectifiedElement).
+        :param song: The song object.
         """
         try:
             for name in foilpresenterfolie.kategorien.name:

=== modified file 'openlp/plugins/songs/lib/importer.py'
--- openlp/plugins/songs/lib/importer.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/importer.py	2014-03-02 09:40:29 +0000
@@ -82,6 +82,7 @@
     except ImportError:
         log.exception('Error importing %s', 'WorshipCenterProImport')
 
+
 class SongFormatSelect(object):
     """
     This is a special enumeration class listing available file selection modes.
@@ -137,7 +138,7 @@
         Title for ``QFileDialog`` (default includes the format's ``u'name'``).
 
     ``u'invalidSourceMsg'``
-        Message displayed if ``isValidSource()`` returns ``False``.
+        Message displayed if ``is_valid_source()`` returns ``False``.
 
     ``u'descriptionText'``
         Short description (1-2 lines) about the song format.
@@ -200,8 +201,8 @@
             'prefix': 'generic',
             'canDisable': True,
             'disabledLabelText': translate('SongsPlugin.ImportWizardForm',
-                'The generic document/presentation importer has been disabled '
-                'because OpenLP cannot access OpenOffice or LibreOffice.'),
+                                           'The generic document/presentation importer has been disabled '
+                                           'because OpenLP cannot access OpenOffice or LibreOffice.'),
             'getFilesTitle': translate('SongsPlugin.ImportWizardForm', 'Select Document/Presentation Files')
         },
         CCLI: {
@@ -241,13 +242,12 @@
             'prefix': 'mediaShout',
             'canDisable': True,
             'selectMode': SongFormatSelect.SingleFile,
-            'filter': '%s (*.mdb)' % translate('SongsPlugin.ImportWizardForm',
-                'MediaShout Database'),
+            'filter': '%s (*.mdb)' % translate('SongsPlugin.ImportWizardForm', 'MediaShout Database'),
             'disabledLabelText': translate('SongsPlugin.ImportWizardForm',
-                'The MediaShout importer is only supported on Windows. It has '
-                'been disabled due to a missing Python module. If you want to '
-                'use this importer, you will need to install the "pyodbc" '
-                'module.')
+                                           'The MediaShout importer is only supported on Windows. It has '
+                                           'been disabled due to a missing Python module. If you want to '
+                                           'use this importer, you will need to install the "pyodbc" '
+                                           'module.')
         },
         OpenSong: {
             'class': OpenSongImport,
@@ -260,14 +260,13 @@
             'prefix': 'powerSong',
             'selectMode': SongFormatSelect.SingleFolder,
             'invalidSourceMsg': translate('SongsPlugin.ImportWizardForm',
-                'You need to specify a valid PowerSong 1.0 database folder.')
+                                          'You need to specify a valid PowerSong 1.0 database folder.')
         },
         SongBeamer: {
             'class': SongBeamerImport,
             'name': 'SongBeamer',
             'prefix': 'songBeamer',
-            'filter': '%s (*.sng)' % translate('SongsPlugin.ImportWizardForm',
-                'SongBeamer Files')
+            'filter': '%s (*.sng)' % translate('SongsPlugin.ImportWizardForm', 'SongBeamer Files')
         },
         SongPro: {
             'class': SongProImport,
@@ -277,7 +276,7 @@
             'filter': '%s (*.txt)' % translate('SongsPlugin.ImportWizardForm', 'SongPro Text Files'),
             'comboBoxText': translate('SongsPlugin.ImportWizardForm', 'SongPro (Export File)'),
             'descriptionText': translate('SongsPlugin.ImportWizardForm',
-                'In SongPro, export your songs using the File -> Export menu')
+                                         'In SongPro, export your songs using the File -> Export menu')
         },
         SongShowPlus: {
             'class': SongShowPlusImport,
@@ -291,8 +290,8 @@
             'canDisable': True,
             'filter': '%s (*.rtf)' % translate('SongsPlugin.ImportWizardForm', 'Songs Of Fellowship Song Files'),
             'disabledLabelText': translate('SongsPlugin.ImportWizardForm',
-                'The Songs of Fellowship importer has been disabled because '
-                'OpenLP cannot access OpenOffice or LibreOffice.')
+                                           'The Songs of Fellowship importer has been disabled because '
+                                           'OpenLP cannot access OpenOffice or LibreOffice.')
         },
         SundayPlus: {
             'class': SundayPlusImport,
@@ -304,8 +303,7 @@
             'class': WowImport,
             'name': 'Words of Worship',
             'prefix': 'wordsOfWorship',
-            'filter': '%s (*.wsg *.wow-song)' %
-                translate('SongsPlugin.ImportWizardForm', 'Words Of Worship Song Files')
+            'filter': '%s (*.wsg *.wow-song)' % translate('SongsPlugin.ImportWizardForm', 'Words Of Worship Song Files')
         },
         WorshipCenterPro: {
             'name': 'WorshipCenter Pro',
@@ -314,8 +312,9 @@
             'selectMode': SongFormatSelect.SingleFile,
             'filter': '%s (*.mdb)' % translate('SongsPlugin.ImportWizardForm', 'WorshipCenter Pro Song Files'),
             'disabledLabelText': translate('SongsPlugin.ImportWizardForm',
-                'The WorshipCenter Pro importer is only supported on Windows. It has been disabled due to a missing '
-                'Python module. If you want to use this importer, you will need to install the "pyodbc" module.')
+                                           'The WorshipCenter Pro importer is only supported on Windows. '
+                                           'It has been disabled due to a missing Python module. If you want to use '
+                                           'this importer, you will need to install the "pyodbc" module.')
         },
         ZionWorx: {
             'class': ZionWorxImport,
@@ -324,9 +323,9 @@
             'selectMode': SongFormatSelect.SingleFile,
             'comboBoxText': translate('SongsPlugin.ImportWizardForm', 'ZionWorx (CSV)'),
             'descriptionText': translate('SongsPlugin.ImportWizardForm',
-                'First convert your ZionWorx database to a CSV text file, as '
-                'explained in the <a href="http://manual.openlp.org/songs.html'
-                '#importing-from-zionworx">User Manual</a>.')
+                                         'First convert your ZionWorx database to a CSV text file, as '
+                                         'explained in the <a href="http://manual.openlp.org/songs.html'
+                                         '#importing-from-zionworx">User Manual</a>.')
         }
     }
 

=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/lib/mediaitem.py	2014-03-02 09:40:29 +0000
@@ -37,7 +37,7 @@
 
 from openlp.core.common import Registry, AppLocation, Settings, check_directory_exists, UiStrings, translate
 from openlp.core.lib import MediaManagerItem, ItemCapabilities, PluginStatus, ServiceItemContext, \
-     check_item_selected, create_separated_list
+    check_item_selected, create_separated_list
 from openlp.core.lib.ui import create_widget_action
 from openlp.plugins.songs.forms.editsongform import EditSongForm
 from openlp.plugins.songs.forms.songmaintenanceform import SongMaintenanceForm
@@ -97,22 +97,21 @@
     def add_end_header_bar(self):
         self.toolbar.addSeparator()
         ## Song Maintenance Button ##
-        self.maintenanceAction = self.toolbar.add_toolbar_action('maintenanceAction',
-            icon=':/songs/song_maintenance.png',
-            triggers=self.on_song_maintenance_click)
+        self.maintenance_action = self.toolbar.add_toolbar_action('maintenance_action',
+                                                                  icon=':/songs/song_maintenance.png',
+                                                                  triggers=self.on_song_maintenance_click)
         self.add_search_to_toolbar()
         # Signals and slots
         Registry().register_function('songs_load_list', self.on_song_list_load)
         Registry().register_function('songs_preview', self.on_preview_click)
         QtCore.QObject.connect(self.search_text_edit, QtCore.SIGNAL('cleared()'), self.on_clear_text_button_click)
         QtCore.QObject.connect(self.search_text_edit, QtCore.SIGNAL('searchTypeChanged(int)'),
-            self.on_search_text_button_clicked)
+                               self.on_search_text_button_clicked)
 
     def add_custom_context_actions(self):
         create_widget_action(self.list_view, separator=True)
-        create_widget_action(self.list_view,
-            text=translate('OpenLP.MediaManagerItem', '&Clone'), icon=':/general/general_clone.png',
-            triggers=self.on_clone_click)
+        create_widget_action(self.list_view, text=translate('OpenLP.MediaManagerItem', '&Clone'), 
+                             icon=':/general/general_clone.png', triggers=self.on_clone_click)
 
     def on_focus(self):
         self.search_text_edit.setFocus()
@@ -123,15 +122,15 @@
         """
         log.debug('config_updated')
         self.search_as_you_type = Settings().value(self.settings_section + '/search as type')
-        self.updateServiceOnEdit = Settings().value(self.settings_section + '/update service on edit')
-        self.addSongFromService = Settings().value(self.settings_section + '/add song from service',)
+        self.update_service_on_edit = Settings().value(self.settings_section + '/update service on edit')
+        self.add_song_from_service = Settings().value(self.settings_section + '/add song from service',)
 
     def retranslateUi(self):
         self.search_text_label.setText('%s:' % UiStrings().Search)
         self.search_text_button.setText(UiStrings().Search)
-        self.maintenanceAction.setText(SongStrings.SongMaintenance)
-        self.maintenanceAction.setToolTip(translate('SongsPlugin.MediaItem',
-            'Maintain the lists of authors, topics and books.'))
+        self.maintenance_action.setText(SongStrings.SongMaintenance)
+        self.maintenance_action.setToolTip(translate('SongsPlugin.MediaItem',
+                                                     'Maintain the lists of authors, topics and books.'))
 
     def initialise(self):
         """
@@ -139,7 +138,7 @@
         """
         self.song_maintenance_form = SongMaintenanceForm(self.plugin.manager, self)
         self.edit_song_form = EditSongForm(self, self.main_window, self.plugin.manager)
-        self.openLyrics = OpenLyrics(self.plugin.manager)
+        self.open_lyrics = OpenLyrics(self.plugin.manager)
         self.search_text_edit.set_search_types([
             (SongSearch.Entire, ':/songs/song_search_all.png',
                 translate('SongsPlugin.MediaItem', 'Entire Song'),
@@ -154,8 +153,7 @@
                 translate('SongsPlugin.MediaItem', 'Search Authors...')),
             (SongSearch.Books, ':/songs/song_book_edit.png', SongStrings.SongBooks,
                 translate('SongsPlugin.MediaItem', 'Search Song Books...')),
-            (SongSearch.Themes, ':/slides/slide_theme.png',
-            UiStrings().Themes, UiStrings().SearchThemes)
+            (SongSearch.Themes, ':/slides/slide_theme.png', UiStrings().Themes, UiStrings().SearchThemes)
         ])
         self.search_text_edit.set_current_search_type(Settings().value('%s/last search type' % self.settings_section))
         self.config_update()
@@ -173,41 +171,48 @@
         elif search_type == SongSearch.Titles:
             log.debug('Titles Search')
             search_results = self.plugin.manager.get_all_objects(Song,
-                Song.search_title.like('%' + clean_string(search_keywords) + '%'))
+                                                                 Song.search_title.like('%' +
+                                                                                        clean_string(search_keywords) +
+                                                                                        '%'))
             self.display_results_song(search_results)
         elif search_type == SongSearch.Lyrics:
             log.debug('Lyrics Search')
             search_results = self.plugin.manager.get_all_objects(Song,
-                Song.search_lyrics.like('%' + clean_string(search_keywords) + '%'))
+                                                                 Song.search_lyrics.like('%' +
+                                                                                         clean_string(search_keywords) +
+                                                                                         '%'))
             self.display_results_song(search_results)
         elif search_type == SongSearch.Authors:
             log.debug('Authors Search')
             search_results = self.plugin.manager.get_all_objects(Author,
-                Author.display_name.like('%' + search_keywords + '%'), Author.display_name.asc())
+                                                                 Author.display_name.like('%' + search_keywords + '%'),
+                                                                 Author.display_name.asc())
             self.display_results_author(search_results)
         elif search_type == SongSearch.Books:
             log.debug('Books Search')
-            search_results = self.plugin.manager.get_all_objects(Book,
-                Book.name.like('%' + search_keywords + '%'), Book.name.asc())
+            search_results = self.plugin.manager.get_all_objects(Book, Book.name.like('%' + search_keywords + '%'),
+                                                                 Book.name.asc())
             song_number = False
             if not search_results:
                 search_keywords = search_keywords.rpartition(' ')
                 search_results = self.plugin.manager.get_all_objects(Book,
-                    Book.name.like('%' + search_keywords[0] + '%'), Book.name.asc())
+                                                                     Book.name.like('%' + search_keywords[0] + '%'),
+                                                                     Book.name.asc())
                 song_number = re.sub(r'[^0-9]', '', search_keywords[2])
             self.display_results_book(search_results, song_number)
         elif search_type == SongSearch.Themes:
             log.debug('Theme Search')
             search_results = self.plugin.manager.get_all_objects(Song,
-                Song.theme_name.like('%' + search_keywords + '%'))
+                                                                 Song.theme_name.like('%' + search_keywords + '%'))
             self.display_results_song(search_results)
         self.check_search_result()
 
     def search_entire(self, search_keywords):
         return self.plugin.manager.get_all_objects(Song,
-            or_(Song.search_title.like('%' + clean_string(search_keywords) + '%'),
-                Song.search_lyrics.like('%' + clean_string(search_keywords) + '%'),
-                Song.comments.like('%' + search_keywords.lower() + '%')))
+                                                   or_(Song.search_title.like('%' +
+                                                                              clean_string(search_keywords) + '%'),
+                                                   Song.search_lyrics.like('%' + clean_string(search_keywords) + '%'),
+                                                   Song.comments.like('%' + search_keywords.lower() + '%')))
 
     def on_song_list_load(self):
         """
@@ -218,18 +223,23 @@
         # Called to redisplay the song list screen edit from a search or from the exit of the Song edit dialog. If
         # remote editing is active Trigger it and clean up so it will not update again. Push edits to the service
         # manager to update items
-        if self.edit_item and self.updateServiceOnEdit and not self.remote_triggered:
+        if self.edit_item and self.update_service_on_edit and not self.remote_triggered:
             item = self.build_service_item(self.edit_item)
             self.service_manager.replace_service_item(item)
         self.on_search_text_button_clicked()
         log.debug('on_song_list_load - finished')
 
-    def display_results_song(self, searchresults):
+    def display_results_song(self, search_results):
+        """
+        Format for display the results of the Song search
+
+        :param search_results: Results of the search
+        """
         log.debug('display results Song')
         self.save_auto_select_id()
         self.list_view.clear()
-        searchresults.sort(key=lambda song: song.sort_key)
-        for song in searchresults:
+        search_results.sort(key=lambda song: song.sort_key)
+        for song in search_results:
             # Do not display temporary songs
             if song.temporary:
                 continue
@@ -244,10 +254,15 @@
                 self.list_view.setCurrentItem(song_name)
         self.auto_select_id = -1
 
-    def display_results_author(self, searchresults):
+    def display_results_author(self, search_results):
+        """
+        Format for display the results of the Author search
+
+        :param search_results: Results of the search
+        """
         log.debug('display results Author')
         self.list_view.clear()
-        for author in searchresults:
+        for author in search_results:
             for song in author.songs:
                 # Do not display temporary songs
                 if song.temporary:
@@ -257,12 +272,16 @@
                 song_name.setData(QtCore.Qt.UserRole, song.id)
                 self.list_view.addItem(song_name)
 
-    def display_results_book(self, searchresults, song_number=False):
+    def display_results_book(self, search_results, song_number=False):
+        """
+        Format for display the results of the Book search
+
+        :param search_results: Results of the search
+        """
         log.debug('display results Book')
         self.list_view.clear()
-        for book in searchresults:
-            songs = sorted(book.songs, key=lambda song:
-                int(re.match(r'[0-9]+', '0' + song.song_number).group()))
+        for book in search_results:
+            songs = sorted(book.songs, key=lambda song: int(re.match(r'[0-9]+', '0' + song.song_number).group()))
             for song in songs:
                 # Do not display temporary songs
                 if song.temporary:
@@ -298,6 +317,9 @@
                 self.on_clear_text_button_click()
 
     def on_import_click(self):
+        """
+        Import button pressed.
+        """
         if not hasattr(self, 'import_wizard'):
             self.import_wizard = SongImportForm(self, self.plugin)
         self.import_wizard.exec_()
@@ -305,11 +327,17 @@
         Registry().execute('songs_load_list')
 
     def on_export_click(self):
+        """
+        Export button pressed.
+        """
         if not hasattr(self, 'exportWizard'):
-            self.exportWizard = SongExportForm(self, self.plugin)
-        self.exportWizard.exec_()
+            self.export_wizard = SongExportForm(self, self.plugin)
+        self.export_wizard.exec_()
 
     def on_new_click(self):
+        """
+        New button pressed.
+        """
         log.debug('on_new_click')
         self.edit_song_form.new_song()
         self.edit_song_form.exec_()
@@ -318,6 +346,9 @@
         self.auto_select_id = -1
 
     def on_song_maintenance_click(self):
+        """
+        Song Maintenance pressed.
+        """
         self.song_maintenance_form.exec_()
 
     def on_remote_edit(self, song_id, preview=False):
@@ -363,11 +394,13 @@
         if check_item_selected(self.list_view, UiStrings().SelectDelete):
             items = self.list_view.selectedIndexes()
             if QtGui.QMessageBox.question(self,
-                    UiStrings().ConfirmDelete,
-                    translate('SongsPlugin.MediaItem', 'Are you sure you want to delete the %n selected song(s)?', '',
-                    QtCore.QCoreApplication.CodecForTr, len(items)),
-                    QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes | QtGui.QMessageBox.No),
-                    QtGui.QMessageBox.Yes) == QtGui.QMessageBox.No:
+                                          UiStrings().ConfirmDelete,
+                                          translate('SongsPlugin.MediaItem',
+                                                    'Are you sure you want to delete the %n selected song(s)?', '',
+                                          QtCore.QCoreApplication.CodecForTr, len(items)),
+                                          QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes |
+                                                                            QtGui.QMessageBox.No),
+                                          QtGui.QMessageBox.Yes) == QtGui.QMessageBox.No:
                 return
             self.application.set_busy_cursor()
             self.main_window.display_progress_bar(len(items))
@@ -388,15 +421,15 @@
             self.edit_item = self.list_view.currentItem()
             item_id = self.edit_item.data(QtCore.Qt.UserRole)
             old_song = self.plugin.manager.get_object(Song, item_id)
-            song_xml = self.openLyrics.song_to_xml(old_song)
-            new_song = self.openLyrics.xml_to_song(song_xml)
+            song_xml = self.open_lyrics.song_to_xml(old_song)
+            new_song = self.open_lyrics.xml_to_song(song_xml)
             new_song.title = '%s <%s>' % (new_song.title,
-                translate('SongsPlugin.MediaItem', 'copy', 'For song cloning'))
+                                          translate('SongsPlugin.MediaItem', 'copy', 'For song cloning'))
             self.plugin.manager.save_object(new_song)
         self.on_song_list_load()
 
     def generate_slide_data(self, service_item, item=None, xmlVersion=False,
-                remote=False, context=ServiceItemContext.Service):
+                            remote=False, context=ServiceItemContext.Service):
         """
         Generate the slide data. Needs to be implemented by the plugin.
         """
@@ -438,8 +471,8 @@
                     if not order:
                         break
                     for verse in verse_list:
-                        if verse[0]['type'][0].lower() == order[0] and (verse[0]['label'].lower() == order[1:] or \
-                                not order[1:]):
+                        if verse[0]['type'][0].lower() == order[0] and \
+                                (verse[0]['label'].lower() == order[1:] or not order[1:]):
                             if verse_tags_translated:
                                 verse_index = VerseType.from_translated_tag(verse[0]['type'])
                             else:
@@ -454,7 +487,7 @@
         service_item.title = song.title
         author_list = self.generate_footer(service_item, song)
         service_item.data_string = {'title': song.search_title, 'authors': ', '.join(author_list)}
-        service_item.xml_version = self.openLyrics.song_to_xml(song)
+        service_item.xml_version = self.open_lyrics.song_to_xml(song)
         # Add the audio file to the service item.
         if song.media_files:
             service_item.add_capability(ItemCapabilities.HasBackgroundAudio)
@@ -466,11 +499,8 @@
         Generates the song footer based on a song and adds details to a service item.
         author_list is only required for initial song generation.
 
-        ``item``
-            The service item to be amended
-
-        ``song``
-            The song to be used to generate the footer
+        :param item: The service item to be amended
+        :param song: The song to be used to generate the footer
         """
         author_list = [str(author.display_name) for author in song.authors]
         item.audit = [
@@ -482,7 +512,7 @@
         item.raw_footer.append(song.copyright)
         if Settings().value('core/ccli number'):
             item.raw_footer.append(translate('SongsPlugin.MediaItem', 'CCLI License: ') +
-                Settings().value('core/ccli number'))
+                                   Settings().value('core/ccli number'))
         return author_list
 
     def service_load(self, item):
@@ -497,11 +527,14 @@
             # (data_string[u'title']) is probably wrong. We add "@" to search title and hope that we do not add any
             # duplicate. This should work for songs without alternate title.
             search_results = self.plugin.manager.get_all_objects(Song,
-                Song.search_title == (re.compile(r'\W+', re.UNICODE).sub(' ',
-                item.data_string['title'].strip()) + '@').strip().lower(), Song.search_title.asc())
+                                                                 Song.search_title == (re.compile(r'\W+', re.UNICODE)
+                                                                                       .sub(' ',
+                                                                 item.data_string['title'].strip()) + '@').strip()
+                                                                 .lower(), Song.search_title.asc())
         else:
             search_results = self.plugin.manager.get_all_objects(Song,
-                Song.search_title == item.data_string['title'], Song.search_title.asc())
+                                                                 Song.search_title == item.data_string['title'],
+                                                                 Song.search_title.asc())
         edit_id = 0
         add_song = True
         if search_results:
@@ -521,16 +554,16 @@
                 # If there's any backing tracks, copy them over.
                 if item.background_audio:
                     self._update_background_audio(song, item)
-        if add_song and self.addSongFromService:
-            song = self.openLyrics.xml_to_song(item.xml_version)
+        if add_song and self.add_song_from_service:
+            song = self.open_lyrics.xml_to_song(item.xml_version)
             # If there's any backing tracks, copy them over.
             if item.background_audio:
                 self._update_background_audio(song, item)
             editId = song.id
             self.on_search_text_button_clicked()
-        elif add_song and not self.addSongFromService:
+        elif add_song and not self.add_song_from_service:
             # Make sure we temporary import formatting tags.
-            song = self.openLyrics.xml_to_song(item.xml_version, True)
+            song = self.open_lyrics.xml_to_song(item.xml_version, True)
             # If there's any backing tracks, copy them over.
             if item.background_audio:
                 self._update_background_audio(song, item)
@@ -540,7 +573,7 @@
         self.generate_footer(item, song)
         return item
 
-    def search(self, string, showError):
+    def search(self, string, show_error):
         """
         Search for some songs
         """

=== modified file 'openlp/plugins/songs/lib/mediashoutimport.py'
--- openlp/plugins/songs/lib/mediashoutimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/mediashoutimport.py	2014-03-02 09:40:29 +0000
@@ -37,6 +37,7 @@
 
 VERSE_TAGS = ['V', 'C', 'B', 'O', 'P', 'I', 'E']
 
+
 class MediaShoutImport(SongImport):
     """
     The :class:`MediaShoutImport` class provides the ability to import the
@@ -48,17 +49,17 @@
         """
         SongImport.__init__(self, manager, **kwargs)
 
-    def doImport(self):
+    def do_import(self):
         """
         Receive a single file to import.
         """
         try:
            conn = pyodbc.connect('DRIVER={Microsoft Access Driver (*.mdb)};'
-            'DBQ=%s;PWD=6NOZ4eHK7k' % self.import_source)
+                                 'DBQ=%s;PWD=6NOZ4eHK7k' % self.import_source)
         except:
             # Unfortunately no specific exception type
             self.logError(self.import_source,
-                translate('SongsPlugin.MediaShoutImport', 'Unable to open the MediaShout database.'))
+                          translate('SongsPlugin.MediaShoutImport', 'Unable to open the MediaShout database.'))
             return
         cursor = conn.cursor()
         cursor.execute('SELECT Record, Title, Author, Copyright, '
@@ -69,29 +70,29 @@
             if self.stop_import_flag:
                 break
             cursor.execute('SELECT Type, Number, Text FROM Verses '
-                'WHERE Record = %s ORDER BY Type, Number' % song.Record)
+                           'WHERE Record = %s ORDER BY Type, Number' % song.Record)
             verses = cursor.fetchall()
             cursor.execute('SELECT Type, Number, POrder FROM PlayOrder '
-                'WHERE Record = %s ORDER BY POrder' % song.Record)
+                           'WHERE Record = %s ORDER BY POrder' % song.Record)
             verse_order = cursor.fetchall()
             cursor.execute('SELECT Name FROM Themes INNER JOIN SongThemes '
-                'ON SongThemes.ThemeId = Themes.ThemeId '
-                'WHERE SongThemes.Record = %s' % song.Record)
+                           'ON SongThemes.ThemeId = Themes.ThemeId '
+                           'WHERE SongThemes.Record = %s' % song.Record)
             topics = cursor.fetchall()
             cursor.execute('SELECT Name FROM Groups INNER JOIN SongGroups '
-                'ON SongGroups.GroupId = Groups.GroupId '
-                'WHERE SongGroups.Record = %s' % song.Record)
+                           'ON SongGroups.GroupId = Groups.GroupId '
+                           'WHERE SongGroups.Record = %s' % song.Record)
             topics += cursor.fetchall()
-            self.processSong(song, verses, verse_order, topics)
+            self.process_song(song, verses, verse_order, topics)
 
-    def processSong(self, song, verses, verse_order, topics):
+    def process_song(self, song, verses, verse_order, topics):
         """
         Create the song, i.e. title, verse etc.
         """
         self.setDefaults()
         self.title = song.Title
         self.parse_author(song.Author)
-        self.addCopyright(song.Copyright)
+        self.add_copyright(song.Copyright)
         self.comments = song.Notes
         for topic in topics:
             self.topics.append(topic.Name)

=== modified file 'openlp/plugins/songs/lib/olpimport.py'
--- openlp/plugins/songs/lib/olpimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/olpimport.py	2014-03-02 09:40:29 +0000
@@ -45,6 +45,7 @@
 
 log = logging.getLogger(__name__)
 
+
 class OpenLPSongImport(SongImport):
     """
     The :class:`OpenLPSongImport` class provides OpenLP with the ability to
@@ -54,21 +55,17 @@
         """
         Initialise the import.
 
-        ``manager``
-            The song manager for the running OpenLP installation.
-
-        ``source_db``
-            The database providing the data to import.
+        :param manager: The song manager for the running OpenLP installation.
+        :param kwargs: The database providing the data to import.
         """
         SongImport.__init__(self, manager, **kwargs)
         self.sourceSession = None
 
-    def doImport(self, progressDialog=None):
+    def do_import(self, progress_dialog=None):
         """
         Run the import for an OpenLP version 2 song database.
 
-        ``progressDialog``
-            The QProgressDialog used when importing songs from the FRW.
+        :param progress_dialog: The QProgressDialog used when importing songs from the FRW.
         """
 
         class OldAuthor(BaseModel):
@@ -77,28 +74,24 @@
             """
             pass
 
-
         class OldBook(BaseModel):
             """
             Book model
             """
             pass
 
-
         class OldMediaFile(BaseModel):
             """
             MediaFile model
             """
             pass
 
-
         class OldSong(BaseModel):
             """
             Song model
             """
             pass
 
-
         class OldTopic(BaseModel):
             """
             Topic model
@@ -108,7 +101,7 @@
         # Check the file type
         if not self.import_source.endswith('.sqlite'):
             self.logError(self.import_source,
-                translate('SongsPlugin.OpenLPSongImport', 'Not a valid OpenLP 2.0 song database.'))
+                          translate('SongsPlugin.OpenLPSongImport', 'Not a valid OpenLP 2.0 song database.'))
             return
         self.import_source = 'sqlite:///%s' % self.import_source
         # Load the db file
@@ -143,14 +136,13 @@
         }
         if has_media_files:
             if isinstance(source_media_files_songs_table, Table):
-                song_props['media_files'] = relation(OldMediaFile,
-                    backref='songs',
-                    secondary=source_media_files_songs_table)
+                song_props['media_files'] = relation(OldMediaFile, backref='songs', 
+                                                     secondary=source_media_files_songs_table)
             else:
-                song_props['media_files'] = relation(OldMediaFile,
-                    backref='songs',
-                    foreign_keys=[source_media_files_table.c.song_id],
-                    primaryjoin=source_songs_table.c.id == source_media_files_table.c.song_id)
+                song_props['media_files'] = relation(OldMediaFile, backref='songs',
+                                                     foreign_keys=[source_media_files_table.c.song_id],
+                                                     primaryjoin=
+                                                     source_songs_table.c.id == source_media_files_table.c.song_id)
         try:
             class_mapper(OldAuthor)
         except UnmappedClassError:
@@ -213,16 +205,17 @@
                 if song.media_files:
                     for media_file in song.media_files:
                         existing_media_file = self.manager.get_object_filtered(MediaFile,
-                                MediaFile.file_name == media_file.file_name)
+                                                                               MediaFile.file_name ==
+                                                                               media_file.file_name)
                         if existing_media_file:
                             new_song.media_files.append(existing_media_file)
                         else:
                             new_song.media_files.append(MediaFile.populate(file_name=media_file.file_name))
             clean_song(self.manager, new_song)
             self.manager.save_object(new_song)
-            if progressDialog:
-                progressDialog.setValue(progressDialog.value() + 1)
-                progressDialog.setLabelText(WizardStrings.ImportingType % new_song.title)
+            if progress_dialog:
+                progress_dialog.setValue(progress_dialog.value() + 1)
+                progress_dialog.setLabelText(WizardStrings.ImportingType % new_song.title)
             else:
                 self.import_wizard.increment_progress_bar(WizardStrings.ImportingType % new_song.title)
             if self.stop_import_flag:

=== modified file 'openlp/plugins/songs/lib/oooimport.py'
--- openlp/plugins/songs/lib/oooimport.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/lib/oooimport.py	2014-03-02 09:40:29 +0000
@@ -63,13 +63,17 @@
         """
         SongImport.__init__(self, manager, **kwargs)
         self.document = None
-        self.processStarted = False
+        self.process_started = False
 
-    def doImport(self):
+    def do_import(self):
+        """
+        Run the LibreOffice / OpenOffice importer
+        :return:
+        """
         if not isinstance(self.import_source, list):
             return
         try:
-            self.startOoo()
+            self.start_ooo()
         except NoConnectException as exc:
             self.logError(
                 self.import_source[0],
@@ -82,34 +86,34 @@
                 break
             filename = str(filename)
             if os.path.isfile(filename):
-                self.openOooFile(filename)
+                self.open_ooo_file(filename)
                 if self.document:
-                    self.processOooDocument()
-                    self.closeOooFile()
+                    self.process_ooo_document()
+                    self.close_ooo_file()
                 else:
                     self.logError(self.filepath, translate('SongsPlugin.SongImport', 'Unable to open file'))
             else:
                 self.logError(self.filepath, translate('SongsPlugin.SongImport', 'File not found'))
-        self.closeOoo()
+        self.close_ooo()
 
-    def processOooDocument(self):
+    def process_ooo_document(self):
         """
         Handle the import process for OpenOffice files. This method facilitates
         allowing subclasses to handle specific types of OpenOffice files.
         """
         if self.document.supportsService("com.sun.star.presentation.PresentationDocument"):
-            self.processPres()
+            self.process_pres()
         if self.document.supportsService("com.sun.star.text.TextDocument"):
-            self.processDoc()
+            self.process_doc()
 
-    def startOoo(self):
+    def start_ooo(self):
         """
         Start OpenOffice.org process
         TODO: The presentation/Impress plugin may already have it running
         """
         if os.name == 'nt':
-            self.startOooProcess()
-            self.desktop = self.oooManager.createInstance('com.sun.star.frame.Desktop')
+            self.start_ooo_process()
+            self.desktop = self.ooo_manager.createInstance('com.sun.star.frame.Desktop')
         else:
             context = uno.getComponentContext()
             resolver = context.ServiceManager.createInstanceWithContext('com.sun.star.bridge.UnoUrlResolver', context)
@@ -129,21 +133,21 @@
                     return
             raise Exception('Unable to start LibreOffice')
 
-    def startOooProcess(self):
+    def start_ooo_process(self):
         try:
             if os.name == 'nt':
-                self.oooManager = Dispatch('com.sun.star.ServiceManager')
-                self.oooManager._FlagAsMethod('Bridge_GetStruct')
-                self.oooManager._FlagAsMethod('Bridge_GetValueObject')
+                self.ooo_manager = Dispatch('com.sun.star.ServiceManager')
+                self.ooo_manager._FlagAsMethod('Bridge_GetStruct')
+                self.ooo_manager._FlagAsMethod('Bridge_GetValueObject')
             else:
                 cmd = get_uno_command()
                 process = QtCore.QProcess()
                 process.startDetached(cmd)
-            self.processStarted = True
+            self.process_started = True
         except:
             log.exception("startOooProcess failed")
 
-    def openOooFile(self, filepath):
+    def open_ooo_file(self, filepath):
         """
         Open the passed file in OpenOffice.org Impress
         """
@@ -157,8 +161,7 @@
         properties = []
         properties = tuple(properties)
         try:
-            self.document = self.desktop.loadComponentFromURL(url, '_blank',
-                0, properties)
+            self.document = self.desktop.loadComponentFromURL(url, '_blank', 0, properties)
             if not self.document.supportsService("com.sun.star.presentation.PresentationDocument") and not \
                     self.document.supportsService("com.sun.star.text.TextDocument"):
                 self.closeOooFile()
@@ -168,21 +171,21 @@
             log.exception("openOooFile failed: %s", url)
         return
 
-    def closeOooFile(self):
+    def close_ooo_file(self):
         """
         Close file.
         """
         self.document.close(True)
         self.document = None
 
-    def closeOoo(self):
+    def close_ooo(self):
         """
         Close OOo. But only if we started it and not on windows
         """
-        if self.processStarted:
+        if self.process_started:
             self.desktop.terminate()
 
-    def processPres(self):
+    def process_pres(self):
         """
         Process the file
         """
@@ -206,7 +209,7 @@
         self.processSongsText(text)
         return
 
-    def processDoc(self):
+    def process_doc(self):
         """
         Process the doc file, a paragraph at a time
         """
@@ -225,16 +228,21 @@
                     if textportion.BreakType in (PAGE_AFTER, PAGE_BOTH):
                         paratext += '\f'
             text += paratext + '\n'
-        self.processSongsText(text)
-
-    def processSongsText(self, text):
+        self.process_songs_text(text)
+
+    def process_songs_text(self, text):
+        """
+        Process the text of the song
+
+        :param text: text to process
+        """
         songtexts = self.tidyText(text).split('\f')
         self.setDefaults()
         for songtext in songtexts:
             if songtext.strip():
-                self.processSongText(songtext.strip())
-                if self.checkComplete():
+                self.process_song_text(songtext.strip())
+                if self.check_complete():
                     self.finish()
                     self.setDefaults()
-        if self.checkComplete():
+        if self.check_complete():
             self.finish()

=== modified file 'openlp/plugins/songs/lib/openlyricsexport.py'
--- openlp/plugins/songs/lib/openlyricsexport.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/lib/openlyricsexport.py	2014-03-02 09:40:29 +0000
@@ -62,15 +62,15 @@
         Export the songs.
         """
         log.debug('started OpenLyricsExport')
-        openLyrics = OpenLyrics(self.manager)
+        open_lyrics = OpenLyrics(self.manager)
         self.parent.progress_bar.setMaximum(len(self.songs))
         for song in self.songs:
             self.application.process_events()
             if self.parent.stop_export_flag:
                 return False
             self.parent.increment_progress_bar(translate('SongsPlugin.OpenLyricsExport', 'Exporting "%s"...') %
-                song.title)
-            xml = openLyrics.song_to_xml(song)
+                                               song.title)
+            xml = open_lyrics.song_to_xml(song)
             tree = etree.ElementTree(etree.fromstring(xml.encode()))
             filename = '%s (%s)' % (song.title, ', '.join([author.display_name for author in song.authors]))
             filename = clean_filename(filename)
@@ -79,7 +79,7 @@
             # Pass a file object, because lxml does not cope with some special
             # characters in the path (see lp:757673 and lp:744337).
             tree.write(open(os.path.join(self.save_path, filename), 'wb'),
-                encoding='utf-8', xml_declaration=True, pretty_print=True)
+                       encoding='utf-8', xml_declaration=True, pretty_print=True)
         return True
 
     def _get_application(self):

=== modified file 'openlp/plugins/songs/lib/openlyricsimport.py'
--- openlp/plugins/songs/lib/openlyricsimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/openlyricsimport.py	2014-03-02 09:40:29 +0000
@@ -54,9 +54,9 @@
         """
         log.debug('initialise OpenLyricsImport')
         SongImport.__init__(self, manager, **kwargs)
-        self.openLyrics = OpenLyrics(self.manager)
+        self.open_lyrics = OpenLyrics(self.manager)
 
-    def doImport(self):
+    def do_import(self):
         """
         Imports the songs.
         """
@@ -71,11 +71,11 @@
                 # special characters in the path (see lp:757673 and lp:744337).
                 parsed_file = etree.parse(open(file_path, 'r'), parser)
                 xml = etree.tostring(parsed_file).decode()
-                self.openLyrics.xml_to_song(xml)
+                self.open_lyrics.xml_to_song(xml)
             except etree.XMLSyntaxError:
                 log.exception('XML syntax error in file %s' % file_path)
                 self.logError(file_path, SongStrings.XMLSyntaxError)
             except OpenLyricsError as exception:
                 log.exception('OpenLyricsException %d in file %s: %s'
-                    % (exception.type, file_path, exception.log_message))
+                              % (exception.type, file_path, exception.log_message))
                 self.logError(file_path, exception.display_message)

=== modified file 'openlp/plugins/songs/lib/opensongimport.py'
--- openlp/plugins/songs/lib/opensongimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/opensongimport.py	2014-03-02 09:40:29 +0000
@@ -109,16 +109,21 @@
         """
         SongImport.__init__(self, manager, **kwargs)
 
-    def doImport(self):
+    def do_import(self):
+        """
+        Run the Importer
+
+        :return:
+        """
         self.import_wizard.progress_bar.setMaximum(len(self.import_source))
         for filename in self.import_source:
             if self.stop_import_flag:
                 return
             song_file = open(filename)
-            self.doImportFile(song_file)
+            self.do_import_file(song_file)
             song_file.close()
 
-    def doImportFile(self, file):
+    def do_import_file(self, file):
         """
         Process the OpenSong file - pass in a file-like object, not a file path.
         """
@@ -132,7 +137,7 @@
         root = tree.getroot()
         if root.tag != 'song':
             self.logError(file.name, str(
-                translate('SongsPlugin.OpenSongImport', ('Invalid OpenSong song file. Missing song tag.'))))
+                translate('SongsPlugin.OpenSongImport', 'Invalid OpenSong song file. Missing song tag.')))
             return
         fields = dir(root)
         decode = {
@@ -218,7 +223,7 @@
         for (verse_tag, verse_num, inst) in our_verse_order:
             lines = '\n'.join(verses[verse_tag][verse_num][inst])
             length = 0
-            while(length < len(verse_num) and verse_num[length].isnumeric()):
+            while length < len(verse_num) and verse_num[length].isnumeric():
                 length += 1
             verse_def = '%s%s' % (verse_tag, verse_num[:length])
             verse_joints[verse_def] = '%s\n[---]\n%s' % (verse_joints[verse_def], lines) \
@@ -248,7 +253,6 @@
                 if verse_num in verses.get(verse_tag, {}):
                     self.verseOrderList.append(verse_def)
                 else:
-                    log.info('Got order %s but not in verse tags, dropping'
-                        'this item from presentation order', verse_def)
+                    log.info('Got order %s but not in verse tags, dropping this item from display order', verse_def)
         if not self.finish():
             self.logError(file.name)

=== modified file 'openlp/plugins/songs/lib/powersongimport.py'
--- openlp/plugins/songs/lib/powersongimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/powersongimport.py	2014-03-02 09:40:29 +0000
@@ -39,6 +39,7 @@
 
 log = logging.getLogger(__name__)
 
+
 class PowerSongImport(SongImport):
     """
     The :class:`PowerSongImport` class provides the ability to import song files
@@ -73,7 +74,7 @@
         * .song
     """
     @staticmethod
-    def isValidSource(import_source):
+    def is_valid_source(import_source):
         """
         Checks if source is a PowerSong 1.0 folder:
             * is a directory
@@ -85,12 +86,12 @@
                     return True
         return False
 
-    def doImport(self):
+    def do_import(self):
         """
         Receive either a list of files or a folder (unicode) to import.
         """
         from .importer import SongFormat
-        PS_string = SongFormat.get(SongFormat.PowerSong, 'name')
+        power_song_string = SongFormat.get(SongFormat.PowerSong, 'name')
         if isinstance(self.import_source, str):
             if os.path.isdir(self.import_source):
                 dir = self.import_source
@@ -102,7 +103,7 @@
                 self.import_source = ''
         if not self.import_source or not isinstance(self.import_source, list):
             self.logError(translate('SongsPlugin.PowerSongImport', 'No songs to import.'),
-                translate('SongsPlugin.PowerSongImport', 'No %s files found.') % PS_string)
+                          translate('SongsPlugin.PowerSongImport', 'No %s files found.') % power_song_string)
             return
         self.import_wizard.progress_bar.setMaximum(len(self.import_source))
         for file in self.import_source:
@@ -113,15 +114,15 @@
             with open(file, 'rb') as song_data:
                 while True:
                     try:
-                        label = self._readString(song_data)
+                        label = self._read_string(song_data)
                         if not label:
                             break
-                        field = self._readString(song_data)
+                        field = self._read_string(song_data)
                     except ValueError:
                         parse_error = True
-                        self.logError(os.path.basename(file), str(
-                            translate('SongsPlugin.PowerSongImport', 'Invalid %s file. Unexpected byte value.')) %
-                                PS_string)
+                        self.logError(os.path.basename(file), str(translate('SongsPlugin.PowerSongImport', 
+                                                                            'Invalid %s file. Unexpected byte value.'))
+                                                                            % power_song_string)
                         break
                     else:
                         if label == 'TITLE':
@@ -130,38 +131,39 @@
                             self.parse_author(field)
                         elif label == 'COPYRIGHTLINE':
                             found_copyright = True
-                            self._parseCopyrightCCLI(field)
+                            self._parse_copyright_CCLI(field)
                         elif label == 'PART':
                             self.addVerse(field)
             if parse_error:
                 continue
             # Check that file had TITLE field
             if not self.title:
-                self.logError(os.path.basename(file), str(
-                    translate('SongsPlugin.PowerSongImport', 'Invalid %s file. Missing "TITLE" header.')) % PS_string)
+                self.logError(os.path.basename(file), str(translate('SongsPlugin.PowerSongImport', 
+                                                                    'Invalid %s file. Missing "TITLE" header.')) % 
+                                                          power_song_string)
                 continue
             # Check that file had COPYRIGHTLINE label
             if not found_copyright:
-                self.logError(self.title, str(
-                    translate('SongsPlugin.PowerSongImport', 'Invalid %s file. Missing "COPYRIGHTLINE" header.')) %
-                        PS_string)
+                self.logError(self.title, str(translate('SongsPlugin.PowerSongImport', 
+                                                        'Invalid %s file. Missing "COPYRIGHTLINE" header.')) %
+                                                         power_song_string)
                 continue
             # Check that file had at least one verse
             if not self.verses:
-                self.logError(self.title, str(
-                    translate('SongsPlugin.PowerSongImport', 'Verses not found. Missing "PART" header.')))
+                self.logError(self.title, str(translate('SongsPlugin.PowerSongImport', 
+                                                        'Verses not found. Missing "PART" header.')))
                 continue
             if not self.finish():
                 self.logError(self.title)
 
-    def _readString(self, file_object):
+    def _read_string(self, file_object):
         """
         Reads in next variable-length string.
         """
-        string_len = self._read7BitEncodedInteger(file_object)
+        string_len = self._read_7_bit_encode_integer(file_object)
         return str(file_object.read(string_len), 'utf-8', 'ignore')
 
-    def _read7BitEncodedInteger(self, file_object):
+    def _read_7_bit_encode_integer(self, file_object):
         """
         Reads in a 32-bit integer in compressed 7-bit format.
 
@@ -179,7 +181,7 @@
             # Check for corrupted stream (since max 5 bytes per 32-bit integer)
             if i == 5:
                 raise ValueError
-            byte = self._readByte(file_object)
+            byte = self._read_byte(file_object)
             # Strip high bit and shift left
             val += (byte & 0x7f) << shift
             shift += 7
@@ -189,7 +191,7 @@
             i += 1
         return val
 
-    def _readByte(self, file_object):
+    def _read_byte(self, file_object):
         """
         Reads in next byte as an unsigned integer
 
@@ -202,7 +204,7 @@
         else:
             return ord(byte_str)
 
-    def _parseCopyrightCCLI(self, field):
+    def _parse_copyright_CCLI(self, field):
         """
         Look for CCLI song number, and get copyright
         """
@@ -211,7 +213,7 @@
             copyright = ccli_no
             ccli_no = ''
         if copyright:
-            self.addCopyright(copyright.rstrip('\n').replace('\n', ' '))
+            self.add_copyright(copyright.rstrip('\n').replace('\n', ' '))
         if ccli_no:
             ccli_no = ccli_no.strip(' :')
             if ccli_no.isdigit():

=== modified file 'openlp/plugins/songs/lib/sofimport.py'
--- openlp/plugins/songs/lib/sofimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/sofimport.py	2014-03-02 09:40:29 +0000
@@ -61,6 +61,7 @@
 except ImportError:
     ITALIC = 2
 
+
 class SofImport(OooImport):
     """
     Import songs provided on disks with the Songs of Fellowship music books
@@ -68,8 +69,8 @@
 
     Use OpenOffice.org Writer for processing the rtf file
 
-    The three books are not only inconsistant with each other, they are
-    inconsistant in themselves too with their formatting. Not only this, but
+    The three books are not only inconsistent with each other, they are
+    inconsistent in themselves too with their formatting. Not only this, but
     the 1+2 book does not space out verses correctly. This script attempts
     to sort it out, but doesn't get it 100% right. But better than having to
     type them all out!
@@ -85,18 +86,18 @@
         OooImport.__init__(self, manager, **kwargs)
         self.song = False
 
-    def processOooDocument(self):
+    def process_ooo_document(self):
         """
         Handle the import process for SoF files.
         """
-        self.processSofFile()
+        self.process_Sof_file()
 
-    def processSofFile(self):
+    def process_Sof_file(self):
         """
         Process the RTF file, a paragraph at a time
         """
         self.blankLines = 0
-        self.newSong()
+        self.new_song()
         try:
             paragraphs = self.document.getText().createEnumeration()
             while paragraphs.hasMoreElements():
@@ -104,48 +105,48 @@
                     return
                 paragraph = paragraphs.nextElement()
                 if paragraph.supportsService("com.sun.star.text.Paragraph"):
-                    self.processParagraph(paragraph)
+                    self.process_paragraph(paragraph)
         except RuntimeException as exc:
             log.exception('Error processing file: %s', exc)
         if not self.finish():
             self.logError(self.filepath)
 
-    def processParagraph(self, paragraph):
+    def process_paragraph(self, paragraph):
         """
         Process a paragraph.
         In the first book, a paragraph is a single line. In the latter ones
         they may contain multiple lines.
-        Each paragraph contains textportions. Each textportion has it's own
+        Each paragraph contains text_portions. Each text_portion has it's own
         styling, e.g. italics, bold etc.
         Also check for page breaks, which indicates a new song in books 1+2.
         In later books, there may not be line breaks, so check for 3 or more
         newlines
         """
         text = ''
-        textportions = paragraph.createEnumeration()
-        while textportions.hasMoreElements():
-            textportion = textportions.nextElement()
-            if textportion.BreakType in (PAGE_BEFORE, PAGE_BOTH):
-                self.processParagraphText(text)
-                self.newSong()
-                text = ''
-            text += self.processTextPortion(textportion)
-            if textportion.BreakType in (PAGE_AFTER, PAGE_BOTH):
-                self.processParagraphText(text)
-                self.newSong()
-                text = ''
-        self.processParagraphText(text)
+        text_portions = paragraph.createEnumeration()
+        while text_portions.hasMoreElements():
+            text_portion = text_portions.nextElement()
+            if text_portion.BreakType in (PAGE_BEFORE, PAGE_BOTH):
+                self.process_paragraph_text(text)
+                self.new_song()
+                text = ''
+            text += self.process_text_portion(text_portion)
+            if text_portion.BreakType in (PAGE_AFTER, PAGE_BOTH):
+                self.process_paragraph_text(text)
+                self.new_song()
+                text = ''
+        self.process_paragraph_text(text)
 
-    def processParagraphText(self, text):
+    def process_paragraph_text(self, text):
         """
         Split the paragraph text into multiple lines and process
         """
         for line in text.split('\n'):
-            self.processParagraphLine(line)
+            self.process_paragraph_line(line)
         if self.blankLines > 2:
-            self.newSong()
+            self.new_song()
 
-    def processParagraphLine(self, text):
+    def process_paragraph_line(self, text):
         """
         Process a single line. Throw away that text which isn't relevant, i.e.
         stuff that appears at the end of the song.
@@ -157,12 +158,12 @@
             if self.blankLines > 1:
                 return
             if self.title != '':
-                self.finishVerse()
+                self.finish_verse()
             return
         self.blankLines = 0
-        if self.skipToCloseBracket:
+        if self.skip_to_close_bracket:
             if text.endswith(')'):
-                self.skipToCloseBracket = False
+                self.skip_to_close_bracket = False
             return
         if text.startswith('CCL Licence'):
             self.italics = False
@@ -170,66 +171,66 @@
         if text == 'A Songs of Fellowship Worship Resource':
             return
         if text.startswith('(NB.') or text.startswith('(Regrettably') or text.startswith('(From'):
-            self.skipToCloseBracket = True
+            self.skip_to_close_bracket = True
             return
         if text.startswith('Copyright'):
-            self.addCopyright(text)
+            self.add_copyright(text)
             return
         if text == '(Repeat)':
-            self.finishVerse()
-            self.repeatVerse()
+            self.finish_verse()
+            self.repeat_verse()
             return
         if self.title == '':
             if self.copyright == '':
-                self.addSofAuthor(text)
+                self.add_Sof_author(text)
             else:
-                self.addCopyright(text)
+                self.add_copyright(text)
             return
-        self.addVerseLine(text)
+        self.add_verse_line(text)
 
-    def processTextPortion(self, textportion):
+    def process_text_portion(self, text_portion):
         """
         Process a text portion. Here we just get the text and detect if
         it's bold or italics. If it's bold then its a song number or song title.
         Song titles are in all capitals, so we must bring the capitalization
         into line
         """
-        text = textportion.getString()
+        text = text_portion.getString()
         text = self.tidyText(text)
         if text.strip() == '':
             return text
-        if textportion.CharWeight == BOLD:
+        if text_portion.CharWeight == BOLD:
             boldtext = text.strip()
             if boldtext.isdigit() and self.songNumber == '':
-                self.addSongNumber(boldtext)
+                self.add_song_number(boldtext)
                 return ''
             text = self.uncapText(text)
             if self.title == '':
-                self.addTitle(text)
+                self.add_title(text)
             return text
         if text.strip().startswith('('):
             return text
-        self.italics = (textportion.CharPosture == ITALIC)
+        self.italics = (text_portion.CharPosture == ITALIC)
         return text
 
-    def newSong(self):
+    def new_song(self):
         """
         A change of song. Store the old, create a new
         ... but only if the last song was complete. If not, stick with it
         """
         if self.song:
-            self.finishVerse()
-            if not self.checkComplete():
+            self.finish_verse()
+            if not self.check_complete():
                 return
             self.finish()
         self.song = True
         self.setDefaults()
-        self.skipToCloseBracket = False
-        self.isChorus = False
+        self.skip_to_close_bracket = False
+        self.is_chorus = False
         self.italics = False
-        self.currentVerse = ''
+        self.current_verse = ''
 
-    def addSongNumber(self, song_no):
+    def add_song_number(self, song_no):
         """
         Add a song number, store as alternate title. Also use the song
         number to work out which songbook we're in
@@ -250,7 +251,7 @@
         else:
             self.songBook = 'Songs of Fellowship Other'
 
-    def addTitle(self, text):
+    def add_title(self, text):
         """
         Add the title to the song. Strip some leading/trailing punctuation that
         we don't want in a title
@@ -263,7 +264,7 @@
         self.title = title
         self.import_wizard.increment_progress_bar('Processing song ' + title, 0)
 
-    def addSofAuthor(self, text):
+    def add_Sof_author(self, text):
         """
         Add the author. OpenLP stores them individually so split by 'and', '&'
         and comma.
@@ -273,40 +274,40 @@
         text = text.replace(' and ', ' & ')
         self.parse_author(text)
 
-    def addVerseLine(self, text):
+    def add_verse_line(self, text):
         """
         Add a line to the current verse. If the formatting has changed and
         we're beyond the second line of first verse, then this indicates
         a change of verse. Italics are a chorus
         """
-        if self.italics != self.isChorus and ((len(self.verses) > 0) or
-            (self.currentVerse.count('\n') > 1)):
-            self.finishVerse()
+        if self.italics != self.is_chorus and ((len(self.verses) > 0) or
+            (self.current_verse.count('\n') > 1)):
+            self.finish_verse()
         if self.italics:
-            self.isChorus = True
-        self.currentVerse += text + '\n'
+            self.is_chorus = True
+        self.current_verse += text + '\n'
 
-    def finishVerse(self):
+    def finish_verse(self):
         """
         Verse is finished, store it. Note in book 1+2, some songs are formatted
         incorrectly. Here we try and split songs with missing line breaks into
         the correct number of verses.
         """
-        if self.currentVerse.strip() == '':
+        if self.current_verse.strip() == '':
             return
-        if self.isChorus:
+        if self.is_chorus:
             versetag = 'C'
             splitat = None
         else:
             versetag = 'V'
-            splitat = self.verseSplits(self.songNumber)
+            splitat = self.verse_splits(self.songNumber)
         if splitat:
             ln = 0
             verse = ''
-            for line in self.currentVerse.split('\n'):
+            for line in self.current_verse.split('\n'):
                 ln += 1
                 if line == '' or ln > splitat:
-                    self.addSofVerse(verse, versetag)
+                    self.add_Sof_verse(verse, versetag)
                     ln = 0
                     if line:
                         verse = line + '\n'
@@ -315,17 +316,22 @@
                 else:
                     verse += line + '\n'
             if verse:
-                self.addSofVerse(verse, versetag)
+                self.add_Sof_verse(verse, versetag)
         else:
-            self.addSofVerse(self.currentVerse, versetag)
-        self.currentVerse = ''
-        self.isChorus = False
+            self.add_Sof_verse(self.current_verse, versetag)
+        self.current_verse = ''
+        self.is_chorus = False
 
-    def addSofVerse(self, lyrics, tag):
-        self.addVerse(lyrics, tag)
-        if not self.isChorus and 'C1' in self.verseOrderListGenerated:
-            self.verseOrderListGenerated.append('C1')
-            self.verseOrderListGenerated_useful = True
+    def add_Sof_verse(self, lyrics, tag):
+        """
+        Add a Sof verse
+        :param lyrics: The Lyrics to be processed
+        :param tag: The verse Tag
+        """
+        self.add_verse(lyrics, tag)
+        if not self.is_chorus and 'C1' in self.verse_order_list_generated:
+            self.verse_order_list_generated.append('C1')
+            self.verse_order_list_generated_useful = True
 
     def uncapText(self, text):
         """
@@ -341,20 +347,20 @@
         for i in range(1, len(textarr)):
             # Do not translate these. Fixed strings in SOF song file
             if textarr[i] in ('JESUS', 'CHRIST', 'KING', 'ALMIGHTY',
-                'REDEEMER', 'SHEPHERD', 'SON', 'GOD', 'LORD', 'FATHER',
-                'HOLY', 'SPIRIT', 'LAMB', 'YOU', 'YOUR', 'I', 'I\'VE',
-                'I\'M', 'I\'LL', 'SAVIOUR', 'O', 'YOU\'RE', 'HE', 'HIS',
-                'HIM', 'ZION', 'EMMANUEL', 'MAJESTY', 'JESUS\'', 'JIREH',
-                'JUDAH', 'LION', 'LORD\'S', 'ABRAHAM', 'GOD\'S',
-                'FATHER\'S', 'ELIJAH' 'MARTHA', 'CHRISTMAS', 'ALPHA',
-                'OMEGA'):
+                              'REDEEMER', 'SHEPHERD', 'SON', 'GOD', 'LORD', 'FATHER',
+                              'HOLY', 'SPIRIT', 'LAMB', 'YOU', 'YOUR', 'I', 'I\'VE',
+                              'I\'M', 'I\'LL', 'SAVIOUR', 'O', 'YOU\'RE', 'HE', 'HIS',
+                              'HIM', 'ZION', 'EMMANUEL', 'MAJESTY', 'JESUS\'', 'JIREH',
+                              'JUDAH', 'LION', 'LORD\'S', 'ABRAHAM', 'GOD\'S',
+                              'FATHER\'S', 'ELIJAH' 'MARTHA', 'CHRISTMAS', 'ALPHA',
+                              'OMEGA'):
                 textarr[i] = textarr[i].capitalize()
             else:
                 textarr[i] = textarr[i].lower()
         text = ''.join(textarr)
         return text
 
-    def verseSplits(self, song_number):
+    def verse_splits(self, song_number):
         """
         Because someone at Kingsway forgot to check the 1+2 RTF file,
         some verses were not formatted correctly.

=== modified file 'openlp/plugins/songs/lib/songbeamerimport.py'
--- openlp/plugins/songs/lib/songbeamerimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/songbeamerimport.py	2014-03-02 09:40:29 +0000
@@ -40,6 +40,7 @@
 
 log = logging.getLogger(__name__)
 
+
 class SongBeamerTypes(object):
     MarkTypes = {
         'Refrain': VerseType.tags[VerseType.Chorus],
@@ -98,7 +99,7 @@
         """
         SongImport.__init__(self, manager, **kwargs)
 
-    def doImport(self):
+    def do_import(self):
         """
         Receive a single file or a list of files to import.
         """
@@ -130,10 +131,10 @@
                 # Just make sure that the line is of the type 'Unicode'.
                 line = str(line).strip()
                 if line.startswith('#') and not read_verses:
-                    self.parseTags(line)
+                    self.parse_tags(line)
                 elif line.startswith('---'):
                     if self.currentVerse:
-                        self.replaceHtmlTags()
+                        self.replace_html_tags()
                         self.addVerse(self.currentVerse, self.currentVerseType)
                         self.currentVerse = ''
                         self.currentVerseType = VerseType.tags[VerseType.Verse]
@@ -142,28 +143,28 @@
                 elif read_verses:
                     if verse_start:
                         verse_start = False
-                        if not self.checkVerseMarks(line):
+                        if not self.check_verse_marks(line):
                             self.currentVerse = line + '\n'
                     else:
                         self.currentVerse += line + '\n'
             if self.currentVerse:
-                self.replaceHtmlTags()
+                self.replace_html_tags()
                 self.addVerse(self.currentVerse, self.currentVerseType)
             if not self.finish():
                 self.logError(import_file)
 
-    def replaceHtmlTags(self):
+    def replace_html_tags(self):
         """
         This can be called to replace SongBeamer's specific (html) tags with OpenLP's specific (html) tags.
         """
         for pair in SongBeamerImport.HTML_TAG_PAIRS:
             self.currentVerse = pair[0].sub(pair[1], self.currentVerse)
 
-    def parseTags(self, line):
+    def parse_tags(self, line):
         """
         Parses a meta data line.
 
-        ``line``
+        :param line:
             The line in the file. It should consist of a tag and a value for this tag (unicode)::
 
                 u'#Title=Nearer my God to Thee'
@@ -174,7 +175,7 @@
         if not tag_val[0] or not tag_val[1]:
             return
         if tag_val[0] == '#(c)':
-            self.addCopyright(tag_val[1])
+            self.add_copyright(tag_val[1])
         elif tag_val[0] == '#AddCopyrightInfo':
             pass
         elif tag_val[0] == '#Author':
@@ -267,13 +268,12 @@
             # TODO: add the verse order.
             pass
 
-    def checkVerseMarks(self, line):
+    def check_verse_marks(self, line):
         """
         Check and add the verse's MarkType. Returns ``True`` if the given linE contains a correct verse mark otherwise
         ``False``.
 
-        ``line``
-            The line to check for marks (unicode).
+        :param line: The line to check for marks (unicode).
         """
         marks = line.split(' ')
         if len(marks) <= 2 and marks[0] in SongBeamerTypes.MarkTypes:

=== modified file 'openlp/plugins/songs/lib/songcompare.py'
--- openlp/plugins/songs/lib/songcompare.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/songcompare.py	2014-03-02 09:40:29 +0000
@@ -96,8 +96,7 @@
     """
     Return the length of a given difference.
 
-    ``opcode``
-        The difference.
+    :param opcode: The difference.
     """
     return max(opcode[2] - opcode[1], opcode[4] - opcode[3])
 
@@ -107,33 +106,30 @@
     Remove typos from a diff set. A typo is a small difference (<max_typo_size)
     surrounded by larger equal passages (>min_fragment_size).
 
-    ``diff``
-        The diff set to remove the typos from.
+    :param diff: The diff set to remove the typos from.
     """
     # Remove typo at beginning of the string.
     if len(diff) >= 2:
-        if diff[0][0] != "equal" and _op_length(diff[0]) <= MAX_TYPO_SIZE and \
-                _op_length(diff[1]) >= MIN_FRAGMENT_SIZE:
+        if diff[0][0] != "equal" and _op_length(diff[0]) <= MAX_TYPO_SIZE and _op_length(diff[1]) >= MIN_FRAGMENT_SIZE:
                     del diff[0]
     # Remove typos in the middle of the string.
     if len(diff) >= 3:
         for index in range(len(diff) - 3, -1, -1):
-            if _op_length(diff[index]) >= MIN_FRAGMENT_SIZE and \
-                diff[index + 1][0] != "equal" and _op_length(diff[index + 1]) <= MAX_TYPO_SIZE and \
+            if _op_length(diff[index]) >= MIN_FRAGMENT_SIZE and diff[index + 1][0] != "equal" and\
+               _op_length(diff[index + 1]) <= MAX_TYPO_SIZE and \
                     _op_length(diff[index + 2]) >= MIN_FRAGMENT_SIZE:
                         del diff[index + 1]
     # Remove typo at the end of the string.
     if len(diff) >= 2:
-        if _op_length(diff[-2]) >= MIN_FRAGMENT_SIZE and \
-            diff[-1][0] != "equal" and _op_length(diff[-1]) <= MAX_TYPO_SIZE:
+        if _op_length(diff[-2]) >= MIN_FRAGMENT_SIZE and diff[-1][0] != "equal" and \
+           _op_length(diff[-1]) <= MAX_TYPO_SIZE:
                 del diff[-1]
 
     # Merge the bordering equal passages that occured by removing differences.
     for index in range(len(diff) - 2, -1, -1):
         if diff[index][0] == "equal" and _op_length(diff[index]) >= MIN_FRAGMENT_SIZE and \
-            diff[index + 1][0] == "equal" and _op_length(diff[index + 1]) >= MIN_FRAGMENT_SIZE:
-                diff[index] = ("equal", diff[index][1], diff[index + 1][2], diff[index][3],
-                    diff[index + 1][4])
+                diff[index + 1][0] == "equal" and _op_length(diff[index + 1]) >= MIN_FRAGMENT_SIZE:
+                diff[index] = ("equal", diff[index][1], diff[index + 1][2], diff[index][3], diff[index + 1][4])
                 del diff[index + 1]
 
     return diff

=== modified file 'openlp/plugins/songs/lib/songimport.py'
--- openlp/plugins/songs/lib/songimport.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/lib/songimport.py	2014-03-02 09:40:29 +0000
@@ -53,7 +53,7 @@
     as necessary
     """
     @staticmethod
-    def isValidSource(import_source):
+    def is_valid_source(import_source):
         """
         Override this method to validate the source prior to import.
         """
@@ -63,10 +63,8 @@
         """
         Initialise and create defaults for properties
 
-        ``manager``
-            An instance of a SongManager, through which all database access is
-            performed.
-
+        :param manager:  An instance of a SongManager, through which all database access is performed.
+        :param kwargs: 
         """
         self.manager = manager
         QtCore.QObject.__init__(self)
@@ -99,27 +97,24 @@
         self.ccliNumber = ''
         self.authors = []
         self.topics = []
-        self.mediaFiles = []
+        self.media_files = []
         self.songBookName = ''
         self.songBookPub = ''
-        self.verseOrderListGeneratedUseful = False
-        self.verseOrderListGenerated = []
-        self.verseOrderList = []
+        self.verse_order_list_generated_useful = False
+        self.verse_order_listGenerated = []
+        self.verse_order_list = []
         self.verses = []
         self.verseCounts = {}
         self.copyrightString = translate('SongsPlugin.SongImport', 'copyright')
 
-    def logError(self, filepath, reason=SongStrings.SongIncomplete):
+    def log_error(self, filepath, reason=SongStrings.SongIncomplete):
         """
         This should be called, when a song could not be imported.
 
-        ``filepath``
-            This should be the file path if ``self.import_source`` is a list
+        :param filepath: This should be the file path if ``self.import_source`` is a list
             with different files. If it is not a list, but a single file (for
             instance a database), then this should be the song's title.
-
-        ``reason``
-            The reason why the import failed. The string should be as
+        :param reason: The reason why the import failed. The string should be as
             informative as possible.
         """
         self.setDefaults()
@@ -127,7 +122,7 @@
             return
         if self.import_wizard.error_report_text_edit.isHidden():
             self.import_wizard.error_report_text_edit.setText(translate('SongsPlugin.SongImport',
-                'The following songs could not be imported:'))
+                                                              'The following songs could not be imported:'))
             self.import_wizard.error_report_text_edit.setVisible(True)
             self.import_wizard.error_copy_to_button.setVisible(True)
             self.import_wizard.error_save_to_button.setVisible(True)
@@ -143,7 +138,7 @@
     def register(self, import_wizard):
         self.import_wizard = import_wizard
 
-    def tidyText(self, text):
+    def tidy_text(self, text):
         """
         Get rid of some dodgy unicode and formatting characters we're not
         interested in. Some can be converted to ascii.
@@ -161,13 +156,13 @@
         text = re.sub(r' ?(\n{5}|\f)+ ?', '\f', text)
         return text
 
-    def processSongText(self, text):
+    def process_song_text(self, text):
         verse_texts = text.split('\n\n')
         for verse_text in verse_texts:
             if verse_text.strip() != '':
-                self.processVerseText(verse_text.strip())
+                self.process_verse_text(verse_text.strip())
 
-    def processVerseText(self, text):
+    def process_verse_text(self, text):
         lines = text.split('\n')
         if text.lower().find(self.copyrightString) >= 0 or text.find(str(SongStrings.CopyrightSymbol)) >= 0:
             copyright_found = False
@@ -175,7 +170,7 @@
                 if (copyright_found or line.lower().find(self.copyrightString) >= 0 or
                         line.find(str(SongStrings.CopyrightSymbol)) >= 0):
                     copyright_found = True
-                    self.addCopyright(line)
+                    self.add_copyright(line)
                 else:
                     self.parse_author(line)
             return
@@ -184,9 +179,9 @@
             return
         if not self.title:
             self.title = lines[0]
-        self.addVerse(text)
+        self.add_verse(text)
 
-    def addCopyright(self, copyright):
+    def add_copyright(self, copyright):
         """
         Build the copyright field
         """
@@ -211,9 +206,9 @@
                 if author2.endswith('.'):
                     author2 = author2[:-1]
                 if author2:
-                    self.addAuthor(author2)
+                    self.add_author(author2)
 
-    def addAuthor(self, author):
+    def add_author(self, author):
         """
         Add an author to the list
         """
@@ -221,35 +216,29 @@
             return
         self.authors.append(author)
 
-    def addMediaFile(self, filename, weight=0):
+    def add_media_file(self, filename, weight=0):
         """
         Add a media file to the list
         """
-        if filename in [x[0] for x in self.mediaFiles]:
+        if filename in [x[0] for x in self.media_files]:
             return
-        self.mediaFiles.append((filename, weight))
+        self.media_files.append((filename, weight))
 
-    def addVerse(self, verse_text, verse_def='v', lang=None):
+    def add_verse(self, verse_text, verse_def='v', lang=None):
         """
         Add a verse. This is the whole verse, lines split by \\n. It will also
         attempt to detect duplicates. In this case it will just add to the verse
         order.
 
-        ``verse_text``
-            The text of the verse.
-
-        ``verse_def``
-            The verse tag can be v1/c1/b etc, or 'v' and 'c' (will count the
+        :param verse_text: The text of the verse.
+        :param verse_def: The verse tag can be v1/c1/b etc, or 'v' and 'c' (will count the
             verses/choruses itself) or None, where it will assume verse.
-
-        ``lang``
-            The language code (ISO-639) of the verse, for example *en* or *de*.
-
+        :param lang: The language code (ISO-639) of the verse, for example *en* or *de*.
         """
         for (old_verse_def, old_verse, old_lang) in self.verses:
             if old_verse.strip() == verse_text.strip():
-                self.verseOrderListGenerated.append(old_verse_def)
-                self.verseOrderListGeneratedUseful = True
+                self.verse_order_listGenerated.append(old_verse_def)
+                self.verse_order_list_generated_useful = True
                 return
         if verse_def[0] in self.verseCounts:
             self.verseCounts[verse_def[0]] += 1
@@ -262,18 +251,18 @@
         self.verses.append([verse_def, verse_text.rstrip(), lang])
         # A verse_def refers to all verses with that name, adding it once adds every instance, so do not add if already
         # used.
-        if verse_def not in self.verseOrderListGenerated:
-            self.verseOrderListGenerated.append(verse_def)
+        if verse_def not in self.verse_order_listGenerated:
+            self.verse_order_listGenerated.append(verse_def)
 
-    def repeatVerse(self):
+    def repeat_verse(self):
         """
         Repeat the previous verse in the verse order
         """
-        if self.verseOrderListGenerated:
-            self.verseOrderListGenerated.append(self.verseOrderListGenerated[-1])
-            self.verseOrderListGeneratedUseful = True
+        if self.verse_order_listGenerated:
+            self.verse_order_listGenerated.append(self.verse_order_listGenerated[-1])
+            self.verse_order_list_generated_useful = True
 
-    def checkComplete(self):
+    def check_complete(self):
         """
         Check the mandatory fields are entered (i.e. title and a verse)
         Author not checked here, if no author then "Author unknown" is
@@ -288,7 +277,7 @@
         """
         All fields have been set to this song. Write the song to disk.
         """
-        if not self.checkComplete():
+        if not self.check_complete():
             self.setDefaults()
             return False
         log.info('committing song %s to database', self.title)
@@ -317,10 +306,10 @@
                 verse_def = new_verse_def
             sxml.add_verse_to_lyrics(verse_tag, verse_def[1:], verse_text, lang)
         song.lyrics = str(sxml.extract_xml(), 'utf-8')
-        if not self.verseOrderList and self.verseOrderListGeneratedUseful:
-            self.verseOrderList = self.verseOrderListGenerated
-        self.verseOrderList = [verses_changed_to_other.get(v, v) for v in self.verseOrderList]
-        song.verse_order = ' '.join(self.verseOrderList)
+        if not self.verse_order_list and self.verse_order_list_generated_useful:
+            self.verse_order_list = self.verse_order_listGenerated
+        self.verse_order_list = [verses_changed_to_other.get(v, v) for v in self.verse_order_list]
+        song.verse_order = ' '.join(self.verse_order_list)
         song.copyright = self.copyright
         song.comments = self.comments
         song.theme_name = self.themeName
@@ -329,8 +318,8 @@
             author = self.manager.get_object_filtered(Author, Author.display_name == authortext)
             if not author:
                 author = Author.populate(display_name=authortext,
-                    last_name=authortext.split(' ')[-1],
-                    first_name=' '.join(authortext.split(' ')[:-1]))
+                                         last_name=authortext.split(' ')[-1],
+                                         first_name=' '.join(authortext.split(' ')[:-1]))
             song.authors.append(author)
         if self.songBookName:
             song_book = self.manager.get_object_filtered(Book, Book.name == self.songBookName)
@@ -350,27 +339,27 @@
         self.manager.save_object(song)
         # Now loop through the media files, copy them to the correct location,
         # and save the song again.
-        for filename, weight in self.mediaFiles:
+        for filename, weight in self.media_files:
             media_file = self.manager.get_object_filtered(MediaFile, MediaFile.file_name == filename)
             if not media_file:
                 if os.path.dirname(filename):
-                    filename = self.copyMediaFile(song.id, filename)
+                    filename = self.copy_media_file(song.id, filename)
                 song.media_files.append(MediaFile.populate(file_name=filename, weight=weight))
         self.manager.save_object(song)
         self.setDefaults()
         return True
 
-    def copyMediaFile(self, song_id, filename):
+    def copy_media_file(self, song_id, filename):
         """
         This method copies the media file to the correct location and returns
         the new file location.
-
-        ``filename``
-            The file to copy.
+  
+        :param song_id: Id of the song
+        :param filename: The file to copy.
         """
         if not hasattr(self, 'save_path'):
             self.save_path = os.path.join(AppLocation.get_section_data_path(self.import_wizard.plugin.name),
-                'audio', str(song_id))
+                                          'audio', str(song_id))
         check_directory_exists(self.save_path)
         if not filename.startswith(self.save_path):
             oldfile, filename = filename, os.path.join(self.save_path, os.path.split(filename)[1])

=== modified file 'openlp/plugins/songs/lib/songproimport.py'
--- openlp/plugins/songs/lib/songproimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/songproimport.py	2014-03-02 09:40:29 +0000
@@ -74,7 +74,7 @@
         """
         SongImport.__init__(self, manager, **kwargs)
 
-    def doImport(self):
+    def do_import(self):
         """
         Receive a single file or a list of files to import.
         """
@@ -89,13 +89,13 @@
                 file_line = str(file_line, 'cp1252')
                 file_text = file_line.rstrip()
                 if file_text and file_text[0] == '#':
-                    self.processSection(tag, text.rstrip())
+                    self.process_section(tag, text.rstrip())
                     tag = file_text[1:]
                     text = ''
                 else:
                     text += file_line
 
-    def processSection(self, tag, text):
+    def process_section(self, tag, text):
         """
         Process a section of the song, i.e. title, verse etc.
         """
@@ -141,6 +141,6 @@
                 elif '1' <= char <= '7':
                     self.verseOrderList.append('V' + char)
         elif tag == 'R':
-            self.addCopyright(text)
+            self.add_copyright(text)
         elif '1' <= tag <= '7':
-            self.addVerse(text, 'V' + tag[1:])
+            self.add_verse(text, 'V' + tag[1:])

=== modified file 'openlp/plugins/songs/lib/songshowplusimport.py'
--- openlp/plugins/songs/lib/songshowplusimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/songshowplusimport.py	2014-03-02 09:40:29 +0000
@@ -94,7 +94,7 @@
         """
         SongImport.__init__(self, manager, **kwargs)
 
-    def doImport(self):
+    def do_import(self):
         """
         Receive a single file or a list of files to import.
         """
@@ -140,12 +140,12 @@
                 elif block_key == AUTHOR:
                     authors = self.decode(data).split(" / ")
                     for author in authors:
-                        if author.find(",") !=-1:
-                            authorParts = author.split(", ")
-                            author = authorParts[1] + " " + authorParts[0]
+                        if author.find(",") != -1:
+                            author_parts = author.split(", ")
+                            author = author_parts[1] + " " + author_parts[0]
                         self.parse_author(author)
                 elif block_key == COPYRIGHT:
-                    self.addCopyright(self.decode(data))
+                    self.add_copyright(self.decode(data))
                 elif block_key == CCLI_NO:
                     self.ccliNumber = int(data)
                 elif block_key == VERSE:

=== modified file 'openlp/plugins/songs/lib/songstab.py'
--- openlp/plugins/songs/lib/songstab.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/songstab.py	2014-03-02 09:40:29 +0000
@@ -71,10 +71,10 @@
         self.mode_group_box.setTitle(translate('SongsPlugin.SongsTab', 'Songs Mode'))
         self.search_as_type_check_box.setText(translate('SongsPlugin.SongsTab', 'Enable search as you type'))
         self.tool_bar_active_check_box.setText(translate('SongsPlugin.SongsTab',
-            'Display verses on live tool bar'))
+                                               'Display verses on live tool bar'))
         self.update_on_edit_check_box.setText(translate('SongsPlugin.SongsTab', 'Update service from song edit'))
         self.add_from_service_check_box.setText(translate('SongsPlugin.SongsTab',
-            'Import missing songs from service files'))
+                                                'Import missing songs from service files'))
 
     def on_search_as_type_check_box_changed(self, check_state):
         self.song_search = (check_state == QtCore.Qt.Checked)

=== modified file 'openlp/plugins/songs/lib/sundayplusimport.py'
--- openlp/plugins/songs/lib/sundayplusimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/sundayplusimport.py	2014-03-02 09:40:29 +0000
@@ -48,6 +48,7 @@
     '+': 'b',
     'Z': 'o'}
 
+
 class SundayPlusImport(SongImport):
     """
     Import Sunday Plus songs
@@ -62,16 +63,16 @@
         SongImport.__init__(self, manager, **kwargs)
         self.encoding = 'us-ascii'
 
-    def doImport(self):
+    def do_import(self):
         self.import_wizard.progress_bar.setMaximum(len(self.import_source))
         for filename in self.import_source:
             if self.stop_import_flag:
                 return
             song_file = open(filename)
-            self.doImportFile(song_file)
+            self.do_import_file(song_file)
             song_file.close()
 
-    def doImportFile(self, file):
+    def do_import_file(self, file):
         """
         Process the Sunday Plus file object.
         """
@@ -80,11 +81,18 @@
             self.logError(file.name)
             return
         if not self.title:
-            self.title = self.titleFromFilename(file.name)
+            self.title = self.title_from_filename(file.name)
         if not self.finish():
             self.logError(file.name)
 
     def parse(self, data, cell=False):
+        """
+        Process the song data from the open file.
+
+        :param data: The file of data to be processed
+        :param cell:
+        :return:
+        """
         if len(data) == 0 or data[0:1] != '[' or data[-1] != ']':
             self.logError('File is malformed')
             return False
@@ -173,7 +181,13 @@
             i += 1
         return True
 
-    def titleFromFilename(self, filename):
+    def title_from_filename(self, filename):
+        """
+        Split the file name and extract the title
+
+        :param filename: File name to be processed
+        :return:
+        """
         title = os.path.split(filename)[1]
         if title.endswith('.ptf'):
             title = title[:-4]
@@ -183,6 +197,12 @@
         return title.replace('_', ' ')
 
     def decode(self, blob):
+        """
+        Decode a blob of data
+
+        :param blob: To be decoded
+        :return:
+        """
         while True:
             try:
                 return str(blob, self.encoding)
@@ -190,6 +210,12 @@
                 self.encoding = retrieve_windows_encoding()
 
     def unescape(self, text):
+        """
+        Remove ^ characters from text string
+
+        :param text: to be processed
+        :return:
+        """
         text = text.replace('^^', '"')
         text = text.replace('^', '\'')
         return text.strip()

=== modified file 'openlp/plugins/songs/lib/test/test_import_file.py'
--- openlp/plugins/songs/lib/test/test_import_file.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/test/test_import_file.py	2014-03-02 09:40:29 +0000
@@ -34,7 +34,7 @@
 
 import logging
 LOG_FILENAME = 'test_import_file.log'
-logging.basicConfig(filename=LOG_FILENAME,level=logging.INFO)
+logging.basicConfig(filename=LOG_FILENAME, level=logging.INFO)
 
 from test_opensongimport import wizard_stub
 

=== modified file 'openlp/plugins/songs/lib/worshipcenterproimport.py'
--- openlp/plugins/songs/lib/worshipcenterproimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/worshipcenterproimport.py	2014-03-02 09:40:29 +0000
@@ -51,7 +51,7 @@
         """
         SongImport.__init__(self, manager, **kwargs)
 
-    def doImport(self):
+    def do_import(self):
         """
         Receive a single file to import.
         """
@@ -61,7 +61,8 @@
             log.warn('Unable to connect the WorshipCenter Pro database %s. %s', self.import_source, str(e))
             # Unfortunately no specific exception type
             self.logError(self.import_source,
-                translate('SongsPlugin.WorshipCenterProImport', 'Unable to connect the WorshipCenter Pro database.'))
+                          translate('SongsPlugin.WorshipCenterProImport',
+                                    'Unable to connect the WorshipCenter Pro database.'))
             return
         cursor = conn.cursor()
         cursor.execute('SELECT ID, Field, Value FROM __SONGDATA')

=== modified file 'openlp/plugins/songs/lib/wowimport.py'
--- openlp/plugins/songs/lib/wowimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/wowimport.py	2014-03-02 09:40:29 +0000
@@ -101,7 +101,7 @@
         """
         SongImport.__init__(self, manager, **kwargs)
 
-    def doImport(self):
+    def do_import(self):
         """
         Receive a single file or a list of files to import.
         """
@@ -114,7 +114,7 @@
                 song_data = open(source, 'rb')
                 if song_data.read(19) != 'WoW File\nSong Words':
                     self.logError(source, str(translate('SongsPlugin.WordsofWorshipSongImport',
-                            ('Invalid Words of Worship song file. Missing "Wow File\\nSong Words" header.'))))
+                                  'Invalid Words of Worship song file. Missing "Wow File\\nSong Words" header.')))
                     continue
                 # Seek to byte which stores number of blocks in the song
                 song_data.seek(56)
@@ -122,20 +122,20 @@
                 song_data.seek(66)
                 if song_data.read(16) != 'CSongDoc::CBlock':
                     self.logError(source, str(translate('SongsPlugin.WordsofWorshipSongImport',
-                        ('Invalid Words of Worship song file. Missing "CSongDoc::CBlock" string.'))))
+                                  'Invalid Words of Worship song file. Missing "CSongDoc::CBlock" string.')))
                     continue
                 # Seek to the beginning of the first block
                 song_data.seek(82)
                 for block in range(no_of_blocks):
-                    self.linesToRead = ord(song_data.read(4)[:1])
+                    self.lines_to_read = ord(song_data.read(4)[:1])
                     block_text = ''
-                    while self.linesToRead:
-                        self.lineText = str(song_data.read(ord(song_data.read(1))), 'cp1252')
+                    while self.lines_to_read:
+                        self.line_text = str(song_data.read(ord(song_data.read(1))), 'cp1252')
                         song_data.seek(1, os.SEEK_CUR)
                         if block_text:
                             block_text += '\n'
-                        block_text += self.lineText
-                        self.linesToRead -= 1
+                        block_text += self.line_text
+                        self.lines_to_read -= 1
                     block_type = BLOCK_TYPES[ord(song_data.read(4)[:1])]
                     # Blocks are separated by 2 bytes, skip them, but not if
                     # this is the last block!
@@ -149,7 +149,7 @@
                 # Finally the copyright
                 copyright_length = ord(song_data.read(1))
                 if copyright_length:
-                    self.addCopyright(str(song_data.read(copyright_length), 'cp1252'))
+                    self.add_copyright(str(song_data.read(copyright_length), 'cp1252'))
                 file_name = os.path.split(source)[1]
                 # Get the song title
                 self.title = file_name.rpartition('.')[0]

=== modified file 'openlp/plugins/songs/lib/xml.py'
--- openlp/plugins/songs/lib/xml.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/xml.py	2014-03-02 09:40:29 +0000
@@ -97,21 +97,13 @@
         """
         Add a verse to the ``<lyrics>`` tag.
 
-        ``type``
-            A string denoting the type of verse. Possible values are *v*, *c*, *b*, *p*, *i*, *e* and *o*. Any other
+        :param type:  A string denoting the type of verse. Possible values are *v*, *c*, *b*, *p*, *i*, *e* and *o*. Any other
             type is **not** allowed, this also includes translated types.
-
-        ``number``
-            An integer denoting the number of the item, for example: verse 1.
-
-        ``content``
-            The actual text of the verse to be stored.
-
-        ``lang``
-            The verse's language code (ISO-639). This is not required, but should be added if available.
+        :param number: An integer denoting the number of the item, for example: verse 1.
+        :param content: The actual text of the verse to be stored.
+        :param lang: The verse's language code (ISO-639). This is not required, but should be added if available.
         """
-        verse = etree.Element('verse', type=str(type),
-            label=str(number))
+        verse = etree.Element('verse', type=str(type), label=str(number))
         if lang:
             verse.set('lang', lang)
         verse.text = etree.CDATA(content)
@@ -121,15 +113,13 @@
         """
         Extract our newly created XML song.
         """
-        return etree.tostring(self.song_xml, encoding='UTF-8',
-            xml_declaration=True)
+        return etree.tostring(self.song_xml, encoding='UTF-8', xml_declaration=True)
 
     def get_verses(self, xml):
         """
         Iterates through the verses in the XML and returns a list of verses and their attributes.
 
-        ``xml``
-            The XML of the song to be parsed.
+        :param xml:   The XML of the song to be parsed.
 
         The returned list has the following format::
 
@@ -351,8 +341,8 @@
 
         The first unicode string are the start tags (for the next slide). The second unicode string are the end tags.
 
-        ``text``
-            The text to test. The text must **not** contain html tags, only OpenLP formatting tags are allowed::
+        :param text: The text to test. The text must **not** contain html tags, only OpenLP formatting tags
+        are allowed::
 
                 {st}{r}Text text text
         """
@@ -378,11 +368,8 @@
         Create and save a song from OpenLyrics format xml to the database. Since we also export XML from external
         sources (e. g. OpenLyrics import), we cannot ensure, that it completely conforms to the OpenLyrics standard.
 
-        ``xml``
-            The XML to parse (unicode).
-
-        ``parse_and_temporary_save``
-            Switch to skip processing the whole song and storing the songs in the database with a temporary flag.
+        :param xml: The XML to parse (unicode).
+        :param parse_and_temporary_save: Switch to skip processing the whole song and storing the songs in the database with a temporary flag.
             Defaults to ``False``.
         """
         # No xml get out of here.
@@ -418,6 +405,15 @@
         return song
 
     def _add_text_to_element(self, tag, parent, text=None, label=None):
+        """
+        Update an element with some text
+
+        :param tag: Element Tag
+        :param parent: Parent Tag
+        :param text: Text to be added to the tag (Optional)
+        :param label: A label element (Optional)
+        :return:
+        """
         if label:
             element = etree.Element(tag, name=str(label))
         else:
@@ -430,6 +426,9 @@
     def _add_tag_to_formatting(self, tag_name, tags_element):
         """
         Add new formatting tag to the element ``<format>`` if the tag is not present yet.
+
+        :param tag_name: The tag name
+        :param tags_element: The tag elements
         """
         available_tags = FormattingTags.get_html_tags()
         start_tag = '{%s}' % tag_name
@@ -450,6 +449,10 @@
     def _add_text_with_tags_to_lines(self, verse_element, text, tags_element):
         """
         Convert text with formatting tags from OpenLP format to OpenLyrics format and append it to element ``<lines>``.
+
+        :param verse_element: The verse xml element
+        :param text: The text to add
+        :param tags_element: The formatting tags element
         """
         start_tags = OpenLyrics.START_TAGS_REGEX.findall(text)
         end_tags = OpenLyrics.END_TAGS_REGEX.findall(text)
@@ -477,16 +480,15 @@
     def _extract_xml(self, xml):
         """
         Extract our newly created XML song.
+        :param xml: The XML
         """
-        return etree.tostring(xml, encoding='UTF-8',
-            xml_declaration=True)
+        return etree.tostring(xml, encoding='UTF-8', xml_declaration=True)
 
     def _text(self, element):
         """
         This returns the text of an element as unicode string.
 
-        ``element``
-            The element.
+        :param element: The element.
         """
         if element.text is not None:
             return str(element.text)
@@ -496,11 +498,8 @@
         """
         Adds the authors specified in the XML to the song.
 
-        ``properties``
-            The property object (lxml.objectify.ObjectifiedElement).
-
-        ``song``
-            The song object.
+        :param properties: The property object (lxml.objectify.ObjectifiedElement).
+        :param song: The song object.
         """
         authors = []
         if hasattr(properties, 'authors'):
@@ -522,11 +521,8 @@
         """
         Adds the CCLI number to the song.
 
-        ``properties``
-            The property object (lxml.objectify.ObjectifiedElement).
-
-        ``song``
-            The song object.
+        :param properties: The property object (lxml.objectify.ObjectifiedElement).
+        :param song: The song object.
         """
         if hasattr(properties, 'ccliNo'):
             song.ccli_number = self._text(properties.ccliNo)
@@ -535,11 +531,8 @@
         """
         Joins the comments specified in the XML and add it to the song.
 
-        ``properties``
-            The property object (lxml.objectify.ObjectifiedElement).
-
-        ``song``
-            The song object.
+        :param properties: The property object (lxml.objectify.ObjectifiedElement).
+        :param song: The song object.
         """
         if hasattr(properties, 'comments'):
             comments_list = []
@@ -553,11 +546,8 @@
         """
         Adds the copyright to the song.
 
-        ``properties``
-            The property object (lxml.objectify.ObjectifiedElement).
-
-        ``song``
-            The song object.
+        :param properties: The property object (lxml.objectify.ObjectifiedElement).
+        :param song: The song object.
         """
         if hasattr(properties, 'copyright'):
             song.copyright = self._text(properties.copyright)
@@ -603,11 +593,9 @@
         Converts the xml text with mixed content to OpenLP representation. Chords are skipped and formatting tags are
         converted.
 
-        ``element``
-            The property object (lxml.etree.Element).
-
-        ``newlines``
-            The switch to enable/disable processing of line breaks <br/>. The <br/> is used since OpenLyrics 0.8.
+        :param element: The property object (lxml.etree.Element).
+        :param newlines: The switch to enable/disable processing of line breaks <br/>. The <br/> is used since
+        OpenLyrics 0.8.
         """
         text = ''
         use_endtag = True
@@ -655,8 +643,8 @@
         """
         Converts lyrics lines to OpenLP representation.
 
-        ``lines``
-            The lines object (lxml.objectify.ObjectifiedElement).
+        :param lines: The lines object (lxml.objectify.ObjectifiedElement).
+        :param version: The Version
         """
         text = ''
         # Convert lxml.objectify to lxml.etree representation.
@@ -682,14 +670,9 @@
         """
         Processes the verses and search_lyrics for the song.
 
-        ``properties``
-            The properties object (lxml.objectify.ObjectifiedElement).
-
-        ``song_xml``
-            The objectified song (lxml.objectify.ObjectifiedElement).
-
-        ``song_obj``
-            The song object.
+        :param properties: The properties object (lxml.objectify.ObjectifiedElement).
+        :param song_xml: The objectified song (lxml.objectify.ObjectifiedElement).
+        :param song_obj: The song object.
         """
         sxml = SongXML()
         verses = {}
@@ -698,12 +681,12 @@
             lyrics = song_xml.lyrics
         except AttributeError:
             raise OpenLyricsError(OpenLyricsError.LyricsError, '<lyrics> tag is missing.',
-                translate('OpenLP.OpenLyricsImportError', '<lyrics> tag is missing.'))
+                                  translate('OpenLP.OpenLyricsImportError', '<lyrics> tag is missing.'))
         try:
             verse_list = lyrics.verse
         except AttributeError:
             raise OpenLyricsError(OpenLyricsError.VerseError, '<verse> tag is missing.',
-                translate('OpenLP.OpenLyricsImportError', '<verse> tag is missing.'))
+                                  translate('OpenLP.OpenLyricsImportError', '<verse> tag is missing.'))
         # Loop over the "verse" elements.
         for verse in verse_list:
             text = ''
@@ -712,8 +695,7 @@
                 if text:
                     text += '\n'
                 # Append text from "lines" element to verse text.
-                text += self._process_verse_lines(lines,
-                    version=song_xml.get('version'))
+                text += self._process_verse_lines(lines, version=song_xml.get('version'))
                 # Add an optional split to the verse text.
                 if lines.get('break') is not None:
                     text += '\n[---]'
@@ -749,11 +731,8 @@
         """
         Adds the song book and song number specified in the XML to the song.
 
-        ``properties``
-            The property object (lxml.objectify.ObjectifiedElement).
-
-        ``song``
-            The song object.
+        :param properties: The property object (lxml.objectify.ObjectifiedElement).
+        :param song: The song object.
         """
         song.song_book_id = None
         song.song_number = ''
@@ -775,11 +754,8 @@
         """
         Processes the titles specified in the song's XML.
 
-        ``properties``
-            The property object (lxml.objectify.ObjectifiedElement).
-
-        ``song``
-            The song object.
+        :param properties: The property object (lxml.objectify.ObjectifiedElement).
+        :param song: The song object.
         """
         for title in properties.titles.title:
             if not song.title:
@@ -792,11 +768,8 @@
         """
         Adds the topics to the song.
 
-        ``properties``
-            The property object (lxml.objectify.ObjectifiedElement).
-
-        ``song``
-            The song object.
+        :param properties: The property object (lxml.objectify.ObjectifiedElement).
+        :param song: The song object.
         """
         if hasattr(properties, 'themes'):
             for topic_text in properties.themes.theme:

=== modified file 'openlp/plugins/songs/lib/zionworximport.py'
--- openlp/plugins/songs/lib/zionworximport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/zionworximport.py	2014-03-02 09:40:29 +0000
@@ -41,6 +41,7 @@
 # Used to strip control chars (except 10=LF, 13=CR)
 CONTROL_CHARS_MAP = dict.fromkeys(list(range(10)) + [11, 12] + list(range(14,32)) + [127])
 
+
 class ZionWorxImport(SongImport):
     """
     The :class:`ZionWorxImport` class provides the ability to import songs
@@ -78,19 +79,19 @@
     * Note: This is the default format of the Python ``csv`` module.
 
     """
-    def doImport(self):
+    def do_import(self):
         """
         Receive a CSV file (from a ZionWorx database dump) to import.
         """
         with open(self.import_source, 'rb') as songs_file:
             field_names = ['SongNum', 'Title1', 'Title2', 'Lyrics', 'Writer', 'Copyright', 'Keywords',
-                'DefaultStyle']
+                           'DefaultStyle']
             songs_reader = csv.DictReader(songs_file, field_names)
             try:
                 records = list(songs_reader)
             except csv.Error as e:
                 self.logError(translate('SongsPlugin.ZionWorxImport', 'Error reading CSV file.'),
-                    translate('SongsPlugin.ZionWorxImport', 'Line %d: %s') % (songs_reader.line_num, e))
+                              translate('SongsPlugin.ZionWorxImport', 'Line %d: %s') % (songs_reader.line_num, e))
                 return
             num_records = len(records)
             log.info('%s records found in CSV file' % num_records)
@@ -104,11 +105,11 @@
                     if record['Title2']:
                         self.alternate_title = self._decode(record['Title2'])
                     self.parse_author(self._decode(record['Writer']))
-                    self.addCopyright(self._decode(record['Copyright']))
+                    self.add_copyright(self._decode(record['Copyright']))
                     lyrics = self._decode(record['Lyrics'])
                 except UnicodeDecodeError as e:
                     self.logError(translate('SongsPlugin.ZionWorxImport', 'Record %d' % index),
-                        translate('SongsPlugin.ZionWorxImport', 'Decoding error: %s') % e)
+                                  translate('SongsPlugin.ZionWorxImport', 'Decoding error: %s') % e)
                     continue
                 except TypeError as e:
                     self.logError(translate(
@@ -126,7 +127,7 @@
                 title = self.title
                 if not self.finish():
                     self.logError(translate('SongsPlugin.ZionWorxImport', 'Record %d') % index
-                        + (': "' + title + '"' if title else ''))
+                                  + (': "' + title + '"' if title else ''))
 
     def _decode(self, str):
         """

=== modified file 'openlp/plugins/songs/songsplugin.py'
--- openlp/plugins/songs/songsplugin.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/songsplugin.py	2014-03-02 09:40:29 +0000
@@ -64,7 +64,7 @@
         'songs/display songbar': True,
         'songs/last directory import': '',
         'songs/last directory export': ''
-    }
+}
 
 
 class SongsPlugin(Plugin):
@@ -111,15 +111,14 @@
         Give the Songs plugin the opportunity to add items to the
         **Import** menu.
 
-        ``import_menu``
-            The actual **Import** menu item, so that your actions can
+        :param import_menu: The actual **Import** menu item, so that your actions can
             use it as their parent.
         """
         # Main song import menu item - will eventually be the only one
         self.song_import_item = create_action(import_menu, 'songImportItem',
-            text=translate('SongsPlugin', '&Song'),
-            tooltip=translate('SongsPlugin', 'Import songs using the import wizard.'),
-            triggers=self.on_song_import_item_clicked)
+                                              text=translate('SongsPlugin', '&Song'),
+                                              tooltip=translate('SongsPlugin', 'Import songs using the import wizard.'),
+                                              triggers=self.on_song_import_item_clicked)
         import_menu.addAction(self.song_import_item)
 
     def add_export_menu_Item(self, export_menu):
@@ -127,15 +126,15 @@
         Give the Songs plugin the opportunity to add items to the
         **Export** menu.
 
-        ``export_menu``
-            The actual **Export** menu item, so that your actions can
+        :param export_menu: The actual **Export** menu item, so that your actions can
             use it as their parent.
         """
         # Main song import menu item - will eventually be the only one
         self.song_export_item = create_action(export_menu, 'songExportItem',
-            text=translate('SongsPlugin', '&Song'),
-            tooltip=translate('SongsPlugin', 'Exports songs using the export wizard.'),
-            triggers=self.on_song_export_item_clicked)
+                                              text=translate('SongsPlugin', '&Song'),
+                                              tooltip=translate('SongsPlugin', 
+                                                                'Exports songs using the export wizard.'),
+                                              triggers=self.on_song_export_item_clicked)
         export_menu.addAction(self.song_export_item)
 
     def add_tools_menu_item(self, tools_menu):
@@ -143,33 +142,35 @@
         Give the Songs plugin the opportunity to add items to the
         **Tools** menu.
 
-        ``tools_menu``
-            The actual **Tools** menu item, so that your actions can
+        :param tools_menu: The actual **Tools** menu item, so that your actions can
             use it as their parent.
         """
         log.info('add tools menu')
         self.tools_reindex_item = create_action(tools_menu, 'toolsReindexItem',
-            text=translate('SongsPlugin', '&Re-index Songs'),
-            icon=':/plugins/plugin_songs.png',
-            statustip=translate('SongsPlugin', 'Re-index the songs database to improve searching and ordering.'),
-            visible=False, triggers=self.on_tools_reindex_item_triggered)
+                                                text=translate('SongsPlugin', '&Re-index Songs'),
+                                                icon=':/plugins/plugin_songs.png',
+                                                statustip=translate('SongsPlugin', 'Re-index the songs database to '
+                                                                                   'improve searching and ordering.'),
+                                                visible=False, triggers=self.on_tools_reindex_item_triggered)
         tools_menu.addAction(self.tools_reindex_item)
         self.tools_find_duplicates = create_action(tools_menu, 'toolsFindDuplicates',
-            text=translate('SongsPlugin', 'Find &Duplicate Songs'),
-            statustip=translate('SongsPlugin',
-            'Find and remove duplicate songs in the song database.'),
-            visible=False, triggers=self.on_tools_find_duplicates_triggered, can_shortcuts=True)
+                                                   text=translate('SongsPlugin', 'Find &Duplicate Songs'),
+                                                   statustip=translate('SongsPlugin',
+                                                                       'Find and remove duplicate songs in the '
+                                                                       'song database.'),
+                                                   visible=False, triggers=self.on_tools_find_duplicates_triggered, 
+                                                   can_shortcuts=True)
         tools_menu.addAction(self.tools_find_duplicates)
 
     def on_tools_reindex_item_triggered(self):
         """
         Rebuild each song.
         """
-        maxSongs = self.manager.get_object_count(Song)
-        if maxSongs == 0:
+        max_songs = self.manager.get_object_count(Song)
+        if max_songs == 0:
             return
         progress_dialog = QtGui.QProgressDialog(translate('SongsPlugin', 'Reindexing songs...'), UiStrings().Cancel,
-            0, maxSongs, self.main_window)
+                                                0, max_songs, self.main_window)
         progress_dialog.setWindowTitle(translate('SongsPlugin', 'Reindexing songs'))
         progress_dialog.setWindowModality(QtCore.Qt.WindowModal)
         songs = self.manager.get_all_objects(Song)
@@ -195,35 +196,39 @@
 
     def about(self):
         return translate('SongsPlugin', '<strong>Songs Plugin</strong>'
-            '<br />The songs plugin provides the ability to display and manage songs.')
+                         '<br />The songs plugin provides the ability to display and manage songs.')
 
     def uses_theme(self, theme):
         """
         Called to find out if the song plugin is currently using a theme.
 
         Returns True if the theme is being used, otherwise returns False.
+        :param theme: Theme name to be checked
         """
         if self.manager.get_all_objects(Song, Song.theme_name == theme):
             return True
         return False
 
-    def rename_theme(self, oldTheme, newTheme):
+    def rename_theme(self, old_theme, new_theme):
         """
         Renames a theme the song plugin is using making the plugin use the new
         name.
 
-        ``oldTheme``
-            The name of the theme the plugin should stop using.
-
-        ``newTheme``
-            The new name the plugin should now use.
+        :param old_theme: The name of the theme the plugin should stop using.
+        :param new_theme: The new name the plugin should now use.
         """
-        songsUsingTheme = self.manager.get_all_objects(Song, Song.theme_name == oldTheme)
-        for song in songsUsingTheme:
-            song.theme_name = newTheme
+        songs_using_theme = self.manager.get_all_objects(Song, Song.theme_name == old_theme)
+        for song in songs_using_theme:
+            song.theme_name = new_theme
             self.manager.save_object(song)
 
-    def importSongs(self, format, **kwargs):
+    def import_songs(self, format, **kwargs):
+        """
+        Handle song Imported
+        :param format: 
+        :param kwargs: 
+        :return: 
+        """
         class_ = SongFormat.get(format, 'class')
         importer = class_(self.manager, **kwargs)
         importer.register(self.media_item.import_wizard)
@@ -272,7 +277,7 @@
             if sfile.startswith('songs_') and sfile.endswith('.sqlite'):
                 self.application.process_events()
                 song_dbs.append(os.path.join(db_dir, sfile))
-                song_count += self._countSongs(os.path.join(db_dir, sfile))
+                song_count += self._count_songs(os.path.join(db_dir, sfile))
         if not song_dbs:
             return
         self.application.process_events()
@@ -287,7 +292,7 @@
         self.application.process_events()
         for db in song_dbs:
             importer = OpenLPSongImport(self.manager, filename=db)
-            importer.doImport(progress)
+            importer.do_import(progress)
             self.application.process_events()
         progress.setValue(song_count)
         self.media_item.on_search_text_button_clicked()
@@ -319,7 +324,7 @@
         for song in songs:
             self.manager.delete_object(Song, song.id)
 
-    def _countSongs(self, db_file):
+    def _count_songs(self, db_file):
         """
         Provide a count of the songs in the database
         """

=== modified file 'tests/functional/openlp_plugins/songs/test_ewimport.py'
--- tests/functional/openlp_plugins/songs/test_ewimport.py	2013-12-24 08:56:50 +0000
+++ tests/functional/openlp_plugins/songs/test_ewimport.py	2014-03-02 09:40:29 +0000
@@ -115,6 +115,7 @@
     (5, b'\3', {'return': b'\3', 'read': (1, 1725), 'seek': (3220111360, (41, os.SEEK_CUR), 3220111408)}),
     (5, b'\4', {'return': b'', 'read': (), 'seek': ()})]
 
+
 class TestEasyWorshipSongImport(TestCase):
     """
     Test the functions in the :mod:`ewimport` module.
@@ -135,7 +136,7 @@
         self.assertIsNotNone(field_desc_entry, 'Import should not be none')
         self.assertEquals(field_desc_entry.name, name, 'FieldDescEntry.name should be the same as the name argument')
         self.assertEquals(field_desc_entry.field_type, field_type,
-            'FieldDescEntry.type should be the same as the typeargument')
+                          'FieldDescEntry.type should be the same as the type argument')
         self.assertEquals(field_desc_entry.size, size, 'FieldDescEntry.size should be the same as the size argument')
 
     def create_importer_test(self):
@@ -160,11 +161,11 @@
         with patch('openlp.plugins.songs.lib.ewimport.SongImport'):
             mocked_manager = MagicMock()
             importer = EasyWorshipSongImport(mocked_manager)
-            importer.fieldDescs = TEST_FIELD_DESCS
+            importer.field_descs = TEST_FIELD_DESCS
 
             # WHEN: Called with a field name that exists
             existing_fields = ['Title', 'Text Percentage Bottom', 'RecID', 'Default Background', 'Words',
-                'BK Bitmap', 'Last Modified']
+                               'BK Bitmap', 'Last Modified']
             for field_name in existing_fields:
 
                 # THEN: The item corresponding the index returned should have the same name attribute
@@ -178,7 +179,7 @@
         with patch('openlp.plugins.songs.lib.ewimport.SongImport'):
             mocked_manager = MagicMock()
             importer = EasyWorshipSongImport(mocked_manager)
-            importer.fieldDescs = TEST_FIELD_DESCS
+            importer.field_descs = TEST_FIELD_DESCS
 
             # WHEN: Called with a field name that does not exist
             non_existing_fields = ['BK Gradient Shading', 'BK Gradient Variant', 'Favorite', 'Copyright']
@@ -208,7 +209,7 @@
 
     def get_field_test(self):
         """
-        Test the :mod:`getField` module
+        Test the :mod:`get_field` module
         """
         # GIVEN: A mocked out SongImport class, a mocked out "manager", an encoding and some test data and known results
         with patch('openlp.plugins.songs.lib.ewimport.SongImport'):
@@ -216,20 +217,21 @@
             importer = EasyWorshipSongImport(mocked_manager)
             importer.encoding = TEST_DATA_ENCODING
             importer.fields = TEST_FIELDS
-            importer.fieldDescs = TEST_FIELD_DESCS
+            importer.field_descs = TEST_FIELD_DESCS
             field_results = [(0, b'A Heart Like Thine'), (1, 100), (2, 102), (3, True), (6, None), (7, None)]
 
             # WHEN: Called with test data
             for field_index, result in field_results:
-                return_value = importer.getField(field_index)
+                return_value = importer.get_field(field_index)
 
-            # THEN: getField should return the known results
+            # THEN: get_field should return the known results
                 self.assertEquals(return_value, result,
-                    'getField should return "%s" when called with "%s"' % (result, TEST_FIELDS[field_index]))
+                                  'get_field should return "%s" when called with "%s"' %
+                                  (result, TEST_FIELDS[field_index]))
 
     def get_memo_field_test(self):
         """
-        Test the :mod:`getField` module
+        Test the :mod:`get_field` module
         """
         for test_results in GET_MEMO_FIELD_TEST_RESULTS:
             # GIVEN: A mocked out SongImport class, a mocked out "manager", a mocked out memo_file and an encoding
@@ -237,20 +239,20 @@
                 mocked_manager = MagicMock()
                 mocked_memo_file = MagicMock()
                 importer = EasyWorshipSongImport(mocked_manager)
-                importer.memoFile = mocked_memo_file
+                importer.memo_file = mocked_memo_file
                 importer.encoding = TEST_DATA_ENCODING
 
                 # WHEN: Supplied with test fields and test field descriptions
                 importer.fields = TEST_FIELDS
-                importer.fieldDescs = TEST_FIELD_DESCS
+                importer.field_descs = TEST_FIELD_DESCS
                 field_index = test_results[0]
                 mocked_memo_file.read.return_value = test_results[1]
                 get_field_result = test_results[2]['return']
                 get_field_read_calls = test_results[2]['read']
                 get_field_seek_calls = test_results[2]['seek']
 
-                # THEN: getField should return the appropriate value with the appropriate mocked objects being called
-                self.assertEquals(importer.getField(field_index), get_field_result)
+                # THEN: get_field should return the appropriate value with the appropriate mocked objects being called
+                self.assertEquals(importer.get_field(field_index), get_field_result)
                 for call in get_field_read_calls:
                     mocked_memo_file.read.assert_any_call(call)
                 for call in get_field_seek_calls:
@@ -261,7 +263,7 @@
 
     def do_import_source_test(self):
         """
-        Test the :mod:`doImport` module opens the correct files
+        Test the :mod:`do_import` module opens the correct files
         """
         # GIVEN: A mocked out SongImport class, a mocked out "manager"
         with patch('openlp.plugins.songs.lib.ewimport.SongImport'), \
@@ -273,14 +275,14 @@
             # WHEN: Supplied with an import source
             importer.import_source = 'Songs.DB'
 
-            # THEN: doImport should return None having called os.path.isfile
-            self.assertIsNone(importer.doImport(), 'doImport should return None')
+            # THEN: do_import should return None having called os.path.isfile
+            self.assertIsNone(importer.do_import(), 'do_import should return None')
             mocked_os_path.isfile.assert_any_call('Songs.DB')
             mocked_os_path.isfile.assert_any_call('Songs.MB')
 
     def do_import_database_validity_test(self):
         """
-        Test the :mod:`doImport` module handles invalid database files correctly
+        Test the :mod:`do_import` module handles invalid database files correctly
         """
         # GIVEN: A mocked out SongImport class, os.path and a mocked out "manager"
         with patch('openlp.plugins.songs.lib.ewimport.SongImport'), \
@@ -293,13 +295,13 @@
             # WHEN: DB file size is less than 0x800
             mocked_os_path.getsize.return_value = 0x7FF
 
-            # THEN: doImport should return None having called os.path.isfile
-            self.assertIsNone(importer.doImport(), 'doImport should return None when db_size is less than 0x800')
+            # THEN: do_import should return None having called os.path.isfile
+            self.assertIsNone(importer.do_import(), 'do_import should return None when db_size is less than 0x800')
             mocked_os_path.getsize.assert_any_call('Songs.DB')
 
     def do_import_memo_validty_test(self):
         """
-        Test the :mod:`doImport` module handles invalid memo files correctly
+        Test the :mod:`do_import` module handles invalid memo files correctly
         """
         # GIVEN: A mocked out SongImport class, a mocked out "manager"
         with patch('openlp.plugins.songs.lib.ewimport.SongImport'), \
@@ -316,17 +318,17 @@
             struct_unpack_return_values = [(0, 0x700, 2, 0, 0), (0, 0x800, 0, 0, 0), (0, 0x800, 5, 0, 0)]
             mocked_struct.unpack.side_effect = struct_unpack_return_values
 
-            # THEN: doImport should return None having called closed the open files db and memo files.
+            # THEN: do_import should return None having called closed the open files db and memo files.
             for effect in struct_unpack_return_values:
-                self.assertIsNone(importer.doImport(), 'doImport should return None when db_size is less than 0x800')
+                self.assertIsNone(importer.do_import(), 'do_import should return None when db_size is less than 0x800')
                 self.assertEqual(mocked_open().close.call_count, 2,
-                    'The open db and memo files should have been closed')
+                                 'The open db and memo files should have been closed')
                 mocked_open().close.reset_mock()
                 self.assertIs(mocked_open().seek.called, False, 'db_file.seek should not have been called.')
 
     def code_page_to_encoding_test(self):
         """
-        Test the :mod:`doImport` converts the code page to the encoding correctly
+        Test the :mod:`do_import` converts the code page to the encoding correctly
         """
         # GIVEN: A mocked out SongImport class, a mocked out "manager"
         with patch('openlp.plugins.songs.lib.ewimport.SongImport'), \
@@ -345,8 +347,8 @@
                 mocked_struct.unpack.side_effect = struct_unpack_return_values
                 mocked_retrieve_windows_encoding.return_value = False
 
-                # THEN: doImport should return None having called retrieve_windows_encoding with the correct encoding.
-                self.assertIsNone(importer.doImport(), 'doImport should return None when db_size is less than 0x800')
+                # THEN: do_import should return None having called retrieve_windows_encoding with the correct encoding.
+                self.assertIsNone(importer.do_import(), 'do_import should return None when db_size is less than 0x800')
                 mocked_retrieve_windows_encoding.assert_call(encoding)
 
     def file_import_test(self):
@@ -369,8 +371,8 @@
             importer = EasyWorshipSongImportLogger(mocked_manager)
             importer.import_wizard = mocked_import_wizard
             importer.stop_import_flag = False
-            importer.addAuthor = mocked_add_author
-            importer.addVerse = mocked_add_verse
+            importer.add_author = mocked_add_author
+            importer.add_verse = mocked_add_verse
             importer.title = mocked_title
             importer.finish = mocked_finish
             importer.topics = []
@@ -378,9 +380,9 @@
             # WHEN: Importing each file
             importer.import_source = os.path.join(TEST_PATH, 'Songs.DB')
 
-            # THEN: doImport should return none, the song data should be as expected, and finish should have been
+            # THEN: do_import should return none, the song data should be as expected, and finish should have been
             #       called.
-            self.assertIsNone(importer.doImport(), 'doImport should return None when it has completed')
+            self.assertIsNone(importer.do_import(), 'do_import should return None when it has completed')
             for song_data in SONG_TEST_DATA:
                 title = song_data['title']
                 author_calls = song_data['authors']

=== modified file 'tests/functional/openlp_plugins/songs/test_songbeamerimport.py'
--- tests/functional/openlp_plugins/songs/test_songbeamerimport.py	2013-12-24 08:56:50 +0000
+++ tests/functional/openlp_plugins/songs/test_songbeamerimport.py	2014-03-02 09:40:29 +0000
@@ -73,7 +73,7 @@
 
     def invalid_import_source_test(self):
         """
-        Test SongBeamerImport.doImport handles different invalid import_source values
+        Test SongBeamerImport.do_import handles different invalid import_source values
         """
         # GIVEN: A mocked out SongImport class, and a mocked out "manager"
         with patch('openlp.plugins.songs.lib.songbeamerimport.SongImport'):
@@ -87,14 +87,15 @@
             for source in ['not a list', 0]:
                 importer.import_source = source
 
-                # THEN: doImport should return none and the progress bar maximum should not be set.
-                self.assertIsNone(importer.doImport(), 'doImport should return None when import_source is not a list')
+                # THEN: do_import should return none and the progress bar maximum should not be set.
+                self.assertIsNone(importer.do_import(), 'do_import should return None when import_source is not a '
+                                                        'list')
                 self.assertEquals(mocked_import_wizard.progress_bar.setMaximum.called, False,
-                                  'setMaxium on import_wizard.progress_bar should not have been called')
+                                  'setMaximum on import_wizard.progress_bar should not have been called')
 
     def valid_import_source_test(self):
         """
-        Test SongBeamerImport.doImport handles different invalid import_source values
+        Test SongBeamerImport.do_import handles different invalid import_source values
         """
         # GIVEN: A mocked out SongImport class, and a mocked out "manager"
         with patch('openlp.plugins.songs.lib.songbeamerimport.SongImport'):
@@ -107,10 +108,10 @@
             # WHEN: Import source is a list
             importer.import_source = ['List', 'of', 'files']
 
-            # THEN: doImport should return none and the progress bar setMaximum should be called with the length of
+            # THEN: do_import should return none and the progress bar setMaximum should be called with the length of
             #       import_source.
-            self.assertIsNone(importer.doImport(),
-                'doImport should return None when import_source is a list and stop_import_flag is True')
+            self.assertIsNone(importer.do_import(),
+                              'do_import should return None when import_source is a list and stop_import_flag is True')
             mocked_import_wizard.progress_bar.setMaximum.assert_called_with(len(importer.import_source))
 
     def file_import_test(self):
@@ -140,9 +141,9 @@
                 song_book_name = SONG_TEST_DATA[song_file]['song_book_name']
                 song_number = SONG_TEST_DATA[song_file]['song_number']
 
-                # THEN: doImport should return none, the song data should be as expected, and finish should have been
+                # THEN: do_import should return none, the song data should be as expected, and finish should have been
                 #       called.
-                self.assertIsNone(importer.doImport(), 'doImport should return None when it has completed')
+                self.assertIsNone(importer.do_import(), 'do_import should return None when it has completed')
                 self.assertEquals(importer.title, title, 'title for %s should be "%s"' % (song_file, title))
                 for verse_text, verse_tag in add_verse_calls:
                     mocked_add_verse.assert_any_call(verse_text, verse_tag)

=== modified file 'tests/functional/openlp_plugins/songs/test_songshowplusimport.py'
--- tests/functional/openlp_plugins/songs/test_songshowplusimport.py	2013-12-24 08:56:50 +0000
+++ tests/functional/openlp_plugins/songs/test_songshowplusimport.py	2014-03-02 09:40:29 +0000
@@ -74,7 +74,7 @@
 
     def invalid_import_source_test(self):
         """
-        Test SongShowPlusImport.doImport handles different invalid import_source values
+        Test SongShowPlusImport.do_import handles different invalid import_source values
         """
         # GIVEN: A mocked out SongImport class, and a mocked out "manager"
         with patch('openlp.plugins.songs.lib.songshowplusimport.SongImport'):
@@ -88,14 +88,15 @@
             for source in ['not a list', 0]:
                 importer.import_source = source
 
-                # THEN: doImport should return none and the progress bar maximum should not be set.
-                self.assertIsNone(importer.doImport(), 'doImport should return None when import_source is not a list')
+                # THEN: do_import should return none and the progress bar maximum should not be set.
+                self.assertIsNone(importer.do_import(), 'do_import should return None when import_source is not a '
+                                                         'list')
                 self.assertEquals(mocked_import_wizard.progress_bar.setMaximum.called, False,
                                   'setMaximum on import_wizard.progress_bar should not have been called')
 
     def valid_import_source_test(self):
         """
-        Test SongShowPlusImport.doImport handles different invalid import_source values
+        Test SongShowPlusImport.do_import handles different invalid import_source values
         """
         # GIVEN: A mocked out SongImport class, and a mocked out "manager"
         with patch('openlp.plugins.songs.lib.songshowplusimport.SongImport'):
@@ -108,10 +109,10 @@
             # WHEN: Import source is a list
             importer.import_source = ['List', 'of', 'files']
 
-            # THEN: doImport should return none and the progress bar setMaximum should be called with the length of
+            # THEN: do_import should return none and the progress bar setMaximum should be called with the length of
             #       import_source.
-            self.assertIsNone(importer.doImport(),
-                'doImport should return None when import_source is a list and stop_import_flag is True')
+            self.assertIsNone(importer.do_import(),
+                              'do_import should return None when import_source is a list and stop_import_flag is True')
             mocked_import_wizard.progress_bar.setMaximum.assert_called_with(len(importer.import_source))
 
     def to_openlp_verse_tag_test(self):

=== modified file 'tests/functional/openlp_plugins/songs/test_worshipcenterproimport.py'
--- tests/functional/openlp_plugins/songs/test_worshipcenterproimport.py	2013-12-24 08:56:50 +0000
+++ tests/functional/openlp_plugins/songs/test_worshipcenterproimport.py	2014-03-02 09:40:29 +0000
@@ -165,15 +165,15 @@
             pyodbc_errors = [pyodbc.DatabaseError, pyodbc.IntegrityError, pyodbc.InternalError, pyodbc.OperationalError]
             mocked_pyodbc_connect.side_effect = pyodbc_errors
 
-            # WHEN: Calling the doImport method
+            # WHEN: Calling the do_import method
             for effect in pyodbc_errors:
-                return_value = importer.doImport()
+                return_value = importer.do_import()
 
-                # THEN: doImport should return None, and pyodbc, translate & logError are called with known calls
-                self.assertIsNone(return_value, 'doImport should return None when pyodbc raises an exception.')
+                # THEN: do_import should return None, and pyodbc, translate & logError are called with known calls
+                self.assertIsNone(return_value, 'do_import should return None when pyodbc raises an exception.')
                 mocked_pyodbc_connect.assert_called_with( 'DRIVER={Microsoft Access Driver (*.mdb)};DBQ=import_source')
                 mocked_translate.assert_called_with('SongsPlugin.WorshipCenterProImport',
-                    'Unable to connect the WorshipCenter Pro database.')
+                                                    'Unable to connect the WorshipCenter Pro database.')
                 mocked_log_error.assert_called_with('import_source', 'Translated Text')
 
     def song_import_test(self):
@@ -198,13 +198,12 @@
             importer.stop_import_flag = False
             importer.finish = mocked_finish
 
-            # WHEN: Calling the doImport method
-            return_value = importer.doImport()
-
-
-            # THEN: doImport should return None, and pyodbc, import_wizard, importer.title and addVerse are called with
+            # WHEN: Calling the do_import method
+            return_value = importer.do_import()
+
+            # THEN: do_mport should return None, and pyodbc, import_wizard, importer.title and addVerse are called with
             #       known calls
-            self.assertIsNone(return_value, 'doImport should return None when pyodbc raises an exception.')
+            self.assertIsNone(return_value, 'do_import should return None when pyodbc raises an exception.')
             mocked_pyodbc.connect.assert_called_with('DRIVER={Microsoft Access Driver (*.mdb)};DBQ=import_source')
             mocked_pyodbc.connect().cursor.assert_any_call()
             mocked_pyodbc.connect().cursor().execute.assert_called_with('SELECT ID, Field, Value FROM __SONGDATA')
@@ -214,7 +213,7 @@
             for song_data in SONG_TEST_DATA:
                 title_value = song_data['title']
                 self.assertIn(title_value, importer._title_assignment_list,
-                    'title should have been set to %s' % title_value)
+                              'title should have been set to %s' % title_value)
                 verse_calls = song_data['verses']
                 add_verse_call_count += len(verse_calls)
                 for call in verse_calls:

=== modified file 'tests/helpers/songfileimport.py'
--- tests/helpers/songfileimport.py	2013-12-24 08:56:50 +0000
+++ tests/helpers/songfileimport.py	2014-03-02 09:40:29 +0000
@@ -50,9 +50,9 @@
         Patch and set up the mocks required.
         """
         self.add_copyright_patcher = patch(
-            'openlp.plugins.songs.lib.%s.%s.addCopyright' % (self.importer_module_name, self.importer_class_name))
+            'openlp.plugins.songs.lib.%s.%s.add_copyright' % (self.importer_module_name, self.importer_class_name))
         self.add_verse_patcher = patch(
-            'openlp.plugins.songs.lib.%s.%s.addVerse' % (self.importer_module_name, self.importer_class_name))
+            'openlp.plugins.songs.lib.%s.%s.add_verse' % (self.importer_module_name, self.importer_class_name))
         self.finish_patcher = patch(
             'openlp.plugins.songs.lib.%s.%s.finish' % (self.importer_module_name, self.importer_class_name))
         self.parse_author_patcher = patch(
@@ -106,9 +106,9 @@
         topics = self._get_data(result_data, 'topics')
         verse_order_list = self._get_data(result_data, 'verse_order_list')
 
-        # THEN: doImport should return none, the song data should be as expected, and finish should have been
+        # THEN: do_import should return none, the song data should be as expected, and finish should have been
         #       called.
-        self.assertIsNone(importer.doImport(), 'doImport should return None when it has completed')
+        self.assertIsNone(importer.do_import(), 'do_import should return None when it has completed')
         self.assertEquals(importer.title, title, 'title for %s should be "%s"' % (source_file_name, title))
         for author in author_calls:
             self.mocked_parse_author.assert_any_call(author)


Follow ups