diff --git a/openlp/plugins/presentations/lib/powerpointcontroller.py b/openlp/plugins/presentations/lib/powerpointcontroller.py index 42ee3248d..9b7d38bf0 100644 --- a/openlp/plugins/presentations/lib/powerpointcontroller.py +++ b/openlp/plugins/presentations/lib/powerpointcontroller.py @@ -32,7 +32,6 @@ This module is for controlling powerpoint. PPT API documentation: """ import os import logging -#from .ppinterface import constants if os.name == 'nt': from win32com.client import Dispatch diff --git a/openlp/plugins/presentations/lib/pptviewcontroller.py b/openlp/plugins/presentations/lib/pptviewcontroller.py index f7fd573f3..4f8650692 100644 --- a/openlp/plugins/presentations/lib/pptviewcontroller.py +++ b/openlp/plugins/presentations/lib/pptviewcontroller.py @@ -178,7 +178,6 @@ class PptviewDocument(PresentationDocument): with zip_file.open('ppt/presentation.xml') as pres: tree = ElementTree.parse(pres) nodes = tree.getroot().findall(".//p:sldIdLst/p:sldId", namespaces=namespaces) - #print("slide count: " + str(len(nodes))) # initialize the lists titles = ['' for i in range(len(nodes))] notes = ['' for i in range(len(nodes))] diff --git a/openlp/plugins/remotes/lib/httprouter.py b/openlp/plugins/remotes/lib/httprouter.py index e08befbd3..d3a107998 100644 --- a/openlp/plugins/remotes/lib/httprouter.py +++ b/openlp/plugins/remotes/lib/httprouter.py @@ -395,7 +395,7 @@ class HttpRouter(RegistryProperties): if controller_name and file_name: if controller_name in supported_controllers: full_path = urllib.parse.unquote(file_name) - if not '..' in full_path: # no hacking please + if '..' not in full_path: # no hacking please full_path = os.path.normpath(os.path.join(AppLocation.get_section_data_path(controller_name), 'thumbnails/' + full_path)) if os.path.exists(full_path): diff --git a/tests/functional/openlp_core_lib/test_image_manager.py b/tests/functional/openlp_core_lib/test_image_manager.py index 1b123631f..bb2f21bdd 100644 --- a/tests/functional/openlp_core_lib/test_image_manager.py +++ b/tests/functional/openlp_core_lib/test_image_manager.py @@ -103,7 +103,6 @@ class TestImageManager(TestCase, TestMixin): # THEN: The return should be of type image self.assertEqual(isinstance(image, QtGui.QImage), True, 'The returned object should be a QImage') - #print(len(self.image_manager._cache)) # WHEN: adding the same image with different dimensions self.image_manager.add_image(full_path, 'church.jpg', None, '100x100') diff --git a/tests/functional/openlp_plugins/presentations/test_pptviewcontroller.py b/tests/functional/openlp_plugins/presentations/test_pptviewcontroller.py index 6e6e277d0..7229a7551 100644 --- a/tests/functional/openlp_plugins/presentations/test_pptviewcontroller.py +++ b/tests/functional/openlp_plugins/presentations/test_pptviewcontroller.py @@ -255,7 +255,6 @@ class TestPptviewDocument(TestCase): with patch('builtins.open') as mocked_open, \ patch('openlp.plugins.presentations.lib.pptviewcontroller.zipfile.is_zipfile') as mocked_is_zf: mocked_is_zf.return_value = False - #mocked_exists.return_value = True mocked_open.filesize = 10 doc = PptviewDocument(self.mock_controller, self.mock_presentation) doc.file_path = os.path.join(TEST_RESOURCES_PATH, 'presentations', 'test.ppt') diff --git a/tests/functional/openlp_plugins/presentations/test_presentationcontroller.py b/tests/functional/openlp_plugins/presentations/test_presentationcontroller.py index b2dc43f97..0d20018c9 100644 --- a/tests/functional/openlp_plugins/presentations/test_presentationcontroller.py +++ b/tests/functional/openlp_plugins/presentations/test_presentationcontroller.py @@ -136,7 +136,7 @@ class TestPresentationController(TestCase): mocked_get_thumbnail_folder.return_value = 'test' mocked_exists.return_value = False - #WHEN: calling get_titles_and_notes + # WHEN: calling get_titles_and_notes result_titles, result_notes = self.document.get_titles_and_notes() # THEN: it should return two empty lists