diff --git a/openlp/__init__.py b/openlp/__init__.py
index ac5f063d4..98e847979 100644
--- a/openlp/__init__.py
+++ b/openlp/__init__.py
@@ -30,7 +30,6 @@
The :mod:`openlp` module contains all the project produced OpenLP functionality
"""
-import openlp.core
-import openlp.plugins
+from openlp import core, plugins
__all__ = ['core', 'plugins']
diff --git a/openlp/core/common/__init__.py b/openlp/core/common/__init__.py
index 8a8e6eef3..22207dec4 100644
--- a/openlp/core/common/__init__.py
+++ b/openlp/core/common/__init__.py
@@ -38,7 +38,7 @@ import traceback
from PyQt4 import QtCore
-log = logging.getLogger(__name__+'.__init__')
+log = logging.getLogger(__name__ + '.__init__')
FIRST_CAMEL_REGEX = re.compile('(.)([A-Z][a-z]+)')
@@ -76,6 +76,9 @@ def check_directory_exists(directory, do_not_log=False):
def get_frozen_path(frozen_option, non_frozen_option):
"""
Return a path based on the system status.
+
+ :param frozen_option:
+ :param non_frozen_option:
"""
if hasattr(sys, 'frozen') and sys.frozen == 1:
return frozen_option
diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py
index e6b7f4fe3..9561baff4 100644
--- a/openlp/core/lib/__init__.py
+++ b/openlp/core/lib/__init__.py
@@ -39,7 +39,7 @@ from PyQt4 import QtCore, QtGui, Qt
from openlp.core.common import translate
-log = logging.getLogger(__name__+'.__init__')
+log = logging.getLogger(__name__ + '.__init__')
class ServiceItemContext(object):
diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py
index 13d4b0bbb..4d7676ad6 100644
--- a/openlp/core/lib/mediamanageritem.py
+++ b/openlp/core/lib/mediamanageritem.py
@@ -168,29 +168,29 @@ class MediaManagerItem(QtGui.QWidget, RegistryProperties):
Create buttons for the media item toolbar
"""
toolbar_actions = []
- ## Import Button ##
+ # Import Button
if self.has_import_icon:
toolbar_actions.append(['Import', StringContent.Import,
':/general/general_import.png', self.on_import_click])
- ## Load Button ##
+ # Load Button
if self.has_file_icon:
toolbar_actions.append(['Load', StringContent.Load, ':/general/general_open.png', self.on_file_click])
- ## New Button ##
+ # New Button
if self.has_new_icon:
toolbar_actions.append(['New', StringContent.New, ':/general/general_new.png', self.on_new_click])
- ## Edit Button ##
+ # Edit Button
if self.has_edit_icon:
toolbar_actions.append(['Edit', StringContent.Edit, ':/general/general_edit.png', self.on_edit_click])
- ## Delete Button ##
+ # Delete Button
if self.has_delete_icon:
toolbar_actions.append(['Delete', StringContent.Delete,
':/general/general_delete.png', self.on_delete_click])
- ## Preview ##
+ # Preview
toolbar_actions.append(['Preview', StringContent.Preview,
':/general/general_preview.png', self.on_preview_click])
- ## Live Button ##
+ # Live Button
toolbar_actions.append(['Live', StringContent.Live, ':/general/general_live.png', self.on_live_click])
- ## Add to service Button ##
+ # Add to service Button
toolbar_actions.append(['Service', StringContent.Service, ':/general/general_add.png', self.on_add_click])
for action in toolbar_actions:
if action[0] == StringContent.Preview:
diff --git a/openlp/core/lib/plugin.py b/openlp/core/lib/plugin.py
index e14fe8bb0..1f459524c 100644
--- a/openlp/core/lib/plugin.py
+++ b/openlp/core/lib/plugin.py
@@ -101,7 +101,7 @@ class Plugin(QtCore.QObject, RegistryProperties):
``add_import_menu_item(import_menu)``
Add an item to the Import menu.
- ``add_export_menu_Item(export_menu)``
+ ``add_export_menu_item(export_menu)``
Add an item to the Export menu.
``create_settings_tab()``
@@ -226,7 +226,7 @@ class Plugin(QtCore.QObject, RegistryProperties):
"""
pass
- def add_export_menu_Item(self, export_menu):
+ def add_export_menu_item(self, export_menu):
"""
Create a menu item and add it to the "Export" menu.
@@ -329,22 +329,24 @@ class Plugin(QtCore.QObject, RegistryProperties):
def set_plugin_ui_text_strings(self, tooltips):
"""
Called to define all translatable texts of the plugin
+
+ :param tooltips:
"""
- ## Load Action ##
+ # Load Action
self.__set_name_text_string(StringContent.Load, UiStrings().Load, tooltips['load'])
- ## Import Action ##
+ # Import Action
self.__set_name_text_string(StringContent.Import, UiStrings().Import, tooltips['import'])
- ## New Action ##
+ # New Action
self.__set_name_text_string(StringContent.New, UiStrings().Add, tooltips['new'])
- ## Edit Action ##
+ # Edit Action
self.__set_name_text_string(StringContent.Edit, UiStrings().Edit, tooltips['edit'])
- ## Delete Action ##
+ # Delete Action
self.__set_name_text_string(StringContent.Delete, UiStrings().Delete, tooltips['delete'])
- ## Preview Action ##
+ # Preview Action
self.__set_name_text_string(StringContent.Preview, UiStrings().Preview, tooltips['preview'])
- ## Send Live Action ##
+ # Send Live Action
self.__set_name_text_string(StringContent.Live, UiStrings().Live, tooltips['live'])
- ## Add to Service Action ##
+ # Add to Service Action
self.__set_name_text_string(StringContent.Service, UiStrings().Service, tooltips['service'])
def __set_name_text_string(self, name, title, tooltip):
diff --git a/openlp/core/lib/pluginmanager.py b/openlp/core/lib/pluginmanager.py
index d24f07eac..474113c98 100644
--- a/openlp/core/lib/pluginmanager.py
+++ b/openlp/core/lib/pluginmanager.py
@@ -161,7 +161,7 @@ class PluginManager(RegistryMixin, OpenLPMixin, RegistryProperties):
"""
for plugin in self.plugins:
if plugin.status is not PluginStatus.Disabled:
- plugin.add_export_menu_Item(self.main_window.file_export_menu)
+ plugin.add_export_menu_item(self.main_window.file_export_menu)
def hook_tools_menu(self):
"""
diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py
index 5d7bf4053..17d11ef63 100644
--- a/openlp/core/lib/serviceitem.py
+++ b/openlp/core/lib/serviceitem.py
@@ -387,7 +387,7 @@ class ServiceItem(RegistryProperties):
self.will_auto_start = header.get('will_auto_start', False)
self.processor = header.get('processor', None)
self.has_original_files = True
- #TODO Remove me in 2,3 build phase
+ # TODO: Remove me in 2,3 build phase
if self.is_capable(ItemCapabilities.HasDetailedTitleDisplay):
self.capabilities.remove(ItemCapabilities.HasDetailedTitleDisplay)
self.processor = self.title
diff --git a/openlp/core/ui/exceptiondialog.py b/openlp/core/ui/exceptiondialog.py
index 4d7abe708..212fee4cd 100644
--- a/openlp/core/ui/exceptiondialog.py
+++ b/openlp/core/ui/exceptiondialog.py
@@ -95,15 +95,15 @@ class Ui_ExceptionDialog(object):
Translate the widgets on the fly.
"""
exception_dialog.setWindowTitle(translate('OpenLP.ExceptionDialog', 'Error Occurred'))
- self.description_explanation.setText(translate('OpenLP.ExceptionDialog',
- 'Please enter a description of what you were doing to cause this error '
- '\n(Minimum 20 characters)'))
- self.message_label.setText(translate('OpenLP.ExceptionDialog', 'Oops! '
- 'OpenLP hit a problem, and couldn\'t recover. The text in the box '
- 'below contains information that might be helpful to the OpenLP '
- 'developers, so please e-mail it to bugs@openlp.org, along with a '
- 'detailed description of what you were doing when the problem '
- 'occurred.'))
+ self.description_explanation.setText(
+ translate('OpenLP.ExceptionDialog', 'Please enter a description of what you were doing to cause this error '
+ '\n(Minimum 20 characters)'))
+ self.message_label.setText(
+ translate('OpenLP.ExceptionDialog', 'Oops! OpenLP hit a problem, and couldn\'t recover. The text in the '
+ 'box below contains information that might be helpful to the OpenLP '
+ 'developers, so please e-mail it to bugs@openlp.org, along with a '
+ 'detailed description of what you were doing when the problem '
+ 'occurred.'))
self.send_report_button.setText(translate('OpenLP.ExceptionDialog', 'Send E-Mail'))
self.save_report_button.setText(translate('OpenLP.ExceptionDialog', 'Save to File'))
self.attach_tile_button.setText(translate('OpenLP.ExceptionDialog', 'Attach File'))
diff --git a/openlp/core/ui/firsttimewizard.py b/openlp/core/ui/firsttimewizard.py
index 407842c48..1a270f931 100644
--- a/openlp/core/ui/firsttimewizard.py
+++ b/openlp/core/ui/firsttimewizard.py
@@ -211,9 +211,9 @@ class Ui_FirstTimeWizard(object):
first_time_wizard.setWindowTitle(translate('OpenLP.FirstTimeWizard', 'First Time Wizard'))
self.title_label.setText('%s' %
translate('OpenLP.FirstTimeWizard', 'Welcome to the First Time Wizard'))
- self.information_label.setText(translate('OpenLP.FirstTimeWizard',
- 'This wizard will help you to configure OpenLP for initial use. '
- 'Click the next button below to start.'))
+ self.information_label.setText(
+ translate('OpenLP.FirstTimeWizard', 'This wizard will help you to configure OpenLP for initial use. '
+ 'Click the next button below to start.'))
self.plugin_page.setTitle(translate('OpenLP.FirstTimeWizard', 'Activate required Plugins'))
self.plugin_page.setSubTitle(translate('OpenLP.FirstTimeWizard', 'Select the Plugins you wish to use. '))
self.songs_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Songs'))
diff --git a/openlp/core/ui/formattingtagform.py b/openlp/core/ui/formattingtagform.py
index b7153429d..be4247bc1 100644
--- a/openlp/core/ui/formattingtagform.py
+++ b/openlp/core/ui/formattingtagform.py
@@ -63,7 +63,6 @@ class FormattingTagForm(QtGui.QDialog, Ui_FormattingTagDialog, FormattingTagCont
self.services = FormattingTagController()
self.tag_table_widget.itemSelectionChanged.connect(self.on_row_selected)
self.new_button.clicked.connect(self.on_new_clicked)
- #self.save_button.clicked.connect(self.on_saved_clicked)
self.delete_button.clicked.connect(self.on_delete_clicked)
self.tag_table_widget.currentCellChanged.connect(self.on_current_cell_changed)
self.button_box.rejected.connect(self.close)
@@ -202,5 +201,4 @@ class FormattingTagForm(QtGui.QDialog, Ui_FormattingTagDialog, FormattingTagCont
if errors:
QtGui.QMessageBox.warning(self, translate('OpenLP.FormattingTagForm', 'Validation Error'), errors,
QtGui.QMessageBox.Ok)
- #self.tag_table_widget.selectRow(pre_row - 1)
self.tag_table_widget.resizeRowsToContents()
diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py
index 7bb445fb3..81e822c16 100644
--- a/openlp/core/ui/mainwindow.py
+++ b/openlp/core/ui/mainwindow.py
@@ -56,29 +56,27 @@ from openlp.core.ui.firsttimeform import FirstTimeForm
log = logging.getLogger(__name__)
MEDIA_MANAGER_STYLE = """
- QToolBox {
+QToolBox {
padding-bottom: 2px;
- }
- QToolBox::tab {
+}
+QToolBox::tab {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
- stop: 0 palette(button), stop: 0.5 palette(button),
- stop: 1.0 palette(mid));
- border: 1px groove palette(mid);
- border-radius: 5px;
- }
- QToolBox::tab:selected {
+ stop: 0 palette(button), stop: 1.0 palette(mid));
+ border: 1px solid palette(mid);
+ border-radius: 3px;
+}
+QToolBox::tab:selected {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
- stop: 0 palette(light), stop: 0.5 palette(midlight),
- stop: 1.0 palette(dark));
- border: 1px groove palette(dark);
+ stop: 0 palette(light), stop: 1.0 palette(button));
+ border: 1px solid palette(mid);
font-weight: bold;
- }
+}
"""
PROGRESSBAR_STYLE = """
- QProgressBar{
- height: 10px;
- }
+QProgressBar{
+ height: 10px;
+}
"""
@@ -369,7 +367,7 @@ class Ui_MainWindow(object):
self.settings_menu.setTitle(translate('OpenLP.MainWindow', '&Settings'))
self.settings_language_menu.setTitle(translate('OpenLP.MainWindow', '&Language'))
self.help_menu.setTitle(translate('OpenLP.MainWindow', '&Help'))
- self.media_manager_dock.setWindowTitle(translate('OpenLP.MainWindow', 'Media Manager'))
+ self.media_manager_dock.setWindowTitle(translate('OpenLP.MainWindow', 'Library'))
self.service_manager_dock.setWindowTitle(translate('OpenLP.MainWindow', 'Service Manager'))
self.theme_manager_dock.setWindowTitle(translate('OpenLP.MainWindow', 'Theme Manager'))
self.file_new_item.setText(translate('OpenLP.MainWindow', '&New'))
@@ -396,12 +394,12 @@ class Ui_MainWindow(object):
self.settings_shortcuts_item.setText(translate('OpenLP.MainWindow', 'Configure &Shortcuts...'))
self.formatting_tag_item.setText(translate('OpenLP.MainWindow', 'Configure &Formatting Tags...'))
self.settings_configure_item.setText(translate('OpenLP.MainWindow', '&Configure OpenLP...'))
- self.settings_export_item.setStatusTip(translate('OpenLP.MainWindow',
- 'Export OpenLP settings to a specified *.config file'))
+ self.settings_export_item.setStatusTip(
+ translate('OpenLP.MainWindow', 'Export OpenLP settings to a specified *.config file'))
self.settings_export_item.setText(translate('OpenLP.MainWindow', 'Settings'))
- self.settings_import_item.setStatusTip(translate('OpenLP.MainWindow',
- 'Import OpenLP settings from a specified *.config file previously '
- 'exported on this or another machine'))
+ self.settings_import_item.setStatusTip(
+ translate('OpenLP.MainWindow', 'Import OpenLP settings from a specified *.config file previously '
+ 'exported on this or another machine'))
self.settings_import_item.setText(translate('OpenLP.MainWindow', 'Settings'))
self.view_media_manager_item.setText(translate('OpenLP.MainWindow', '&Media Manager'))
self.view_media_manager_item.setToolTip(translate('OpenLP.MainWindow', 'Toggle Media Manager'))
@@ -862,7 +860,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow, RegistryProperties):
section = 'general'
section_key = section + "/" + key
# Make sure it's a valid section for us.
- if not section in setting_sections:
+ if section not in setting_sections:
continue
# We have a good file, import it.
for section_key in import_keys:
diff --git a/openlp/core/ui/media/__init__.py b/openlp/core/ui/media/__init__.py
index 1276c8662..8cc10b6a1 100644
--- a/openlp/core/ui/media/__init__.py
+++ b/openlp/core/ui/media/__init__.py
@@ -35,7 +35,7 @@ from openlp.core.common import Settings
from PyQt4 import QtCore
-log = logging.getLogger(__name__+'.__init__')
+log = logging.getLogger(__name__ + '.__init__')
class MediaState(object):
diff --git a/openlp/core/ui/media/mediacontroller.py b/openlp/core/ui/media/mediacontroller.py
index d846af0e4..0b065c131 100644
--- a/openlp/core/ui/media/mediacontroller.py
+++ b/openlp/core/ui/media/mediacontroller.py
@@ -137,7 +137,7 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties):
for player in list(self.media_players.values()):
if player.is_active:
for item in player.audio_extensions_list:
- if not item in self.audio_extensions_list:
+ if item not in self.audio_extensions_list:
self.audio_extensions_list.append(item)
suffix_list.append(item[2:])
self.video_extensions_list = []
@@ -184,8 +184,8 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties):
return False
saved_players, overridden_player = get_media_players()
invalid_media_players = \
- [mediaPlayer for mediaPlayer in saved_players if not mediaPlayer in self.media_players or
- not self.media_players[mediaPlayer].check_available()]
+ [media_player for media_player in saved_players if media_player not in self.media_players or
+ not self.media_players[media_player].check_available()]
if invalid_media_players:
for invalidPlayer in invalid_media_players:
saved_players.remove(invalidPlayer)
diff --git a/openlp/core/ui/media/webkitplayer.py b/openlp/core/ui/media/webkitplayer.py
index e3a522140..38e691494 100644
--- a/openlp/core/ui/media/webkitplayer.py
+++ b/openlp/core/ui/media/webkitplayer.py
@@ -174,34 +174,11 @@ FLASH_HTML = """
"""
-VIDEO_EXT = [
- '*.3gp',
- '*.3gpp',
- '*.3g2',
- '*.3gpp2',
- '*.aac',
- '*.flv',
- '*.f4a',
- '*.f4b',
- '*.f4p',
- '*.f4v',
- '*.mov',
- '*.m4a',
- '*.m4b',
- '*.m4p',
- '*.m4v',
- '*.mkv',
- '*.mp4',
- '*.ogv',
- '*.webm',
- '*.mpg', '*.wmv', '*.mpeg', '*.avi',
- '*.swf'
-]
+VIDEO_EXT = ['*.3gp', '*.3gpp', '*.3g2', '*.3gpp2', '*.aac', '*.flv', '*.f4a', '*.f4b', '*.f4p', '*.f4v', '*.mov',
+ '*.m4a', '*.m4b', '*.m4p', '*.m4v', '*.mkv', '*.mp4', '*.ogv', '*.webm', '*.mpg', '*.wmv', '*.mpeg',
+ '*.avi', '*.swf']
-AUDIO_EXT = [
- '*.mp3',
- '*.ogg'
-]
+AUDIO_EXT = ['*.mp3', '*.ogg']
class WebkitPlayer(MediaPlayer):
@@ -411,10 +388,9 @@ class WebkitPlayer(MediaPlayer):
"""
Return some information about this player
"""
- return(translate('Media.player', 'Webkit is a media player which runs '
- 'inside a web browser. This player allows text over video to be '
- 'rendered.') +
- '
' + translate('Media.player', 'Audio') +
- '
' + str(AUDIO_EXT) + '
' +
- translate('Media.player', 'Video') + '
' +
- str(VIDEO_EXT) + '
')
+ part1 = translate('Media.player', 'Webkit is a media player which runs inside a web browser. This player '
+ 'allows text over video to be rendered.')
+ part2 = translate('Media.player', 'Audio')
+ part3 = translate('Media.player', 'Video')
+ return part1 + '
' + part2 + '
' + str(AUDIO_EXT) + '
' + part3 + \
+ '
' + str(VIDEO_EXT) + '
'
diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py
index 4489360da..9bc63eae6 100644
--- a/openlp/core/ui/servicemanager.py
+++ b/openlp/core/ui/servicemanager.py
@@ -401,7 +401,7 @@ class ServiceManager(OpenLPMixin, RegistryMixin, QtGui.QWidget, Ui_ServiceManage
:param suffix_list: New Suffix's to be supported
"""
for suffix in suffix_list:
- if not suffix in self.suffixes:
+ if suffix not in self.suffixes:
self.suffixes.append(suffix)
def on_new_service_clicked(self, field=None):
@@ -631,7 +631,7 @@ class ServiceManager(OpenLPMixin, RegistryMixin, QtGui.QWidget, Ui_ServiceManage
for item in self.service_items:
self.main_window.increment_progress_bar()
service_item = item['service_item'].get_service_repr(self._save_lite)
- #TODO: check for file item on save.
+ # TODO: check for file item on save.
service.append({'serviceitem': service_item})
self.main_window.increment_progress_bar()
service_content = json.dumps(service)
@@ -756,8 +756,9 @@ class ServiceManager(OpenLPMixin, RegistryMixin, QtGui.QWidget, Ui_ServiceManage
items = json.load(file_to)
else:
critical_error_message_box(message=translate('OpenLP.ServiceManager',
- 'The service file you are trying to open is in an old format.\n '
- 'Please save it using OpenLP 2.0.2 or greater.'))
+ 'The service file you are trying to open is in an old '
+ 'format.\n Please save it using OpenLP 2.0.2 or '
+ 'greater.'))
return
file_to.close()
self.new_file()
diff --git a/openlp/core/ui/settingsform.py b/openlp/core/ui/settingsform.py
index 5aba66ef2..a1077e1f4 100644
--- a/openlp/core/ui/settingsform.py
+++ b/openlp/core/ui/settingsform.py
@@ -150,5 +150,5 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog, RegistryProperties):
:param function: The function to be called
"""
- if not function in self.processes:
+ if function not in self.processes:
self.processes.append(function)
diff --git a/openlp/core/ui/themelayoutdialog.py b/openlp/core/ui/themelayoutdialog.py
index bf6c1069a..023d6259c 100644
--- a/openlp/core/ui/themelayoutdialog.py
+++ b/openlp/core/ui/themelayoutdialog.py
@@ -44,7 +44,6 @@ class Ui_ThemeLayoutDialog(object):
Set up the UI
"""
themeLayoutDialog.setObjectName('themeLayoutDialogDialog')
- #themeLayoutDialog.resize(300, 200)
self.preview_layout = QtGui.QVBoxLayout(themeLayoutDialog)
self.preview_layout.setObjectName('preview_layout')
self.preview_area = QtGui.QWidget(themeLayoutDialog)
diff --git a/openlp/core/ui/themestab.py b/openlp/core/ui/themestab.py
index 32ed30303..1f54f984b 100644
--- a/openlp/core/ui/themestab.py
+++ b/openlp/core/ui/themestab.py
@@ -114,17 +114,19 @@ class ThemesTab(SettingsTab):
self.global_group_box.setTitle(translate('OpenLP.ThemesTab', 'Global Theme'))
self.level_group_box.setTitle(translate('OpenLP.ThemesTab', 'Theme Level'))
self.song_level_radio_button.setText(translate('OpenLP.ThemesTab', 'S&ong Level'))
- self.song_level_label.setText(translate('OpenLP.ThemesTab', 'Use the theme from each song '
- 'in the database. If a song doesn\'t have a theme associated with '
- 'it, then use the service\'s theme. If the service doesn\'t have '
- 'a theme, then use the global theme.'))
+ self.song_level_label.setText(
+ translate('OpenLP.ThemesTab', 'Use the theme from each song in the database. If a song doesn\'t have a '
+ 'theme associated with it, then use the service\'s theme. If the service '
+ 'doesn\'t have a theme, then use the global theme.'))
self.service_level_radio_button.setText(translate('OpenLP.ThemesTab', '&Service Level'))
- self.service_level_label.setText(translate('OpenLP.ThemesTab', 'Use the theme from the service, '
- 'overriding any of the individual songs\' themes. If the '
- 'service doesn\'t have a theme, then use the global theme.'))
+ self.service_level_label.setText(
+ translate('OpenLP.ThemesTab', 'Use the theme from the service, overriding any of the individual '
+ 'songs\' themes. If the service doesn\'t have a theme, then use the global '
+ 'theme.'))
self.global_level_radio_button.setText(translate('OpenLP.ThemesTab', '&Global Level'))
- self.global_level_label.setText(translate('OpenLP.ThemesTab', 'Use the global theme, overriding '
- 'any themes associated with either the service or the songs.'))
+ self.global_level_label.setText(translate('OpenLP.ThemesTab', 'Use the global theme, overriding any themes '
+ 'associated with either the service or the '
+ 'songs.'))
def load(self):
"""
diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py
index 746c50d71..a5b5f356a 100644
--- a/openlp/core/utils/__init__.py
+++ b/openlp/core/utils/__init__.py
@@ -56,7 +56,7 @@ if sys.platform != 'win32' and sys.platform != 'darwin':
from openlp.core.common import translate
-log = logging.getLogger(__name__+'.__init__')
+log = logging.getLogger(__name__ + '.__init__')
APPLICATION_VERSION = {}
IMAGES_FILTER = None
diff --git a/openlp/plugins/alerts/alertsplugin.py b/openlp/plugins/alerts/alertsplugin.py
index cf3b7d0ce..76efadf32 100644
--- a/openlp/plugins/alerts/alertsplugin.py
+++ b/openlp/plugins/alerts/alertsplugin.py
@@ -207,12 +207,12 @@ class AlertsPlugin(Plugin):
"""
Called to define all translatable texts of the plugin
"""
- ## Name PluginList ##
+ # Name PluginList
self.text_strings[StringContent.Name] = {
'singular': translate('AlertsPlugin', 'Alert', 'name singular'),
'plural': translate('AlertsPlugin', 'Alerts', 'name plural')
}
- ## Name for MediaDockManager, SettingsManager ##
+ # Name for MediaDockManager, SettingsManager
self.text_strings[StringContent.VisibleName] = {
'title': translate('AlertsPlugin', 'Alerts', 'container title')
}
diff --git a/openlp/plugins/bibles/bibleplugin.py b/openlp/plugins/bibles/bibleplugin.py
index 5a51be163..e7f1fdd56 100644
--- a/openlp/plugins/bibles/bibleplugin.py
+++ b/openlp/plugins/bibles/bibleplugin.py
@@ -88,8 +88,6 @@ class BiblePlugin(Plugin):
self.import_bible_item.setVisible(True)
action_list = ActionList.get_instance()
action_list.add_action(self.import_bible_item, UiStrings().Import)
- # Do not add the action to the list yet.
- #action_list.add_action(self.export_bible_item, UiStrings().Export)
# Set to invisible until we can export bibles
self.export_bible_item.setVisible(False)
self.tools_upgrade_item.setVisible(bool(self.manager.old_bible_databases))
@@ -104,7 +102,6 @@ class BiblePlugin(Plugin):
action_list = ActionList.get_instance()
action_list.remove_action(self.import_bible_item, UiStrings().Import)
self.import_bible_item.setVisible(False)
- #action_list.remove_action(self.export_bible_item, UiStrings().Export)
self.export_bible_item.setVisible(False)
def app_startup(self):
@@ -115,19 +112,27 @@ class BiblePlugin(Plugin):
if self.manager.old_bible_databases:
if QtGui.QMessageBox.information(
self.main_window, translate('OpenLP', 'Information'),
- translate('OpenLP', 'Bible format has changed.\nYou have to upgrade your existing Bibles.\n'
- 'Should OpenLP upgrade now?'),
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes | QtGui.QMessageBox.No)) == \
+ translate('OpenLP', 'Bible format has changed.\nYou have to upgrade your '
+ 'existing Bibles.\nShould OpenLP upgrade now?'),
+ QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes | QtGui.QMessageBox.No)) == \
QtGui.QMessageBox.Yes:
self.on_tools_upgrade_Item_triggered()
def add_import_menu_item(self, import_menu):
+ """
+
+ :param import_menu:
+ """
self.import_bible_item = create_action(import_menu, 'importBibleItem',
text=translate('BiblesPlugin', '&Bible'), visible=False,
triggers=self.on_bible_import_click)
import_menu.addAction(self.import_bible_item)
- def add_export_menu_Item(self, export_menu):
+ def add_export_menu_item(self, export_menu):
+ """
+
+ :param export_menu:
+ """
self.export_bible_item = create_action(export_menu, 'exportBibleItem',
text=translate('BiblesPlugin', '&Bible'), visible=False)
export_menu.addAction(self.export_bible_item)
@@ -190,12 +195,12 @@ class BiblePlugin(Plugin):
"""
Called to define all translatable texts of the plugin
"""
- ## Name PluginList ##
+ # Name PluginList
self.text_strings[StringContent.Name] = {
'singular': translate('BiblesPlugin', 'Bible', 'name singular'),
'plural': translate('BiblesPlugin', 'Bibles', 'name plural')
}
- ## Name for MediaDockManager, SettingsManager ##
+ # Name for MediaDockManager, SettingsManager
self.text_strings[StringContent.VisibleName] = {
'title': translate('BiblesPlugin', 'Bibles', 'container title')
}
diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py
index 8011c97c1..c94f6ec8c 100644
--- a/openlp/plugins/bibles/lib/db.py
+++ b/openlp/plugins/bibles/lib/db.py
@@ -649,10 +649,10 @@ class BiblesResourcesDB(QtCore.QObject, Manager):
'chapter, verse_count FROM chapters WHERE book_reference_id = ?', (book_ref_id,))
try:
return {
- 'id': chapters[chapter-1][0],
- 'book_reference_id': chapters[chapter-1][1],
- 'chapter': chapters[chapter-1][2],
- 'verse_count': chapters[chapter-1][3]
+ 'id': chapters[chapter - 1][0],
+ 'book_reference_id': chapters[chapter - 1][1],
+ 'chapter': chapters[chapter - 1][2],
+ 'verse_count': chapters[chapter - 1][3]
}
except (IndexError, TypeError):
return None
@@ -846,13 +846,13 @@ class AlternativeBookNamesDB(QtCore.QObject, Manager):
file_path = os.path.join(
AppLocation.get_directory(AppLocation.DataDir), 'bibles', 'alternative_book_names.sqlite')
if not os.path.exists(file_path):
- #create new DB, create table alternative_book_names
+ # create new DB, create table alternative_book_names
AlternativeBookNamesDB.conn = sqlite3.connect(file_path)
AlternativeBookNamesDB.conn.execute(
'CREATE TABLE alternative_book_names(id INTEGER NOT NULL, '
'book_reference_id INTEGER, language_id INTEGER, name VARCHAR(50), PRIMARY KEY (id))')
else:
- #use existing DB
+ # use existing DB
AlternativeBookNamesDB.conn = sqlite3.connect(file_path)
AlternativeBookNamesDB.cursor = AlternativeBookNamesDB.conn.cursor()
return AlternativeBookNamesDB.cursor
diff --git a/openlp/plugins/bibles/lib/http.py b/openlp/plugins/bibles/lib/http.py
index 340d8ef92..b15e11738 100644
--- a/openlp/plugins/bibles/lib/http.py
+++ b/openlp/plugins/bibles/lib/http.py
@@ -552,10 +552,10 @@ class HTTPBible(BibleDB, RegistryProperties):
self.application.set_busy_cursor()
search_results = self.get_chapter(book, reference[1])
if search_results and search_results.has_verse_list():
- ## We have found a book of the bible lets check to see
- ## if it was there. By reusing the returned book name
- ## we get a correct book. For example it is possible
- ## to request ac and get Acts back.
+ # We have found a book of the bible lets check to see
+ # if it was there. By reusing the returned book name
+ # we get a correct book. For example it is possible
+ # to request ac and get Acts back.
book_name = search_results.book
self.application.process_events()
# Check to see if book/chapter exists.
diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py
index 36357356b..a2cb1b594 100644
--- a/openlp/plugins/bibles/lib/mediaitem.py
+++ b/openlp/plugins/bibles/lib/mediaitem.py
@@ -480,6 +480,10 @@ class BibleMediaItem(MediaManagerItem):
self.reload_bibles()
def on_delete_click(self):
+ """
+ When the delete button is pressed
+ """
+ bible = None
if self.quickTab.isVisible():
bible = self.quickVersionComboBox.currentText()
elif self.advancedTab.isVisible():
@@ -488,8 +492,9 @@ class BibleMediaItem(MediaManagerItem):
if QtGui.QMessageBox.question(
self, UiStrings().ConfirmDelete,
translate('BiblesPlugin.MediaItem', 'Are you sure you want to completely delete "%s" Bible from '
- 'OpenLP?\n\nYou will need to re-import this Bible to use it again.') % bible,
- QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes | QtGui.QMessageBox.No),
+ 'OpenLP?\n\nYou will need to re-import this Bible to use it '
+ 'again.') % bible,
+ QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes | QtGui.QMessageBox.No),
QtGui.QMessageBox.Yes) == QtGui.QMessageBox.No:
return
self.plugin.manager.delete_bible(bible)
@@ -752,7 +757,7 @@ class BibleMediaItem(MediaManagerItem):
log.exception('The second_search_results does not have as many verses as the search_results.')
break
bible_text = '%s %d%s%d (%s, %s)' % (book, verse.chapter, verse_separator, verse.verse, version,
- second_version)
+ second_version)
else:
bible_text = '%s %d%s%d (%s)' % (book, verse.chapter, verse_separator, verse.verse, version)
bible_verse = QtGui.QListWidgetItem(bible_text)
diff --git a/openlp/plugins/bibles/lib/versereferencelist.py b/openlp/plugins/bibles/lib/versereferencelist.py
index 1d3877d1d..7cbba68fb 100644
--- a/openlp/plugins/bibles/lib/versereferencelist.py
+++ b/openlp/plugins/bibles/lib/versereferencelist.py
@@ -94,5 +94,5 @@ class VerseReferenceList(object):
result = result + ', ' + version['permission']
result = result.rstrip()
if result.endswith(','):
- return result[:len(result)-1]
+ return result[:len(result) - 1]
return result
diff --git a/openlp/plugins/custom/customplugin.py b/openlp/plugins/custom/customplugin.py
index eb7de530a..2065717cb 100644
--- a/openlp/plugins/custom/customplugin.py
+++ b/openlp/plugins/custom/customplugin.py
@@ -43,7 +43,7 @@ log = logging.getLogger(__name__)
__default_settings__ = {
'custom/db type': 'sqlite',
- 'custom/last search type': CustomSearch.Titles,
+ 'custom/last search type': CustomSearch.Titles,
'custom/display footer': True,
'custom/add custom from service': True
}
@@ -97,12 +97,12 @@ class CustomPlugin(Plugin):
"""
Called to define all translatable texts of the plugin
"""
- ## Name PluginList ##
+ # Name PluginList
self.text_strings[StringContent.Name] = {
'singular': translate('CustomPlugin', 'Custom Slide', 'name singular'),
'plural': translate('CustomPlugin', 'Custom Slides', 'name plural')
}
- ## Name for MediaDockManager, SettingsManager ##
+ # Name for MediaDockManager, SettingsManager
self.text_strings[StringContent.VisibleName] = {
'title': translate('CustomPlugin', 'Custom Slides', 'container title')
}
diff --git a/openlp/plugins/custom/forms/editcustomslideform.py b/openlp/plugins/custom/forms/editcustomslideform.py
index afce4887b..e6834dafb 100644
--- a/openlp/plugins/custom/forms/editcustomslideform.py
+++ b/openlp/plugins/custom/forms/editcustomslideform.py
@@ -1,4 +1,3 @@
-#lint:disable
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
diff --git a/openlp/plugins/custom/lib/customxmlhandler.py b/openlp/plugins/custom/lib/customxmlhandler.py
index ca42a705b..3e1880055 100644
--- a/openlp/plugins/custom/lib/customxmlhandler.py
+++ b/openlp/plugins/custom/lib/customxmlhandler.py
@@ -51,7 +51,7 @@ from lxml import etree, objectify
log = logging.getLogger(__name__)
-#TODO: These classes need to be refactored into a single class.
+# TODO: These classes need to be refactored into a single class.
class CustomXMLBuilder(object):
"""
This class builds the XML used to describe songs.
diff --git a/openlp/plugins/images/imageplugin.py b/openlp/plugins/images/imageplugin.py
index 693449530..08c31f53c 100644
--- a/openlp/plugins/images/imageplugin.py
+++ b/openlp/plugins/images/imageplugin.py
@@ -95,12 +95,12 @@ class ImagePlugin(Plugin):
"""
Called to define all translatable texts of the plugin.
"""
- ## Name PluginList ##
+ # Name PluginList
self.text_strings[StringContent.Name] = {
'singular': translate('ImagePlugin', 'Image', 'name singular'),
'plural': translate('ImagePlugin', 'Images', 'name plural')
}
- ## Name for MediaDockManager, SettingsManager ##
+ # Name for MediaDockManager, SettingsManager
self.text_strings[StringContent.VisibleName] = {'title': translate('ImagePlugin', 'Images', 'container title')}
# Middle Header Bar
tooltips = {
diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py
index 5e75d1477..87d8e3311 100644
--- a/openlp/plugins/media/lib/mediaitem.py
+++ b/openlp/plugins/media/lib/mediaitem.py
@@ -95,7 +95,6 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
self.reset_action.setToolTip(UiStrings().ResetLiveBG)
self.automatic = UiStrings().Automatic
self.display_type_label.setText(translate('MediaPlugin.MediaItem', 'Use Player:'))
- #self.rebuild_players()
def required_icons(self):
"""
@@ -141,7 +140,7 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
if index == 0:
set_media_players(player)
else:
- set_media_players(player, player[index-1])
+ set_media_players(player, player[index - 1])
def on_reset_click(self):
"""
diff --git a/openlp/plugins/media/mediaplugin.py b/openlp/plugins/media/mediaplugin.py
index 6cf241d1d..d0e082f53 100644
--- a/openlp/plugins/media/mediaplugin.py
+++ b/openlp/plugins/media/mediaplugin.py
@@ -73,12 +73,12 @@ class MediaPlugin(Plugin):
"""
Called to define all translatable texts of the plugin
"""
- ## Name PluginList ##
+ # Name PluginList
self.text_strings[StringContent.Name] = {
'singular': translate('MediaPlugin', 'Media', 'name singular'),
'plural': translate('MediaPlugin', 'Media', 'name plural')
}
- ## Name for MediaDockManager, SettingsManager ##
+ # Name for MediaDockManager, SettingsManager
self.text_strings[StringContent.VisibleName] = {
'title': translate('MediaPlugin', 'Media', 'container title')
}
diff --git a/openlp/plugins/presentations/lib/impresscontroller.py b/openlp/plugins/presentations/lib/impresscontroller.py
index c55873c5f..584c1401f 100644
--- a/openlp/plugins/presentations/lib/impresscontroller.py
+++ b/openlp/plugins/presentations/lib/impresscontroller.py
@@ -377,8 +377,6 @@ class ImpressDocument(PresentationDocument):
Stop the presentation, remove from screen.
"""
log.debug('stop presentation OpenOffice')
- # deactivate should hide the screen according to docs, but doesn't
- #self.control.deactivate()
self.presentation.end()
self.control = None
diff --git a/openlp/plugins/presentations/lib/pdfcontroller.py b/openlp/plugins/presentations/lib/pdfcontroller.py
index 597b7d78b..1365e59a9 100644
--- a/openlp/plugins/presentations/lib/pdfcontroller.py
+++ b/openlp/plugins/presentations/lib/pdfcontroller.py
@@ -74,7 +74,7 @@ class PdfController(PresentationController):
runlog = ''
log.debug('testing program_path: %s', program_path)
try:
- runlog = check_output([program_path, '--help'], stderr=STDOUT)
+ runlog = check_output([program_path, '--help'], stderr=STDOUT)
except CalledProcessError as e:
runlog = e.output
except Exception:
@@ -183,7 +183,7 @@ class PdfDocument(PresentationDocument):
self.image_files = []
self.num_pages = -1
- def gs_get_resolution(self, size):
+ def gs_get_resolution(self, size):
"""
Only used when using ghostscript
Ghostscript can't scale automatically while keeping aspect like mupdf, so we need
@@ -236,7 +236,7 @@ class PdfDocument(PresentationDocument):
if os.path.isfile(os.path.join(self.get_temp_folder(), 'mainslide001.png')):
created_files = sorted(os.listdir(self.get_temp_folder()))
for fn in created_files:
- if os.path.isfile(os.path.join(self.get_temp_folder(), fn)):
+ if os.path.isfile(os.path.join(self.get_temp_folder(), fn)):
self.image_files.append(os.path.join(self.get_temp_folder(), fn))
self.num_pages = len(self.image_files)
return True
diff --git a/openlp/plugins/presentations/lib/powerpointcontroller.py b/openlp/plugins/presentations/lib/powerpointcontroller.py
index d6447adce..09fdf2fcc 100644
--- a/openlp/plugins/presentations/lib/powerpointcontroller.py
+++ b/openlp/plugins/presentations/lib/powerpointcontroller.py
@@ -247,7 +247,7 @@ class PowerpointDocument(PresentationDocument):
Starts a presentation from the beginning.
"""
log.debug('start_presentation')
- #SlideShowWindow measures its size/position by points, not pixels
+ # SlideShowWindow measures its size/position by points, not pixels
try:
dpi = win32ui.GetActiveWindow().GetDC().GetDeviceCaps(88)
except win32ui.error:
diff --git a/openlp/plugins/presentations/lib/presentationtab.py b/openlp/plugins/presentations/lib/presentationtab.py
index 7d5c81366..590289014 100644
--- a/openlp/plugins/presentations/lib/presentationtab.py
+++ b/openlp/plugins/presentations/lib/presentationtab.py
@@ -175,10 +175,10 @@ class PresentationTab(SettingsTab):
if pdf_program == '':
enable_pdf_program = 0
if pdf_program != Settings().value(self.settings_section + '/pdf_program'):
- Settings().setValue(self.settings_section + '/pdf_program', pdf_program)
+ Settings().setValue(self.settings_section + '/pdf_program', pdf_program)
changed = True
if enable_pdf_program != Settings().value(self.settings_section + '/enable_pdf_program'):
- Settings().setValue(self.settings_section + '/enable_pdf_program', enable_pdf_program)
+ Settings().setValue(self.settings_section + '/enable_pdf_program', enable_pdf_program)
changed = True
if changed:
self.settings_form.register_post_process('mediaitem_suffix_reset')
diff --git a/openlp/plugins/presentations/presentationplugin.py b/openlp/plugins/presentations/presentationplugin.py
index de0a0c5a5..5e0d7395d 100644
--- a/openlp/plugins/presentations/presentationplugin.py
+++ b/openlp/plugins/presentations/presentationplugin.py
@@ -156,12 +156,12 @@ class PresentationPlugin(Plugin):
"""
Called to define all translatable texts of the plugin.
"""
- ## Name PluginList ##
+ # Name PluginList
self.text_strings[StringContent.Name] = {
'singular': translate('PresentationPlugin', 'Presentation', 'name singular'),
'plural': translate('PresentationPlugin', 'Presentations', 'name plural')
}
- ## Name for MediaDockManager, SettingsManager ##
+ # Name for MediaDockManager, SettingsManager
self.text_strings[StringContent.VisibleName] = {
'title': translate('PresentationPlugin', 'Presentations', 'container title')
}
diff --git a/openlp/plugins/remotes/remoteplugin.py b/openlp/plugins/remotes/remoteplugin.py
index 0e3825bdd..069e3e5ec 100644
--- a/openlp/plugins/remotes/remoteplugin.py
+++ b/openlp/plugins/remotes/remoteplugin.py
@@ -101,12 +101,12 @@ class RemotesPlugin(Plugin):
"""
Called to define all translatable texts of the plugin
"""
- ## Name PluginList ##
+ # Name PluginList
self.text_strings[StringContent.Name] = {
'singular': translate('RemotePlugin', 'Remote', 'name singular'),
'plural': translate('RemotePlugin', 'Remotes', 'name plural')
}
- ## Name for MediaDockManager, SettingsManager ##
+ # Name for MediaDockManager, SettingsManager
self.text_strings[StringContent.VisibleName] = {
'title': translate('RemotePlugin', 'Remote', 'container title')
}
diff --git a/openlp/plugins/songs/forms/duplicatesongremovalform.py b/openlp/plugins/songs/forms/duplicatesongremovalform.py
index 22299cde5..d85197223 100644
--- a/openlp/plugins/songs/forms/duplicatesongremovalform.py
+++ b/openlp/plugins/songs/forms/duplicatesongremovalform.py
@@ -114,7 +114,7 @@ class DuplicateSongRemovalForm(OpenLPWizard, RegistryProperties):
self.review_layout.addWidget(self.review_scroll_area)
self.review_page_id = self.addPage(self.review_page)
# Add a dummy page to the end, to prevent the finish button to appear and the next button do disappear on the
- #review page.
+ # review page.
self.dummy_page = QtGui.QWizardPage()
self.dummy_page_id = self.addPage(self.dummy_page)
@@ -217,12 +217,12 @@ class DuplicateSongRemovalForm(OpenLPWizard, RegistryProperties):
duplicate_added = False
for duplicate_group in self.duplicate_song_list:
# Skip the first song in the duplicate lists, since the first one has to be an earlier song.
- if search_song in duplicate_group and not duplicate_song in duplicate_group:
+ if search_song in duplicate_group and duplicate_song not in duplicate_group:
duplicate_group.append(duplicate_song)
duplicate_group_found = True
duplicate_added = True
break
- elif not search_song in duplicate_group and duplicate_song in duplicate_group:
+ elif search_song not in duplicate_group and duplicate_song in duplicate_group:
duplicate_group.append(search_song)
duplicate_group_found = True
duplicate_added = True
diff --git a/openlp/plugins/songs/forms/editsongform.py b/openlp/plugins/songs/forms/editsongform.py
index b655c0f73..60c6eae78 100644
--- a/openlp/plugins/songs/forms/editsongform.py
+++ b/openlp/plugins/songs/forms/editsongform.py
@@ -675,14 +675,13 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog, RegistryProperties):
separator = parts.find(':')
if separator >= 0:
verse_name = parts[0:separator].strip()
- verse_num = parts[separator+1:].strip()
+ verse_num = parts[separator + 1:].strip()
else:
verse_name = parts
verse_num = '1'
verse_index = VerseType.from_loose_input(verse_name)
verse_tag = VerseType.tags[verse_index]
# Later we need to handle v1a as well.
- #regex = re.compile(r'(\d+\w.)')
regex = re.compile(r'\D*(\d+)\D*')
match = regex.match(verse_num)
if match:
diff --git a/openlp/plugins/songs/forms/editverseform.py b/openlp/plugins/songs/forms/editverseform.py
index 038cff539..79a69a015 100644
--- a/openlp/plugins/songs/forms/editverseform.py
+++ b/openlp/plugins/songs/forms/editverseform.py
@@ -75,7 +75,7 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog):
text = self.verse_text_edit.toPlainText()
position = self.verse_text_edit.textCursor().position()
insert_string = '[---]'
- if position and text[position-1] != '\n':
+ if position and text[position - 1] != '\n':
insert_string = '\n' + insert_string
if position == len(text) or text[position] != '\n':
insert_string += '\n'
diff --git a/openlp/plugins/songs/forms/mediafilesdialog.py b/openlp/plugins/songs/forms/mediafilesdialog.py
index a0392e3db..3a1db39ed 100644
--- a/openlp/plugins/songs/forms/mediafilesdialog.py
+++ b/openlp/plugins/songs/forms/mediafilesdialog.py
@@ -66,8 +66,10 @@ class Ui_MediaFilesDialog(object):
def retranslateUi(self, media_files_dialog):
"""
Translate the UI on the fly.
+
+ :param media_files_dialog:
"""
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.'))
+ 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.'))
diff --git a/openlp/plugins/songs/forms/songexportform.py b/openlp/plugins/songs/forms/songexportform.py
index 4e345b750..589da4d33 100644
--- a/openlp/plugins/songs/forms/songexportform.py
+++ b/openlp/plugins/songs/forms/songexportform.py
@@ -152,9 +152,9 @@ class SongExportForm(OpenLPWizard):
self.setWindowTitle(translate('SongsPlugin.ExportWizardForm', 'Song Export Wizard'))
self.title_label.setText(WizardStrings.HeaderStyle %
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 OpenLyrics worship '
- 'song format.'))
+ self.information_label.setText(
+ translate('SongsPlugin.ExportWizardForm', 'This wizard will help to export your songs to the open and free '
+ 'OpenLyrics 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.'))
diff --git a/openlp/plugins/songs/lib/cclifileimport.py b/openlp/plugins/songs/lib/cclifileimport.py
index 0866a1cc7..5c1fbdcb2 100644
--- a/openlp/plugins/songs/lib/cclifileimport.py
+++ b/openlp/plugins/songs/lib/cclifileimport.py
@@ -270,13 +270,13 @@ class CCLIFileImport(SongImport):
verse_text = ''
verse_start = False
else:
- #line_number=0, song title
+ # line_number=0, song title
if line_number == 0:
self.title = clean_line
line_number += 1
- #line_number=1, verses
+ # line_number=1, verses
elif line_number == 1:
- #line_number=1, ccli number, first line after verses
+ # line_number=1, ccli number, first line after verses
if clean_line.startswith('CCLI'):
line_number += 1
ccli_parts = clean_line.split(' ')
@@ -319,21 +319,21 @@ class CCLIFileImport(SongImport):
# last part. Add l so as to keep the CRLF
verse_text = verse_text + line
else:
- #line_number=2, copyright
+ # line_number=2, copyright
if line_number == 2:
line_number += 1
if clean_line.startswith('©'):
self.copyright = clean_line
else:
song_author = clean_line
- #n=3, authors
+ # n=3, authors
elif line_number == 3:
line_number += 1
if song_author:
self.copyright = clean_line
else:
song_author = clean_line
- #line_number=4, comments lines before last line
+ # line_number=4, comments lines before last line
elif line_number == 4 and not clean_line.startswith('CCL'):
self.comments += clean_line
# split on known separators
diff --git a/openlp/plugins/songs/lib/ewimport.py b/openlp/plugins/songs/lib/ewimport.py
index cde0b1692..ca201279a 100644
--- a/openlp/plugins/songs/lib/ewimport.py
+++ b/openlp/plugins/songs/lib/ewimport.py
@@ -305,7 +305,7 @@ class EasyWorshipSongImport(SongImport):
elif field_desc.field_type == FieldType.Logical:
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('