diff --git a/openlp/core/ui/media/__init__.py b/openlp/core/ui/media/__init__.py index b51391583..6a2a083bc 100644 --- a/openlp/core/ui/media/__init__.py +++ b/openlp/core/ui/media/__init__.py @@ -143,6 +143,7 @@ def format_milliseconds(milliseconds): seconds=seconds, millis=millis) + from .mediacontroller import MediaController from .playertab import PlayerTab diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index fbb6fb6e7..1e812cd9c 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -423,4 +423,5 @@ class BibleManager(OpenLPMixin, RegistryProperties): for bible in self.db_cache: self.db_cache[bible].finalise() + __all__ = ['BibleFormat'] diff --git a/openlp/plugins/presentations/lib/pptviewlib/ppttest.py b/openlp/plugins/presentations/lib/pptviewlib/ppttest.py index 3d777b9e7..f296d8781 100644 --- a/openlp/plugins/presentations/lib/pptviewlib/ppttest.py +++ b/openlp/plugins/presentations/lib/pptviewlib/ppttest.py @@ -197,6 +197,7 @@ class PPTViewer(QtWidgets.QWidget): def openDialog(self): self.pptEdit.setText(QtWidgets.QFileDialog.getOpenFileName(self, 'Open file')[0]) + if __name__ == '__main__': pptdll = cdll.LoadLibrary(r'pptviewlib.dll') pptdll.SetDebug(1) diff --git a/openlp/plugins/songs/lib/importer.py b/openlp/plugins/songs/lib/importer.py index c84d23942..6a0958f9c 100644 --- a/openlp/plugins/songs/lib/importer.py +++ b/openlp/plugins/songs/lib/importer.py @@ -230,8 +230,8 @@ class SongFormat(object): 'class': ChordProImport, 'name': 'ChordPro', 'prefix': 'chordPro', - 'filter': '{text} (*.cho *.crd *.chordpro *.chopro *.txt)'.format(text=translate('SongsPlugin.ImportWizardForm', - 'ChordPro Files')) + 'filter': '{text} (*.cho *.crd *.chordpro *.chopro *.txt)'.format( + text=translate('SongsPlugin.ImportWizardForm', 'ChordPro Files')) }, DreamBeam: { 'class': DreamBeamImport, diff --git a/openlp/plugins/songs/lib/importers/chordpro.py b/openlp/plugins/songs/lib/importers/chordpro.py index 49c3d9f4f..4e618c3d9 100644 --- a/openlp/plugins/songs/lib/importers/chordpro.py +++ b/openlp/plugins/songs/lib/importers/chordpro.py @@ -31,6 +31,7 @@ from .songimport import SongImport log = logging.getLogger(__name__) + class ChordProImport(SongImport): """ The :class:`ChordProImport` class provides OpenLP with the @@ -115,7 +116,7 @@ class ChordProImport(SongImport): # Found a comment line, which is ignored... continue elif line == "['|]": - # Found a vertical bar + # Found a vertical bar continue else: if skip_block: @@ -148,5 +149,5 @@ class ChordProImport(SongImport): # strip the final '}' and return the tag name return line[:-1], None tag_name = line[:colon_idx] - tag_value = line[colon_idx+1:-1].strip() + tag_value = line[colon_idx + 1:-1].strip() return tag_name, tag_value diff --git a/scripts/check_dependencies.py b/scripts/check_dependencies.py index fb0d024ae..bdc01c3a0 100755 --- a/scripts/check_dependencies.py +++ b/scripts/check_dependencies.py @@ -250,5 +250,6 @@ def main(): print_qt_image_formats() print_enchant_backends_and_languages() + if __name__ == '__main__': main() diff --git a/scripts/jenkins_script.py b/scripts/jenkins_script.py index 0711d1257..78de69b42 100755 --- a/scripts/jenkins_script.py +++ b/scripts/jenkins_script.py @@ -218,5 +218,6 @@ def main(): else: parser.print_help() + if __name__ == '__main__': main() diff --git a/tests/functional/openlp_core_common/test_actions.py b/tests/functional/openlp_core_common/test_actions.py index cf7d4d9e0..9b7ae9eb3 100644 --- a/tests/functional/openlp_core_common/test_actions.py +++ b/tests/functional/openlp_core_common/test_actions.py @@ -120,11 +120,11 @@ class TestCategoryActionList(TestCase): self.list.add(self.action2) # WHEN: Iterating over the list - l = [a for a in self.list] + list = [a for a in self.list] # THEN: Make sure they are returned in correct order self.assertEquals(len(self.list), 2) - self.assertIs(l[0], self.action1) - self.assertIs(l[1], self.action2) + self.assertIs(list[0], self.action1) + self.assertIs(list[1], self.action2) def test_remove(self): """ diff --git a/tests/functional/openlp_plugins/songs/test_ewimport.py b/tests/functional/openlp_plugins/songs/test_ewimport.py index f3f278cb4..cd697d5f7 100644 --- a/tests/functional/openlp_plugins/songs/test_ewimport.py +++ b/tests/functional/openlp_plugins/songs/test_ewimport.py @@ -116,6 +116,7 @@ class TestFieldDesc: self.field_type = field_type self.size = size + TEST_DATA_ENCODING = 'cp1252' CODE_PAGE_MAPPINGS = [ (852, 'cp1250'), (737, 'cp1253'), (775, 'cp1257'), (855, 'cp1251'), (857, 'cp1254'),