forked from openlp/openlp
pep8 fixes
This commit is contained in:
parent
5d6758ffaf
commit
e9e845035a
@ -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': [],
|
||||
|
@ -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:
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
import os
|
||||
import re
|
||||
import logging
|
||||
|
||||
|
||||
from openlp.plugins.songs.lib import VerseType, retrieve_windows_encoding
|
||||
from openlp.plugins.songs.lib import strip_rtf
|
||||
@ -86,8 +88,8 @@ class SundayPlusImport(SongImport):
|
||||
:param cell: ?
|
||||
:return:
|
||||
"""
|
||||
if cell == False and (len(data) == 0 or data[0:1] != b'[' or data.strip()[-1:] != b']'):
|
||||
log.log_error('File is malformed')
|
||||
if not cell and (len(data) == 0 or data[0:1] != b'[' or data.strip()[-1:] != b']'):
|
||||
self.log_error('File is malformed')
|
||||
return False
|
||||
i = 1
|
||||
verse_type = VerseType.tags[VerseType.Verse]
|
||||
|
@ -1,4 +1,4 @@
|
||||
[pep8]
|
||||
exclude=resources.py,vlc.py
|
||||
max-line-length = 120
|
||||
ignore = E402
|
||||
ignore = E402,W503,E128
|
||||
|
@ -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):
|
||||
|
@ -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))
|
||||
|
||||
|
@ -81,4 +81,3 @@ class TestSongFormat(TestCase):
|
||||
# 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")
|
||||
|
||||
|
@ -46,6 +46,6 @@ class TestSundayPlusFileImport(SongImportTestHelper):
|
||||
mocked_retrieve_windows_encoding:
|
||||
mocked_retrieve_windows_encoding.return_value = 'cp1252'
|
||||
self.file_import([os.path.join(TEST_PATH, 'Abba Fader.ptf')],
|
||||
self.load_external_result_data(os.path.join(TEST_PATH, 'abba-fader.json')))
|
||||
self.load_external_result_data(os.path.join(TEST_PATH, 'abba-fader.json')))
|
||||
self.file_import([os.path.join(TEST_PATH, 'Amazing Grace.ptf')],
|
||||
self.load_external_result_data(os.path.join(TEST_PATH, 'Amazing Grace.json')))
|
||||
|
@ -52,7 +52,7 @@ class TestMixin(object):
|
||||
Settings.set_filename(self.ini_file)
|
||||
Settings().setDefaultFormat(Settings.IniFormat)
|
||||
# Needed on windows to make sure a Settings object is available during the tests
|
||||
self.setting = Settings()
|
||||
self.setting = Settings()
|
||||
Settings().setValue('themes/global theme', 'my_theme')
|
||||
|
||||
def destroy_settings(self):
|
||||
|
@ -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')
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user