1
0
mirror of https://gitlab.com/openlp/openlp.git synced 2024-09-28 19:07:35 +00:00

pep8 again

This commit is contained in:
Tim Bentley 2014-04-19 06:09:54 +01:00
parent e94643b5d1
commit 5dc35112c3
10 changed files with 18 additions and 16 deletions

View File

@ -235,7 +235,8 @@ class Ui_ServiceManager(object):
self.edit_action = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', '&Edit Item'),
icon=':/general/general_edit.png', triggers=self.remote_edit)
self.rename_action = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', '&Rename...'),
icon=':/general/general_edit.png', triggers=self.on_service_item_rename)
icon=':/general/general_edit.png',
triggers=self.on_service_item_rename)
self.maintain_action = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', '&Reorder Item'),
icon=':/general/general_edit.png',
triggers=self.on_service_item_edit_form)

View File

@ -452,6 +452,7 @@ class HttpRouter(RegistryProperties):
"""
Perform an action on the slide controller.
"""
log.debug("controller_text var = %s" % var)
current_item = self.live_controller.service_item
data = []
if current_item:

View File

@ -115,14 +115,14 @@ class JenkinsTrigger(object):
url = build.info['url']
print('[%s] %s' % (result_string, url))
# On failure open the browser.
#if result_string == "FAILURE":
# if result_string == "FAILURE":
# url += 'console'
# Popen(('xdg-open', url), stderr=PIPE)
def get_repo_name():
"""
This returns the name of branch of the wokring directory. For example it returns *lp:~googol/openlp/render*.
This returns the name of branch of the working directory. For example it returns *lp:~googol/openlp/render*.
"""
# Run the bzr command.
bzr = Popen(('bzr', 'info'), stdout=PIPE, stderr=PIPE)
@ -166,7 +166,7 @@ def main():
help='Disable output.')
parser.add_option('-b', '--open-browser', dest='open_browser', action="store_true", default=False,
help='Opens the jenkins page in your browser.')
#parser.add_option('-e', '--open-browser-on-error', dest='open_browser_on_error', action="store_true",
# parser.add_option('-e', '--open-browser-on-error', dest='open_browser_on_error', action="store_true",
# default=False, help='Opens the jenkins page in your browser in case a test fails.')
options, args = parser.parse_args(sys.argv)
@ -177,7 +177,7 @@ def main():
jenkins_trigger = JenkinsTrigger(token)
try:
jenkins_trigger.trigger_build()
except HTTPError as e:
except HTTPError:
print("Wrong token.")
return
# Open the browser before printing the output.

View File

@ -96,7 +96,7 @@ class CommandStack(object):
return len(self.data)
def __getitem__(self, index):
if not index in self.data:
if index not in self.data:
return None
elif self.data[index].get('arguments'):
return self.data[index]['command'], self.data[index]['arguments']

View File

@ -79,5 +79,5 @@ class TestCommonFunctions(TestCase):
trace_error_handler(mocked_logger)
# THEN: The mocked_logger.error() method should have been called with the correct parameters
mocked_logger.error.assert_called_with('OpenLP Error trace\n File openlp.fake at line 56 \n\t called trace_error_handler_test')
mocked_logger.error.assert_called_with(
'OpenLP Error trace\n File openlp.fake at line 56 \n\t called trace_error_handler_test')

View File

@ -482,7 +482,7 @@ class TestLib(TestCase):
# WHEN: we run the validate_thumb() function
# THEN: we should have called a few functions, and the result should be True
#mocked_os.path.exists.assert_called_with(thumb_path)
# mocked_os.path.exists.assert_called_with(thumb_path)
def validate_thumb_file_exists_and_older_test(self):
"""

View File

@ -70,7 +70,7 @@ class TestFormattingTagForm(TestCase):
form.save_button = MagicMock()
# WHEN: on_text_edited is called with an arbitrary value
#form.on_text_edited('text')
# form.on_text_edited('text')
# THEN: setEnabled and setDefault should have been called on save_push_button
#form.save_button.setEnabled.assert_called_with(True)
# form.save_button.setEnabled.assert_called_with(True)

View File

@ -35,7 +35,7 @@ from bs4 import BeautifulSoup
from tests.functional import patch, MagicMock
from openlp.plugins.bibles.lib.http import BSExtract
#TODO: Items left to test
# TODO: Items left to test
# BGExtract
# __init__
# _remove_elements
@ -68,7 +68,7 @@ class TestBSExtract(TestCase):
"""
Test the BSExtractClass
"""
#TODO: Items left to test
# TODO: Items left to test
# BSExtract
# __init__
# get_bible_chapter

View File

@ -47,7 +47,7 @@ class TestPptviewController(TestCase, TestMixin):
"""
Test the PptviewController Class
"""
#TODO: Items left to test
# TODO: Items left to test
# PptviewController
# start_process(self)
# kill
@ -108,7 +108,7 @@ class TestPptviewDocument(TestCase):
"""
Test the PptviewDocument Class
"""
#TODO: Items left to test
# TODO: Items left to test
# PptviewDocument
# __init__
# create_thumbnails

View File

@ -44,7 +44,7 @@ class TestFoilPresenter(TestCase):
"""
Test the functions in the :mod:`foilpresenterimport` module.
"""
#TODO: The following modules still need tests written for
# TODO: The following modules still need tests written for
# xml_to_song
# _child
# _process_authors