Make pep8 happy

This commit is contained in:
Raoul Snyman 2016-01-15 20:31:05 +02:00
parent e1ed3ab163
commit 5d21aab539
6 changed files with 5 additions and 9 deletions

View File

@ -515,7 +515,7 @@ class EditSongForm(QtWidgets.QDialog, Ui_EditSongDialog, RegistryProperties):
self.topics_list_view.addItem(topic_name) self.topics_list_view.addItem(topic_name)
self.songbooks_list_view.clear() self.songbooks_list_view.clear()
for songbook_entry in self.song.songbook_entries: for songbook_entry in self.song.songbook_entries:
self.add_songbook_entry_to_list(songbook_entry.songbook.id, songbook_entry.songbook.name, self.add_songbook_entry_to_list(songbook_entry.songbook.id, songbook_entry.songbook.name,
songbook_entry.entry) songbook_entry.entry)
self.audio_list_widget.clear() self.audio_list_widget.clear()
for media in self.song.media_files: for media in self.song.media_files:

View File

@ -255,9 +255,9 @@ class SongMediaItem(MediaManagerItem):
search_entry = re.sub(r'[^0-9]', '', search_keywords[2]) search_entry = re.sub(r'[^0-9]', '', search_keywords[2])
songbook_entries = (self.plugin.manager.session.query(SongBookEntry) songbook_entries = (self.plugin.manager.session.query(SongBookEntry)
.join(Book) .join(Book)
.order_by(Book.name) .order_by(Book.name)
.order_by(SongBookEntry.entry)) .order_by(SongBookEntry.entry))
for songbook_entry in songbook_entries: for songbook_entry in songbook_entries:
if songbook_entry.song.temporary: if songbook_entry.song.temporary:
continue continue

View File

@ -363,9 +363,8 @@ class Htmbuilder(TestCase, TestMixin):
""" """
Test the webkit_version() function Test the webkit_version() function
""" """
# GIVEN: Webkit # GIVEN: Webkit
webkit_ver = float(QtWebKit.qWebKitVersion()) webkit_ver = float(QtWebKit.qWebKitVersion())
# WHEN: Retrieving the webkit version # WHEN: Retrieving the webkit version
# THEN: Webkit versions should match # THEN: Webkit versions should match
self.assertEquals(webkit_version(), webkit_ver, "The returned webkit version doesn't match the installed one") self.assertEquals(webkit_version(), webkit_ver, "The returned webkit version doesn't match the installed one")

View File

@ -190,4 +190,3 @@ class TestMainWindow(TestCase, TestMixin):
self.assertEqual(0, mocked_media_manager_dock.setVisible.call_count) self.assertEqual(0, mocked_media_manager_dock.setVisible.call_count)
mocked_widget.on_focus.assert_called_with() mocked_widget.on_focus.assert_called_with()

View File

@ -103,4 +103,3 @@ class TestUtilsDBFunctions(TestCase):
for column in columns: for column in columns:
if column.name == 'song_book_id' or column.name == 'song_number': if column.name == 'song_book_id' or column.name == 'song_number':
self.fail("The column '%s' should have been deleted." % column.name) self.fail("The column '%s' should have been deleted." % column.name)

View File

@ -59,4 +59,3 @@ TEST3_DATA = dict(ip='333.333.333.333',
name='___TEST_THREE___', name='___TEST_THREE___',
location='location three', location='location three',
notes='notes three') notes='notes three')