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/blankScreen': [QtGui.QKeySequence(QtCore.Qt.Key_Period)],
|
||||||
'shortcuts/collapse': [QtGui.QKeySequence(QtCore.Qt.Key_Minus)],
|
'shortcuts/collapse': [QtGui.QKeySequence(QtCore.Qt.Key_Minus)],
|
||||||
'shortcuts/desktopScreen': [QtGui.QKeySequence(QtCore.Qt.Key_D)],
|
'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/down': [QtGui.QKeySequence(QtCore.Qt.Key_Down)],
|
||||||
'shortcuts/editSong': [],
|
'shortcuts/editSong': [],
|
||||||
'shortcuts/escapeItem': [QtGui.QKeySequence(QtCore.Qt.Key_Escape)],
|
'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/moveBottom': [QtGui.QKeySequence(QtCore.Qt.Key_End)],
|
||||||
'shortcuts/moveDown': [QtGui.QKeySequence(QtCore.Qt.Key_PageDown)],
|
'shortcuts/moveDown': [QtGui.QKeySequence(QtCore.Qt.Key_PageDown)],
|
||||||
'shortcuts/nextTrackItem': [],
|
'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),
|
'shortcuts/nextItem_preview': [QtGui.QKeySequence(QtCore.Qt.Key_Down),
|
||||||
QtGui.QKeySequence(QtCore.Qt.Key_PageDown)],
|
QtGui.QKeySequence(QtCore.Qt.Key_PageDown)],
|
||||||
'shortcuts/nextService': [QtGui.QKeySequence(QtCore.Qt.Key_Right)],
|
'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)],
|
QtGui.QKeySequence(QtCore.Qt.ALT + QtCore.Qt.Key_F1)],
|
||||||
'shortcuts/openService': [],
|
'shortcuts/openService': [],
|
||||||
'shortcuts/saveService': [],
|
'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/playbackPause': [],
|
||||||
'shortcuts/playbackPlay': [],
|
'shortcuts/playbackPlay': [],
|
||||||
'shortcuts/playbackStop': [],
|
'shortcuts/playbackStop': [],
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import logging
|
||||||
|
|
||||||
|
|
||||||
from openlp.plugins.songs.lib import VerseType, retrieve_windows_encoding
|
from openlp.plugins.songs.lib import VerseType, retrieve_windows_encoding
|
||||||
from openlp.plugins.songs.lib import strip_rtf
|
from openlp.plugins.songs.lib import strip_rtf
|
||||||
@ -86,8 +88,8 @@ class SundayPlusImport(SongImport):
|
|||||||
:param cell: ?
|
:param cell: ?
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
if cell == False and (len(data) == 0 or data[0:1] != b'[' or data.strip()[-1:] != b']'):
|
if not cell and (len(data) == 0 or data[0:1] != b'[' or data.strip()[-1:] != b']'):
|
||||||
log.log_error('File is malformed')
|
self.log_error('File is malformed')
|
||||||
return False
|
return False
|
||||||
i = 1
|
i = 1
|
||||||
verse_type = VerseType.tags[VerseType.Verse]
|
verse_type = VerseType.tags[VerseType.Verse]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[pep8]
|
[pep8]
|
||||||
exclude=resources.py,vlc.py
|
exclude=resources.py,vlc.py
|
||||||
max-line-length = 120
|
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.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')
|
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.Settings')
|
||||||
@patch(u'openlp.core.lib.mediamanageritem.MediaManagerItem.on_live_click')
|
@patch(u'openlp.core.lib.mediamanageritem.MediaManagerItem.on_live_click')
|
||||||
def on_double_clicked_go_live_test(self, mocked_on_live_click, MockedSettings):
|
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
|
# THEN: Projector should have the same source entry
|
||||||
item = self.projector.get_projector_by_id(item_id)
|
item = self.projector.get_projector_by_id(item_id)
|
||||||
self.assertTrue(compare_source(item.source_list[0], source))
|
self.assertTrue(compare_source(item.source_list[0], source))
|
||||||
|
|
||||||
|
@ -81,4 +81,3 @@ class TestSongFormat(TestCase):
|
|||||||
# THEN: Return all attributes that were specified
|
# THEN: Return all attributes that were specified
|
||||||
self.assertEquals(len(SongFormat.get(song_format, 'canDisable', 'availability')), 2,
|
self.assertEquals(len(SongFormat.get(song_format, 'canDisable', 'availability')), 2,
|
||||||
"Did not return the correct number of attributes when retrieving multiple attributes at once")
|
"Did not return the correct number of attributes when retrieving multiple attributes at once")
|
||||||
|
|
||||||
|
@ -103,5 +103,3 @@ class TestProjectorEditForm(TestCase, TestMixin):
|
|||||||
'Projector edit form should be marked as existing entry')
|
'Projector edit form should be marked as existing entry')
|
||||||
self.assertTrue((item.ip is TEST1_DATA['ip'] and item.name is TEST1_DATA['name']),
|
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')
|
'Projector edit form should have TEST1_DATA() instance to edit')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user