diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index b9e8d0ee4..8c717f599 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -566,7 +566,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow, RegistryProperties): self.application.set_busy_cursor() # Simple message boxes Registry().register_function('theme_update_global', self.default_theme_changed) - QtCore.QObject.connect(self, QtCore.SIGNAL('openlp_version_check'), self.version_notice) + QtCore.QObject.connect(self, QtCore.SIGNAL('openlp_version_check'), self.version_notice) Registry().register_function('config_screen_changed', self.screen_changed) Registry().register_function('bootstrap_post_set_up', self.bootstrap_post_set_up) # Reset the cursor diff --git a/openlp/core/ui/media/mediacontroller.py b/openlp/core/ui/media/mediacontroller.py index 6d35f2478..4756915c3 100644 --- a/openlp/core/ui/media/mediacontroller.py +++ b/openlp/core/ui/media/mediacontroller.py @@ -476,9 +476,9 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): controller.media_info.media_type = MediaType.CD else: controller.media_info.media_type = MediaType.DVD - controller.media_info.start_time = start/1000 - controller.media_info.end_time = end/1000 - controller.media_info.length = (end - start)/1000 + controller.media_info.start_time = start / 1000 + controller.media_info.end_time = end / 1000 + controller.media_info.length = (end - start) / 1000 controller.media_info.title_track = title controller.media_info.audio_track = audio_track controller.media_info.subtitle_track = subtitle_track diff --git a/openlp/core/ui/projector/manager.py b/openlp/core/ui/projector/manager.py index f9485f364..a45c944ca 100644 --- a/openlp/core/ui/projector/manager.py +++ b/openlp/core/ui/projector/manager.py @@ -45,18 +45,18 @@ from openlp.core.ui.projector.editform import ProjectorEditForm from openlp.core.ui.projector.sourceselectform import SourceSelectTabs, SourceSelectSingle # Dict for matching projector status to display icon -STATUS_ICONS = {S_NOT_CONNECTED: ':/projector/projector_item_disconnect.png', - S_CONNECTING: ':/projector/projector_item_connect.png', - S_CONNECTED: ':/projector/projector_off.png', - S_OFF: ':/projector/projector_off.png', - S_INITIALIZE: ':/projector/projector_off.png', - S_STANDBY: ':/projector/projector_off.png', - S_WARMUP: ':/projector/projector_warmup.png', - S_ON: ':/projector/projector_on.png', - S_COOLDOWN: ':/projector/projector_cooldown.png', - E_ERROR: ':/projector/projector_error.png', - E_NETWORK: ':/projector/projector_not_connected_error.png', - E_AUTHENTICATION: ':/projector/projector_not_connected_error.png', +STATUS_ICONS = {S_NOT_CONNECTED: ':/projector/projector_item_disconnect.png', + S_CONNECTING: ':/projector/projector_item_connect.png', + S_CONNECTED: ':/projector/projector_off.png', + S_OFF: ':/projector/projector_off.png', + S_INITIALIZE: ':/projector/projector_off.png', + S_STANDBY: ':/projector/projector_off.png', + S_WARMUP: ':/projector/projector_warmup.png', + S_ON: ':/projector/projector_on.png', + S_COOLDOWN: ':/projector/projector_cooldown.png', + E_ERROR: ':/projector/projector_error.png', + E_NETWORK: ':/projector/projector_not_connected_error.png', + E_AUTHENTICATION: ':/projector/projector_not_connected_error.png', E_UNKNOWN_SOCKET_ERROR: ':/projector/projector_not_connected_error.png', E_NOT_CONNECTED: ':/projector/projector_not_connected_error.png' } diff --git a/openlp/core/ui/projector/sourceselectform.py b/openlp/core/ui/projector/sourceselectform.py index d539f2312..23f90cca3 100644 --- a/openlp/core/ui/projector/sourceselectform.py +++ b/openlp/core/ui/projector/sourceselectform.py @@ -443,7 +443,7 @@ class SourceSelectSingle(QDialog): QtGui.QDialogButtonBox.Cancel) self.button_box.clicked.connect(self.button_clicked) self.layout.addWidget(self.button_box) - self.setMinimumHeight(key_count*25) + self.setMinimumHeight(key_count * 25) set_button_tooltip(self.button_box) selected = super(SourceSelectSingle, self).exec_() return selected diff --git a/openlp/plugins/presentations/lib/pptviewcontroller.py b/openlp/plugins/presentations/lib/pptviewcontroller.py index ae71541cb..fee83c9de 100644 --- a/openlp/plugins/presentations/lib/pptviewcontroller.py +++ b/openlp/plugins/presentations/lib/pptviewcontroller.py @@ -184,13 +184,13 @@ class PptviewDocument(PresentationDocument): # check if it is a slide match = re.search("slides/slide(.+)\.xml", zip_info.filename) if match: - index = int(match.group(1))-1 + index = int(match.group(1)) - 1 node_type = 'ctrTitle' list_to_add = titles # or a note match = re.search("notesSlides/notesSlide(.+)\.xml", zip_info.filename) if match: - index = int(match.group(1))-1 + index = int(match.group(1)) - 1 node_type = 'body' list_to_add = notes # if it is one of our files, index shouldn't be -1 diff --git a/openlp/plugins/songs/forms/editsongform.py b/openlp/plugins/songs/forms/editsongform.py index 6be8cb52c..ad1c421f3 100644 --- a/openlp/plugins/songs/forms/editsongform.py +++ b/openlp/plugins/songs/forms/editsongform.py @@ -280,9 +280,9 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog, RegistryProperties): return True if len(tags) % 2 != 0: return False - for i in range(len(tags)-1): - if tags[i+1] == "{/" + tags[i][1:]: - del tags[i:i+2] + for i in range(len(tags) - 1): + if tags[i + 1] == "{/" + tags[i][1:]: + del tags[i:i + 2] return self._validate_tags(tags, False) return False diff --git a/openlp/plugins/songs/lib/importers/easyworship.py b/openlp/plugins/songs/lib/importers/easyworship.py index 7de9aa90a..893c07df2 100644 --- a/openlp/plugins/songs/lib/importers/easyworship.py +++ b/openlp/plugins/songs/lib/importers/easyworship.py @@ -123,7 +123,7 @@ class EasyWorshipSongImport(SongImport): log.debug('Given ews file is of unknown version.') return entry_count = self.get_i32(file_pos) - entry_length = self.get_i16(file_pos+4) + entry_length = self.get_i16(file_pos + 4) file_pos += 6 self.import_wizard.progress_bar.setMaximum(entry_count) # Loop over songs diff --git a/openlp/plugins/songs/lib/importers/opensong.py b/openlp/plugins/songs/lib/importers/opensong.py index c42727981..e5e959ef5 100644 --- a/openlp/plugins/songs/lib/importers/opensong.py +++ b/openlp/plugins/songs/lib/importers/opensong.py @@ -171,12 +171,12 @@ class OpenSongImport(SongImport): topics = set(self.topics) if 'theme' in fields: theme = str(root.theme) - subthemes = theme[theme.find(':')+1:].split('/') + subthemes = theme[theme.find(':') + 1:].split('/') for topic in subthemes: topics.add(topic.strip()) if 'alttheme' in fields: theme = str(root.alttheme) - subthemes = theme[theme.find(':')+1:].split('/') + subthemes = theme[theme.find(':') + 1:].split('/') for topic in subthemes: topics.add(topic.strip()) self.topics = list(topics) diff --git a/scripts/check_dependencies.py b/scripts/check_dependencies.py index 7969c1988..ce45fc1f3 100755 --- a/scripts/check_dependencies.py +++ b/scripts/check_dependencies.py @@ -93,7 +93,7 @@ OPTIONAL_MODULES = [ ('mysql.connector', '(MySQL support)', True), ('psycopg2', '(PostgreSQL support)', True), ('nose', '(testing framework)', True), - ('mock', '(testing module)', sys.version_info[1] < 3), + ('mock', '(testing module)', sys.version_info[1] < 3), ('jenkins', '(access jenkins api - package name: jenkins-webapi)', True), ] diff --git a/scripts/lp-merge.py b/scripts/lp-merge.py index 8a09f1e0c..4b2a94247 100755 --- a/scripts/lp-merge.py +++ b/scripts/lp-merge.py @@ -96,7 +96,7 @@ for row in bug_rows: #