From afaf54a1421332f03c3fd9ad8ee8eab45a145841 Mon Sep 17 00:00:00 2001 From: Simon Hanna Date: Sat, 9 Jan 2016 17:26:14 +0100 Subject: [PATCH] Fix pep8 errors --- openlp/core/common/settings.py | 9 ++- openlp/core/lib/renderer.py | 2 +- openlp/core/lib/screen.py | 2 +- openlp/core/ui/aboutform.py | 3 +- openlp/core/ui/exceptionform.py | 3 +- openlp/core/ui/filerenameform.py | 2 +- openlp/core/ui/firsttimelanguageform.py | 3 +- openlp/core/ui/formattingtagform.py | 3 +- openlp/core/ui/media/webkitplayer.py | 4 +- openlp/core/ui/pluginform.py | 3 +- openlp/core/ui/printserviceform.py | 2 +- openlp/core/ui/projector/editform.py | 3 +- openlp/core/ui/projector/sourceselectform.py | 6 +- openlp/core/ui/serviceitemeditform.py | 2 +- openlp/core/ui/servicemanager.py | 3 +- openlp/core/ui/servicenoteform.py | 2 +- openlp/core/ui/settingsform.py | 3 +- openlp/core/ui/shortcutlistform.py | 3 +- openlp/core/ui/starttimeform.py | 2 +- openlp/plugins/alerts/forms/alertform.py | 2 +- .../plugins/bibles/forms/bibleimportform.py | 4 +- openlp/plugins/bibles/forms/booknameform.py | 3 +- openlp/plugins/bibles/forms/editbibleform.py | 3 +- openlp/plugins/bibles/forms/languageform.py | 3 +- openlp/plugins/custom/forms/editcustomform.py | 3 +- .../custom/forms/editcustomslideform.py | 3 +- openlp/plugins/custom/lib/mediaitem.py | 2 +- openlp/plugins/images/forms/addgroupform.py | 3 +- .../plugins/images/forms/choosegroupform.py | 3 +- .../media/forms/mediaclipselectorform.py | 3 +- openlp/plugins/remotes/html/index.html | 8 +-- openlp/plugins/remotes/html/openlp.css | 4 ++ openlp/plugins/songs/forms/authorsform.py | 3 +- openlp/plugins/songs/forms/editsongform.py | 3 +- openlp/plugins/songs/forms/editverseform.py | 3 +- openlp/plugins/songs/forms/mediafilesform.py | 3 +- openlp/plugins/songs/forms/songbookform.py | 3 +- openlp/plugins/songs/forms/songexportform.py | 56 +++++++++---------- .../songs/forms/songmaintenanceform.py | 3 +- openlp/plugins/songs/forms/songselectform.py | 3 +- openlp/plugins/songs/forms/topicsform.py | 3 +- .../songs/lib/importers/foilpresenter.py | 1 - openlp/plugins/songs/lib/mediaitem.py | 2 +- .../songusage/forms/songusagedeleteform.py | 19 ++++--- .../songusage/forms/songusagedetailform.py | 3 +- openlp/plugins/songusage/songusageplugin.py | 2 +- .../openlp_core_lib/test_mediamanageritem.py | 1 - .../openlp_core_lib/test_projectordb.py | 1 - .../openlp_plugins/songs/test_songformat.py | 12 ++-- .../openlp_core_ui/test_projectoreditform.py | 2 - 50 files changed, 101 insertions(+), 126 deletions(-) diff --git a/openlp/core/common/settings.py b/openlp/core/common/settings.py index 0bedd69b6..68b0763df 100644 --- a/openlp/core/common/settings.py +++ b/openlp/core/common/settings.py @@ -252,7 +252,8 @@ class Settings(QtCore.QSettings): 'shortcuts/blankScreen': [QtGui.QKeySequence(QtCore.Qt.Key_Period)], 'shortcuts/collapse': [QtGui.QKeySequence(QtCore.Qt.Key_Minus)], 'shortcuts/desktopScreen': [QtGui.QKeySequence(QtCore.Qt.Key_D)], - 'shortcuts/delete': [QtGui.QKeySequence(QtGui.QKeySequence.Delete), QtGui.QKeySequence(QtCore.Qt.Key_Delete)], + 'shortcuts/delete': [QtGui.QKeySequence(QtGui.QKeySequence.Delete), + QtGui.QKeySequence(QtCore.Qt.Key_Delete)], 'shortcuts/down': [QtGui.QKeySequence(QtCore.Qt.Key_Down)], 'shortcuts/editSong': [], 'shortcuts/escapeItem': [QtGui.QKeySequence(QtCore.Qt.Key_Escape)], @@ -329,7 +330,8 @@ class Settings(QtCore.QSettings): 'shortcuts/moveBottom': [QtGui.QKeySequence(QtCore.Qt.Key_End)], 'shortcuts/moveDown': [QtGui.QKeySequence(QtCore.Qt.Key_PageDown)], 'shortcuts/nextTrackItem': [], - 'shortcuts/nextItem_live': [QtGui.QKeySequence(QtCore.Qt.Key_Down), QtGui.QKeySequence(QtCore.Qt.Key_PageDown)], + 'shortcuts/nextItem_live': [QtGui.QKeySequence(QtCore.Qt.Key_Down), + QtGui.QKeySequence(QtCore.Qt.Key_PageDown)], 'shortcuts/nextItem_preview': [QtGui.QKeySequence(QtCore.Qt.Key_Down), QtGui.QKeySequence(QtCore.Qt.Key_PageDown)], 'shortcuts/nextService': [QtGui.QKeySequence(QtCore.Qt.Key_Right)], @@ -339,7 +341,8 @@ class Settings(QtCore.QSettings): QtGui.QKeySequence(QtCore.Qt.ALT + QtCore.Qt.Key_F1)], 'shortcuts/openService': [], 'shortcuts/saveService': [], - 'shortcuts/previousItem_live': [QtGui.QKeySequence(QtCore.Qt.Key_Up), QtGui.QKeySequence(QtCore.Qt.Key_PageUp)], + 'shortcuts/previousItem_live': [QtGui.QKeySequence(QtCore.Qt.Key_Up), + QtGui.QKeySequence(QtCore.Qt.Key_PageUp)], 'shortcuts/playbackPause': [], 'shortcuts/playbackPlay': [], 'shortcuts/playbackStop': [], diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py index 7de76166d..0513b70e4 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -531,6 +531,7 @@ def words_split(line): line = line.replace('\n', ' ') return line.split(' ') + def get_start_tags(raw_text): """ Tests the given text for not closed formatting tags and returns a tuple consisting of three unicode strings:: @@ -566,4 +567,3 @@ def get_start_tags(raw_text): # Remove the indexes. html_tags = [tag[1] for tag in html_tags] return raw_text + ''.join(end_tags), ''.join(start_tags), ''.join(html_tags) - diff --git a/openlp/core/lib/screen.py b/openlp/core/lib/screen.py index 819ba9763..a527b3766 100644 --- a/openlp/core/lib/screen.py +++ b/openlp/core/lib/screen.py @@ -224,7 +224,7 @@ class ScreenList(object): y = window.y() + (window.height() // 2) for screen in self.screen_list: size = screen['size'] - if x >= size.x() and x <= (size.x() + size.width()) and y >= size.y() and y <= (size.y() + size.height()): + if size.x() <= x <= (size.x() + size.width()) and size.y() <= y <= (size.y() + size.height()): return screen['number'] def load_screen_settings(self): diff --git a/openlp/core/ui/aboutform.py b/openlp/core/ui/aboutform.py index 2c4eafb28..b376d4646 100644 --- a/openlp/core/ui/aboutform.py +++ b/openlp/core/ui/aboutform.py @@ -40,8 +40,7 @@ class AboutForm(QtWidgets.QDialog, UiAboutDialog): """ Do some initialisation stuff """ - super(AboutForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(AboutForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self._setup() def _setup(self): diff --git a/openlp/core/ui/exceptionform.py b/openlp/core/ui/exceptionform.py index a4cb39945..e985829ba 100644 --- a/openlp/core/ui/exceptionform.py +++ b/openlp/core/ui/exceptionform.py @@ -89,8 +89,7 @@ class ExceptionForm(QtWidgets.QDialog, Ui_ExceptionDialog, RegistryProperties): """ Constructor. """ - super(ExceptionForm, self).__init__(None, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(ExceptionForm, self).__init__(None, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) self.settings_section = 'crashreport' self.report_text = '**OpenLP Bug Report**\n' \ diff --git a/openlp/core/ui/filerenameform.py b/openlp/core/ui/filerenameform.py index bfe8dc3a6..3ab82cc12 100644 --- a/openlp/core/ui/filerenameform.py +++ b/openlp/core/ui/filerenameform.py @@ -39,7 +39,7 @@ class FileRenameForm(QtWidgets.QDialog, Ui_FileRenameDialog, RegistryProperties) Constructor """ super(FileRenameForm, self).__init__(Registry().get('main_window'), - QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) + QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self._setup() def _setup(self): diff --git a/openlp/core/ui/firsttimelanguageform.py b/openlp/core/ui/firsttimelanguageform.py index 07188ba5f..a55713bf0 100644 --- a/openlp/core/ui/firsttimelanguageform.py +++ b/openlp/core/ui/firsttimelanguageform.py @@ -37,8 +37,7 @@ class FirstTimeLanguageForm(QtWidgets.QDialog, Ui_FirstTimeLanguageDialog): """ Constructor """ - super(FirstTimeLanguageForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(FirstTimeLanguageForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) self.qm_list = LanguageManager.get_qm_list() self.language_combo_box.addItem('Autodetect') diff --git a/openlp/core/ui/formattingtagform.py b/openlp/core/ui/formattingtagform.py index acee3d56f..6fb658f06 100644 --- a/openlp/core/ui/formattingtagform.py +++ b/openlp/core/ui/formattingtagform.py @@ -51,8 +51,7 @@ class FormattingTagForm(QtWidgets.QDialog, Ui_FormattingTagDialog, FormattingTag """ Constructor """ - super(FormattingTagForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(FormattingTagForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) self._setup() diff --git a/openlp/core/ui/media/webkitplayer.py b/openlp/core/ui/media/webkitplayer.py index ec17b97ee..0a35fe085 100644 --- a/openlp/core/ui/media/webkitplayer.py +++ b/openlp/core/ui/media/webkitplayer.py @@ -326,10 +326,10 @@ class WebkitPlayer(MediaPlayer): controller = display.controller if controller.media_info.is_flash: seek = seek_value - display.frame.evaluateJavaScript('show_flash("seek", null, null, "%s");' % (seek)) + display.frame.evaluateJavaScript('show_flash("seek", null, null, "%s");' % seek) else: seek = float(seek_value) / 1000 - display.frame.evaluateJavaScript('show_video("seek", null, null, null, "%f");' % (seek)) + display.frame.evaluateJavaScript('show_video("seek", null, null, null, "%f");' % seek) def reset(self, display): """ diff --git a/openlp/core/ui/pluginform.py b/openlp/core/ui/pluginform.py index 03636a6da..9519838b2 100644 --- a/openlp/core/ui/pluginform.py +++ b/openlp/core/ui/pluginform.py @@ -41,8 +41,7 @@ class PluginForm(QtWidgets.QDialog, Ui_PluginViewDialog, RegistryProperties): """ Constructor """ - super(PluginForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(PluginForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.active_plugin = None self.programatic_change = False self.setupUi(self) diff --git a/openlp/core/ui/printserviceform.py b/openlp/core/ui/printserviceform.py index dd5548ea9..2d5b3d554 100644 --- a/openlp/core/ui/printserviceform.py +++ b/openlp/core/ui/printserviceform.py @@ -113,7 +113,7 @@ class PrintServiceForm(QtWidgets.QDialog, Ui_PrintServiceDialog, RegistryPropert Constructor """ super(PrintServiceForm, self).__init__(Registry().get('main_window'), - QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) + QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.printer = QtPrintSupport.QPrinter() self.print_dialog = QtPrintSupport.QPrintDialog(self.printer, self) self.document = QtGui.QTextDocument() diff --git a/openlp/core/ui/projector/editform.py b/openlp/core/ui/projector/editform.py index 54c80ae38..4b06f486f 100644 --- a/openlp/core/ui/projector/editform.py +++ b/openlp/core/ui/projector/editform.py @@ -144,8 +144,7 @@ class ProjectorEditForm(QDialog, Ui_ProjectorEditForm): editProjector = pyqtSignal(object) def __init__(self, parent=None, projectordb=None): - super(ProjectorEditForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(ProjectorEditForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.projectordb = projectordb self.setupUi(self) self.button_box.accepted.connect(self.accept_me) diff --git a/openlp/core/ui/projector/sourceselectform.py b/openlp/core/ui/projector/sourceselectform.py index c46a61413..11efcdb08 100644 --- a/openlp/core/ui/projector/sourceselectform.py +++ b/openlp/core/ui/projector/sourceselectform.py @@ -236,8 +236,7 @@ class SourceSelectTabs(QDialog): :param projectordb: ProjectorDB session to use """ log.debug('Initializing SourceSelectTabs()') - super(SourceSelectTabs, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(SourceSelectTabs, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setMinimumWidth(350) self.projectordb = projectordb self.edit = edit @@ -386,8 +385,7 @@ class SourceSelectSingle(QDialog): """ log.debug('Initializing SourceSelectSingle()') self.projectordb = projectordb - super(SourceSelectSingle, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(SourceSelectSingle, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.edit = edit if self.edit: title = translate('OpenLP.SourceSelectForm', 'Edit Projector Source Text') diff --git a/openlp/core/ui/serviceitemeditform.py b/openlp/core/ui/serviceitemeditform.py index cb0652ff2..e7e2d9e6e 100644 --- a/openlp/core/ui/serviceitemeditform.py +++ b/openlp/core/ui/serviceitemeditform.py @@ -38,7 +38,7 @@ class ServiceItemEditForm(QtWidgets.QDialog, Ui_ServiceItemEditDialog, RegistryP Constructor """ super(ServiceItemEditForm, self).__init__(Registry().get('main_window'), - QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) + QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) self.item_list = [] self.list_widget.currentRowChanged.connect(self.on_current_row_changed) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index bec2340ce..caba6536b 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -1131,6 +1131,7 @@ class ServiceManager(OpenLPMixin, RegistryMixin, QtWidgets.QWidget, Ui_ServiceMa :param item: The service item to be checked """ pos = item.data(0, QtCore.Qt.UserRole) + print('{}: {}; {}'.format(pos, len(self.service_items), item.text())) self.service_items[pos - 1]['expanded'] = False def on_expand_all(self, field=None): @@ -1149,6 +1150,7 @@ class ServiceManager(OpenLPMixin, RegistryMixin, QtWidgets.QWidget, Ui_ServiceMa :param item: The service item to be checked """ pos = item.data(0, QtCore.Qt.UserRole) + print('{}: {}; {}'.format(pos, len(self.service_items), item.text())) self.service_items[pos - 1]['expanded'] = True def on_service_top(self, field=None): @@ -1666,4 +1668,3 @@ def get_parent_item_data(item): return item.data(0, QtCore.Qt.UserRole) else: return parent_item.data(0, QtCore.Qt.UserRole) - diff --git a/openlp/core/ui/servicenoteform.py b/openlp/core/ui/servicenoteform.py index c62d3fe08..e998304f8 100644 --- a/openlp/core/ui/servicenoteform.py +++ b/openlp/core/ui/servicenoteform.py @@ -38,7 +38,7 @@ class ServiceNoteForm(QtWidgets.QDialog, RegistryProperties): Constructor """ super(ServiceNoteForm, self).__init__(Registry().get('main_window'), - QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) + QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi() self.retranslateUi() diff --git a/openlp/core/ui/settingsform.py b/openlp/core/ui/settingsform.py index 9e4ec87f0..f8c3cbbc2 100644 --- a/openlp/core/ui/settingsform.py +++ b/openlp/core/ui/settingsform.py @@ -46,8 +46,7 @@ class SettingsForm(QtWidgets.QDialog, Ui_SettingsDialog, RegistryProperties): """ Registry().register('settings_form', self) Registry().register_function('bootstrap_post_set_up', self.bootstrap_post_set_up) - super(SettingsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(SettingsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.processes = [] self.setupUi(self) self.setting_list_widget.currentRowChanged.connect(self.list_item_changed) diff --git a/openlp/core/ui/shortcutlistform.py b/openlp/core/ui/shortcutlistform.py index 26b062d5e..dc91fa481 100644 --- a/openlp/core/ui/shortcutlistform.py +++ b/openlp/core/ui/shortcutlistform.py @@ -44,8 +44,7 @@ class ShortcutListForm(QtWidgets.QDialog, Ui_ShortcutListDialog, RegistryPropert """ Constructor """ - super(ShortcutListForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(ShortcutListForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) self.changed_actions = {} self.action_list = ActionList.get_instance() diff --git a/openlp/core/ui/starttimeform.py b/openlp/core/ui/starttimeform.py index 41e1efa5f..f6238a340 100644 --- a/openlp/core/ui/starttimeform.py +++ b/openlp/core/ui/starttimeform.py @@ -39,7 +39,7 @@ class StartTimeForm(QtWidgets.QDialog, Ui_StartTimeDialog, RegistryProperties): Constructor """ super(StartTimeForm, self).__init__(Registry().get('main_window'), - QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) + QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) def exec(self): diff --git a/openlp/plugins/alerts/forms/alertform.py b/openlp/plugins/alerts/forms/alertform.py index 593eb4b46..cb711b410 100644 --- a/openlp/plugins/alerts/forms/alertform.py +++ b/openlp/plugins/alerts/forms/alertform.py @@ -37,7 +37,7 @@ class AlertForm(QtWidgets.QDialog, Ui_AlertDialog): Initialise the alert form """ super(AlertForm, self).__init__(Registry().get('main_window'), - QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) + QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.manager = plugin.manager self.plugin = plugin self.item_id = None diff --git a/openlp/plugins/bibles/forms/bibleimportform.py b/openlp/plugins/bibles/forms/bibleimportform.py index cfaeba7d5..52417f2ef 100644 --- a/openlp/plugins/bibles/forms/bibleimportform.py +++ b/openlp/plugins/bibles/forms/bibleimportform.py @@ -69,8 +69,8 @@ class BibleImportForm(OpenLPWizard): """ self.manager = manager self.web_bible_list = {} - super(BibleImportForm, self).__init__( - parent, bible_plugin, 'bibleImportWizard', ':/wizards/wizard_importbible.bmp') + super(BibleImportForm, self).__init__(parent, bible_plugin, + 'bibleImportWizard', ':/wizards/wizard_importbible.bmp') def setupUi(self, image): """ diff --git a/openlp/plugins/bibles/forms/booknameform.py b/openlp/plugins/bibles/forms/booknameform.py index 66f899af0..67565c915 100644 --- a/openlp/plugins/bibles/forms/booknameform.py +++ b/openlp/plugins/bibles/forms/booknameform.py @@ -49,8 +49,7 @@ class BookNameForm(QDialog, Ui_BookNameDialog): """ Constructor """ - super(BookNameForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(BookNameForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) self.custom_signals() self.book_names = BibleStrings().BookNames diff --git a/openlp/plugins/bibles/forms/editbibleform.py b/openlp/plugins/bibles/forms/editbibleform.py index d1ca5b241..9eb64ee19 100644 --- a/openlp/plugins/bibles/forms/editbibleform.py +++ b/openlp/plugins/bibles/forms/editbibleform.py @@ -45,8 +45,7 @@ class EditBibleForm(QtWidgets.QDialog, Ui_EditBibleDialog, RegistryProperties): """ Constructor """ - super(EditBibleForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(EditBibleForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.media_item = media_item self.book_names = BibleStrings().BookNames self.setupUi(self) diff --git a/openlp/plugins/bibles/forms/languageform.py b/openlp/plugins/bibles/forms/languageform.py index 040d73fa9..461f02c74 100644 --- a/openlp/plugins/bibles/forms/languageform.py +++ b/openlp/plugins/bibles/forms/languageform.py @@ -47,8 +47,7 @@ class LanguageForm(QDialog, Ui_LanguageDialog): """ Constructor """ - super(LanguageForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(LanguageForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) def exec(self, bible_name): diff --git a/openlp/plugins/custom/forms/editcustomform.py b/openlp/plugins/custom/forms/editcustomform.py index dfde3126f..3aaee5290 100644 --- a/openlp/plugins/custom/forms/editcustomform.py +++ b/openlp/plugins/custom/forms/editcustomform.py @@ -44,8 +44,7 @@ class EditCustomForm(QtWidgets.QDialog, Ui_CustomEditDialog): """ Constructor """ - super(EditCustomForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(EditCustomForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.manager = manager self.media_item = media_item self.setupUi(self) diff --git a/openlp/plugins/custom/forms/editcustomslideform.py b/openlp/plugins/custom/forms/editcustomslideform.py index d1c8597d3..c57715adb 100644 --- a/openlp/plugins/custom/forms/editcustomslideform.py +++ b/openlp/plugins/custom/forms/editcustomslideform.py @@ -39,8 +39,7 @@ class EditCustomSlideForm(QtWidgets.QDialog, Ui_CustomSlideEditDialog): """ Constructor """ - super(EditCustomSlideForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(EditCustomSlideForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) # Connecting signals and slots self.insert_button.clicked.connect(self.on_insert_button_clicked) diff --git a/openlp/plugins/custom/lib/mediaitem.py b/openlp/plugins/custom/lib/mediaitem.py index b5b536603..225226f7d 100644 --- a/openlp/plugins/custom/lib/mediaitem.py +++ b/openlp/plugins/custom/lib/mediaitem.py @@ -190,7 +190,7 @@ class CustomMediaItem(MediaManagerItem): if QtWidgets.QMessageBox.question( self, UiStrings().ConfirmDelete, translate('CustomPlugin.MediaItem', - 'Are you sure you want to delete the "%d" selected custom slide(s)?') %len(items), + 'Are you sure you want to delete the "%d" selected custom slide(s)?') % len(items), QtWidgets.QMessageBox.StandardButtons( QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No), QtWidgets.QMessageBox.Yes) == QtWidgets.QMessageBox.No: diff --git a/openlp/plugins/images/forms/addgroupform.py b/openlp/plugins/images/forms/addgroupform.py index 9c343cc6b..309f6c518 100644 --- a/openlp/plugins/images/forms/addgroupform.py +++ b/openlp/plugins/images/forms/addgroupform.py @@ -35,8 +35,7 @@ class AddGroupForm(QtWidgets.QDialog, Ui_AddGroupDialog): """ Constructor """ - super(AddGroupForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(AddGroupForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) def exec(self, clear=True, show_top_level_group=False, selected_group=None): diff --git a/openlp/plugins/images/forms/choosegroupform.py b/openlp/plugins/images/forms/choosegroupform.py index 4be34a2e6..dd1751092 100644 --- a/openlp/plugins/images/forms/choosegroupform.py +++ b/openlp/plugins/images/forms/choosegroupform.py @@ -33,8 +33,7 @@ class ChooseGroupForm(QtWidgets.QDialog, Ui_ChooseGroupDialog): """ Constructor """ - super(ChooseGroupForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(ChooseGroupForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) def exec(self, selected_group=None): diff --git a/openlp/plugins/media/forms/mediaclipselectorform.py b/openlp/plugins/media/forms/mediaclipselectorform.py index 9770ce540..435129f10 100644 --- a/openlp/plugins/media/forms/mediaclipselectorform.py +++ b/openlp/plugins/media/forms/mediaclipselectorform.py @@ -52,8 +52,7 @@ class MediaClipSelectorForm(QtWidgets.QDialog, Ui_MediaClipSelector, RegistryPro """ Constructor """ - super(MediaClipSelectorForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(MediaClipSelectorForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.vlc_instance = None self.vlc_media_player = None self.vlc_media = None diff --git a/openlp/plugins/remotes/html/index.html b/openlp/plugins/remotes/html/index.html index eb5ec2ff9..4cc0add39 100644 --- a/openlp/plugins/remotes/html/index.html +++ b/openlp/plugins/remotes/html/index.html @@ -48,7 +48,7 @@
${service_manager} ${slide_controller} - ${alerts} + ${search}
@@ -62,7 +62,7 @@ @@ -93,7 +93,7 @@ @@ -144,7 +144,7 @@ diff --git a/openlp/plugins/remotes/html/openlp.css b/openlp/plugins/remotes/html/openlp.css index b243612d7..eb6e1b71e 100644 --- a/openlp/plugins/remotes/html/openlp.css +++ b/openlp/plugins/remotes/html/openlp.css @@ -29,3 +29,7 @@ .ui-li .ui-btn-text a.ui-link-inherit{ white-space: normal; } + +.hidden { + display: none; +} diff --git a/openlp/plugins/songs/forms/authorsform.py b/openlp/plugins/songs/forms/authorsform.py index 7e9933ddd..0d8fbf036 100644 --- a/openlp/plugins/songs/forms/authorsform.py +++ b/openlp/plugins/songs/forms/authorsform.py @@ -35,8 +35,7 @@ class AuthorsForm(QtWidgets.QDialog, Ui_AuthorsDialog): """ Set up the screen and common data """ - super(AuthorsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(AuthorsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) self.auto_display_name = False self.first_name_edit.textEdited.connect(self.on_first_name_edited) diff --git a/openlp/plugins/songs/forms/editsongform.py b/openlp/plugins/songs/forms/editsongform.py index 5286892e3..fa8e903cb 100644 --- a/openlp/plugins/songs/forms/editsongform.py +++ b/openlp/plugins/songs/forms/editsongform.py @@ -55,8 +55,7 @@ class EditSongForm(QtWidgets.QDialog, Ui_EditSongDialog, RegistryProperties): """ Constructor """ - super(EditSongForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(EditSongForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.media_item = media_item self.song = None # can this be automated? diff --git a/openlp/plugins/songs/forms/editverseform.py b/openlp/plugins/songs/forms/editverseform.py index 67693344a..9ff9ef54b 100644 --- a/openlp/plugins/songs/forms/editverseform.py +++ b/openlp/plugins/songs/forms/editverseform.py @@ -41,8 +41,7 @@ class EditVerseForm(QtWidgets.QDialog, Ui_EditVerseDialog): """ Constructor """ - super(EditVerseForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(EditVerseForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) self.has_single_verse = False self.insert_button.clicked.connect(self.on_insert_button_clicked) diff --git a/openlp/plugins/songs/forms/mediafilesform.py b/openlp/plugins/songs/forms/mediafilesform.py index 40d52ae0c..8920bc0ef 100644 --- a/openlp/plugins/songs/forms/mediafilesform.py +++ b/openlp/plugins/songs/forms/mediafilesform.py @@ -37,8 +37,7 @@ class MediaFilesForm(QtWidgets.QDialog, Ui_MediaFilesDialog): log.info('%s MediaFilesForm loaded', __name__) def __init__(self, parent): - super(MediaFilesForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(MediaFilesForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) def populate_files(self, files): diff --git a/openlp/plugins/songs/forms/songbookform.py b/openlp/plugins/songs/forms/songbookform.py index 015b18ecd..5571ac2b7 100644 --- a/openlp/plugins/songs/forms/songbookform.py +++ b/openlp/plugins/songs/forms/songbookform.py @@ -38,8 +38,7 @@ class SongBookForm(QtWidgets.QDialog, Ui_SongBookDialog): """ Constructor """ - super(SongBookForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(SongBookForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) def exec(self, clear=True): diff --git a/openlp/plugins/songs/forms/songexportform.py b/openlp/plugins/songs/forms/songexportform.py index 830924916..9bb00ea96 100644 --- a/openlp/plugins/songs/forms/songexportform.py +++ b/openlp/plugins/songs/forms/songexportform.py @@ -84,58 +84,56 @@ class SongExportForm(OpenLPWizard): """ # The page with all available songs. self.available_songs_page = QtWidgets.QWizardPage() - self.available_songs_page.setObjectName('available_songs_page') - self.available_songs_layout = QtWidgets.QHBoxLayout(self.available_songs_page) - self.available_songs_layout.setObjectName('available_songs_layout') - self.vertical_layout = QtWidgets.QVBoxLayout() - self.vertical_layout.setObjectName('vertical_layout') + available_songs_layout = QtWidgets.QHBoxLayout(self.available_songs_page) + available_songs_layout.setObjectName('available_songs_layout') + vertical_layout = QtWidgets.QVBoxLayout() + vertical_layout.setObjectName('vertical_layout') self.available_list_widget = QtWidgets.QListWidget(self.available_songs_page) self.available_list_widget.setObjectName('available_list_widget') - self.vertical_layout.addWidget(self.available_list_widget) - self.horizontal_layout = QtWidgets.QHBoxLayout() - self.horizontal_layout.setObjectName('horizontal_layout') + vertical_layout.addWidget(self.available_list_widget) + horizontal_layout = QtWidgets.QHBoxLayout() + horizontal_layout.setObjectName('horizontal_layout') self.search_label = QtWidgets.QLabel(self.available_songs_page) self.search_label.setObjectName('search_label') - self.horizontal_layout.addWidget(self.search_label) + horizontal_layout.addWidget(self.search_label) self.search_line_edit = QtWidgets.QLineEdit(self.available_songs_page) self.search_line_edit.setObjectName('search_line_edit') - self.horizontal_layout.addWidget(self.search_line_edit) + horizontal_layout.addWidget(self.search_line_edit) spacer_item = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontal_layout.addItem(spacer_item) + horizontal_layout.addItem(spacer_item) self.uncheck_button = QtWidgets.QPushButton(self.available_songs_page) self.uncheck_button.setObjectName('uncheck_button') - self.horizontal_layout.addWidget(self.uncheck_button) + horizontal_layout.addWidget(self.uncheck_button) self.check_button = QtWidgets.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) + horizontal_layout.addWidget(self.check_button) + vertical_layout.addLayout(horizontal_layout) + available_songs_layout.addLayout(vertical_layout) self.addPage(self.available_songs_page) # The page with the selected songs. self.export_song_page = QtWidgets.QWizardPage() self.export_song_page.setObjectName('available_songs_page') - self.export_song_layout = QtWidgets.QHBoxLayout(self.export_song_page) - self.export_song_layout.setObjectName('export_song_layout') - self.grid_layout = QtWidgets.QGridLayout() - self.grid_layout.setObjectName('range_layout') + export_song_layout = QtWidgets.QHBoxLayout(self.export_song_page) + export_song_layout.setObjectName('export_song_layout') + grid_layout = QtWidgets.QGridLayout() + grid_layout.setObjectName('range_layout') self.selected_list_widget = QtWidgets.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 = QtWidgets.QHBoxLayout() - self.horizontal_layout.setObjectName('horizontal_layout') + grid_layout.addWidget(self.selected_list_widget, 1, 0, 1, 1) + horizontal_layout = QtWidgets.QHBoxLayout() + horizontal_layout.setObjectName('horizontal_layout') self.directory_label = QtWidgets.QLabel(self.export_song_page) self.directory_label.setObjectName('directory_label') - self.horizontal_layout.addWidget(self.directory_label) + horizontal_layout.addWidget(self.directory_label) self.directory_line_edit = QtWidgets.QLineEdit(self.export_song_page) self.directory_line_edit.setObjectName('directory_line_edit') - self.horizontal_layout.addWidget(self.directory_line_edit) + horizontal_layout.addWidget(self.directory_line_edit) self.directory_button = QtWidgets.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) + horizontal_layout.addWidget(self.directory_button) + grid_layout.addLayout(horizontal_layout, 0, 0, 1, 1) + export_song_layout.addLayout(grid_layout) self.addPage(self.export_song_page) def retranslateUi(self): @@ -308,6 +306,7 @@ def find_list_widget_items(list_widget, text=''): item for item in list_widget.findItems(text, QtCore.Qt.MatchContains) ] + def on_item_activated(item): """ Called, when an item in the *available_list_widget* has been triggered. @@ -317,4 +316,3 @@ def on_item_activated(item): :param item: The *QListWidgetItem* which was triggered. """ item.setCheckState(QtCore.Qt.Unchecked if item.checkState() else QtCore.Qt.Checked) - diff --git a/openlp/plugins/songs/forms/songmaintenanceform.py b/openlp/plugins/songs/forms/songmaintenanceform.py index cbede3974..1fdfb74d4 100644 --- a/openlp/plugins/songs/forms/songmaintenanceform.py +++ b/openlp/plugins/songs/forms/songmaintenanceform.py @@ -44,8 +44,7 @@ class SongMaintenanceForm(QtWidgets.QDialog, Ui_SongMaintenanceDialog, RegistryP """ Constructor """ - super(SongMaintenanceForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(SongMaintenanceForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) self.manager = manager self.author_form = AuthorsForm(self) diff --git a/openlp/plugins/songs/forms/songselectform.py b/openlp/plugins/songs/forms/songselectform.py index a61bc0455..b6c161274 100755 --- a/openlp/plugins/songs/forms/songselectform.py +++ b/openlp/plugins/songs/forms/songselectform.py @@ -81,8 +81,7 @@ class SongSelectForm(QtWidgets.QDialog, Ui_SongSelectDialog): """ def __init__(self, parent=None, plugin=None, db_manager=None): - QtWidgets.QDialog.__init__(self, parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + QtWidgets.QDialog.__init__(self, parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.plugin = plugin self.db_manager = db_manager self.setup_ui(self) diff --git a/openlp/plugins/songs/forms/topicsform.py b/openlp/plugins/songs/forms/topicsform.py index 39ce9c4d4..dd2c5eb5c 100644 --- a/openlp/plugins/songs/forms/topicsform.py +++ b/openlp/plugins/songs/forms/topicsform.py @@ -38,8 +38,7 @@ class TopicsForm(QtWidgets.QDialog, Ui_TopicsDialog): """ Constructor """ - super(TopicsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(TopicsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.setupUi(self) def exec(self, clear=True): diff --git a/openlp/plugins/songs/lib/importers/foilpresenter.py b/openlp/plugins/songs/lib/importers/foilpresenter.py index b6e66f0a5..b1b12960a 100644 --- a/openlp/plugins/songs/lib/importers/foilpresenter.py +++ b/openlp/plugins/songs/lib/importers/foilpresenter.py @@ -541,4 +541,3 @@ def to_str(element): if element is not None: return str(element) return '' - diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index 9ac7afad3..51c560d37 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -365,7 +365,7 @@ class SongMediaItem(MediaManagerItem): if QtWidgets.QMessageBox.question( self, UiStrings().ConfirmDelete, translate('SongsPlugin.MediaItem', - 'Are you sure you want to delete the "%d" selected song(s)?') % len(items), + 'Are you sure you want to delete the "%d" selected song(s)?') % len(items), QtWidgets.QMessageBox.StandardButtons(QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No), QtWidgets.QMessageBox.Yes) == QtWidgets.QMessageBox.No: return diff --git a/openlp/plugins/songusage/forms/songusagedeleteform.py b/openlp/plugins/songusage/forms/songusagedeleteform.py index fc6d8d057..b97649fd9 100644 --- a/openlp/plugins/songusage/forms/songusagedeleteform.py +++ b/openlp/plugins/songusage/forms/songusagedeleteform.py @@ -36,8 +36,8 @@ class SongUsageDeleteForm(QtWidgets.QDialog, Ui_SongUsageDeleteDialog, RegistryP Constructor """ self.manager = manager - super(SongUsageDeleteForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(SongUsageDeleteForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | + QtCore.Qt.WindowTitleHint) self.setupUi(self) self.button_box.clicked.connect(self.on_button_box_clicked) @@ -48,13 +48,14 @@ class SongUsageDeleteForm(QtWidgets.QDialog, Ui_SongUsageDeleteDialog, RegistryP :param button: The button pressed """ if self.button_box.standardButton(button) == QtWidgets.QDialogButtonBox.Ok: - ret = QtWidgets.QMessageBox.question( - self, - translate('SongUsagePlugin.SongUsageDeleteForm', 'Delete Selected Song Usage Events?'), - translate('SongUsagePlugin.SongUsageDeleteForm', - 'Are you sure you want to delete selected Song Usage data?'), - QtWidgets.QMessageBox.StandardButtons(QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No), - QtWidgets.QMessageBox.No) + ret = QtWidgets.QMessageBox.question(self, + translate('SongUsagePlugin.SongUsageDeleteForm', + 'Delete Selected Song Usage Events?'), + translate('SongUsagePlugin.SongUsageDeleteForm', + 'Are you sure you want to delete selected Song Usage data?'), + QtWidgets.QMessageBox.StandardButtons(QtWidgets.QMessageBox.Yes | + QtWidgets.QMessageBox.No), + QtWidgets.QMessageBox.No) if ret == QtWidgets.QMessageBox.Yes: delete_date = self.delete_calendar.selectedDate().toPyDate() self.manager.delete_all_objects(SongUsageItem, SongUsageItem.usagedate <= delete_date) diff --git a/openlp/plugins/songusage/forms/songusagedetailform.py b/openlp/plugins/songusage/forms/songusagedetailform.py index 84f85d5d4..8edf9775f 100644 --- a/openlp/plugins/songusage/forms/songusagedetailform.py +++ b/openlp/plugins/songusage/forms/songusagedetailform.py @@ -44,8 +44,7 @@ class SongUsageDetailForm(QtWidgets.QDialog, Ui_SongUsageDetailDialog, RegistryP """ Initialise the form """ - super(SongUsageDetailForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint - | QtCore.Qt.WindowTitleHint) + super(SongUsageDetailForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint) self.plugin = plugin self.setupUi(self) diff --git a/openlp/plugins/songusage/songusageplugin.py b/openlp/plugins/songusage/songusageplugin.py index b433d96e0..0363d2b62 100644 --- a/openlp/plugins/songusage/songusageplugin.py +++ b/openlp/plugins/songusage/songusageplugin.py @@ -226,7 +226,7 @@ class SongUsagePlugin(Plugin): """ self.song_usage_detail_form.initialise() self.song_usage_detail_form.exec() - + @staticmethod def about(): """ diff --git a/tests/functional/openlp_core_lib/test_mediamanageritem.py b/tests/functional/openlp_core_lib/test_mediamanageritem.py index a3674f591..892b67f2d 100644 --- a/tests/functional/openlp_core_lib/test_mediamanageritem.py +++ b/tests/functional/openlp_core_lib/test_mediamanageritem.py @@ -75,7 +75,6 @@ class TestMediaManagerItem(TestCase, TestMixin): self.assertTrue(mmi.has_delete_icon, 'By default a delete icon should be present') self.assertFalse(mmi.add_to_service_item, 'There should be no add_to_service icon by default') - @patch(u'openlp.core.lib.mediamanageritem.Settings') @patch(u'openlp.core.lib.mediamanageritem.MediaManagerItem.on_live_click') def on_double_clicked_go_live_test(self, mocked_on_live_click, MockedSettings): diff --git a/tests/functional/openlp_core_lib/test_projectordb.py b/tests/functional/openlp_core_lib/test_projectordb.py index 3559e9e8c..58eff13bc 100644 --- a/tests/functional/openlp_core_lib/test_projectordb.py +++ b/tests/functional/openlp_core_lib/test_projectordb.py @@ -185,4 +185,3 @@ class TestProjectorDB(TestCase): # THEN: Projector should have the same source entry item = self.projector.get_projector_by_id(item_id) self.assertTrue(compare_source(item.source_list[0], source)) - diff --git a/tests/functional/openlp_plugins/songs/test_songformat.py b/tests/functional/openlp_plugins/songs/test_songformat.py index eab9760b8..e7c84e7db 100644 --- a/tests/functional/openlp_plugins/songs/test_songformat.py +++ b/tests/functional/openlp_plugins/songs/test_songformat.py @@ -40,7 +40,7 @@ class TestSongFormat(TestCase): # WHEN: Retrieving the format list # THEN: All SongFormats should be returned self.assertEquals(len(SongFormat.get_format_list()), len(SongFormat.__attributes__), - "The returned SongFormats don't match the stored ones") + "The returned SongFormats don't match the stored ones") def test_get_attributed_no_attributes(self): """ @@ -51,7 +51,7 @@ class TestSongFormat(TestCase): for song_format in SongFormat.get_format_list(): # THEN: All attributes associated with the SongFormat should be returned self.assertEquals(SongFormat.get(song_format), SongFormat.__attributes__[song_format], - "The returned attributes don't match the stored ones") + "The returned attributes don't match the stored ones") def test_get_attributed_single_attribute(self): """ @@ -63,13 +63,13 @@ class TestSongFormat(TestCase): for attribute in SongFormat.get(song_format).keys(): # THEN: Return the attribute self.assertEquals(SongFormat.get(song_format, attribute), SongFormat.get(song_format)[attribute], - "The returned attribute doesn't match the stored one") + "The returned attribute doesn't match the stored one") # WHEN: Retrieving an attribute that was not overridden for attribute in SongFormat.__defaults__.keys(): if attribute not in SongFormat.get(song_format).keys(): # THEN: Return the default value self.assertEquals(SongFormat.get(song_format, attribute), SongFormat.__defaults__[attribute], - "The returned attribute does not match the default values stored") + "The returned attribute does not match the default values stored") def test_get_attributed_multiple_attributes(self): """ @@ -80,5 +80,5 @@ class TestSongFormat(TestCase): for song_format in SongFormat.get_format_list(): # THEN: Return all attributes that were specified self.assertEquals(len(SongFormat.get(song_format, 'canDisable', 'availability')), 2, - "Did not return the correct number of attributes when retrieving multiple attributes at once") - + "Did not return the correct number of attributes" + " when retrieving multiple attributes at once") diff --git a/tests/interfaces/openlp_core_ui/test_projectoreditform.py b/tests/interfaces/openlp_core_ui/test_projectoreditform.py index 0f42e38ae..7518f139e 100644 --- a/tests/interfaces/openlp_core_ui/test_projectoreditform.py +++ b/tests/interfaces/openlp_core_ui/test_projectoreditform.py @@ -103,5 +103,3 @@ class TestProjectorEditForm(TestCase, TestMixin): 'Projector edit form should be marked as existing entry') self.assertTrue((item.ip is TEST1_DATA['ip'] and item.name is TEST1_DATA['name']), 'Projector edit form should have TEST1_DATA() instance to edit') - -