pep8 fixes

This commit is contained in:
Tomas Groth 2016-11-15 22:13:52 +01:00
parent bbc670cc36
commit 5468def937
9 changed files with 14 additions and 7 deletions

View File

@ -143,6 +143,7 @@ def format_milliseconds(milliseconds):
seconds=seconds, seconds=seconds,
millis=millis) millis=millis)
from .mediacontroller import MediaController from .mediacontroller import MediaController
from .playertab import PlayerTab from .playertab import PlayerTab

View File

@ -423,4 +423,5 @@ class BibleManager(OpenLPMixin, RegistryProperties):
for bible in self.db_cache: for bible in self.db_cache:
self.db_cache[bible].finalise() self.db_cache[bible].finalise()
__all__ = ['BibleFormat'] __all__ = ['BibleFormat']

View File

@ -197,6 +197,7 @@ class PPTViewer(QtWidgets.QWidget):
def openDialog(self): def openDialog(self):
self.pptEdit.setText(QtWidgets.QFileDialog.getOpenFileName(self, 'Open file')[0]) self.pptEdit.setText(QtWidgets.QFileDialog.getOpenFileName(self, 'Open file')[0])
if __name__ == '__main__': if __name__ == '__main__':
pptdll = cdll.LoadLibrary(r'pptviewlib.dll') pptdll = cdll.LoadLibrary(r'pptviewlib.dll')
pptdll.SetDebug(1) pptdll.SetDebug(1)

View File

@ -230,8 +230,8 @@ class SongFormat(object):
'class': ChordProImport, 'class': ChordProImport,
'name': 'ChordPro', 'name': 'ChordPro',
'prefix': 'chordPro', 'prefix': 'chordPro',
'filter': '{text} (*.cho *.crd *.chordpro *.chopro *.txt)'.format(text=translate('SongsPlugin.ImportWizardForm', 'filter': '{text} (*.cho *.crd *.chordpro *.chopro *.txt)'.format(
'ChordPro Files')) text=translate('SongsPlugin.ImportWizardForm', 'ChordPro Files'))
}, },
DreamBeam: { DreamBeam: {
'class': DreamBeamImport, 'class': DreamBeamImport,

View File

@ -31,6 +31,7 @@ from .songimport import SongImport
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
class ChordProImport(SongImport): class ChordProImport(SongImport):
""" """
The :class:`ChordProImport` class provides OpenLP with the The :class:`ChordProImport` class provides OpenLP with the

View File

@ -250,5 +250,6 @@ def main():
print_qt_image_formats() print_qt_image_formats()
print_enchant_backends_and_languages() print_enchant_backends_and_languages()
if __name__ == '__main__': if __name__ == '__main__':
main() main()

View File

@ -218,5 +218,6 @@ def main():
else: else:
parser.print_help() parser.print_help()
if __name__ == '__main__': if __name__ == '__main__':
main() main()

View File

@ -120,11 +120,11 @@ class TestCategoryActionList(TestCase):
self.list.add(self.action2) self.list.add(self.action2)
# WHEN: Iterating over the list # 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 # THEN: Make sure they are returned in correct order
self.assertEquals(len(self.list), 2) self.assertEquals(len(self.list), 2)
self.assertIs(l[0], self.action1) self.assertIs(list[0], self.action1)
self.assertIs(l[1], self.action2) self.assertIs(list[1], self.action2)
def test_remove(self): def test_remove(self):
""" """

View File

@ -116,6 +116,7 @@ class TestFieldDesc:
self.field_type = field_type self.field_type = field_type
self.size = size self.size = size
TEST_DATA_ENCODING = 'cp1252' TEST_DATA_ENCODING = 'cp1252'
CODE_PAGE_MAPPINGS = [ CODE_PAGE_MAPPINGS = [
(852, 'cp1250'), (737, 'cp1253'), (775, 'cp1257'), (855, 'cp1251'), (857, 'cp1254'), (852, 'cp1250'), (737, 'cp1253'), (775, 'cp1257'), (855, 'cp1251'), (857, 'cp1254'),