forked from openlp/openlp
resolve pep8 W293 warning
This commit is contained in:
parent
bb15b4ce71
commit
a5cd1e15bc
@ -114,7 +114,7 @@ class EditSongForm(QtWidgets.QDialog, Ui_EditSongDialog, RegistryProperties):
|
|||||||
def get_key(obj):
|
def get_key(obj):
|
||||||
"""Get the key to sort by"""
|
"""Get the key to sort by"""
|
||||||
return get_natural_key(obj.name)
|
return get_natural_key(obj.name)
|
||||||
|
|
||||||
objects = self.manager.get_all_objects(cls)
|
objects = self.manager.get_all_objects(cls)
|
||||||
objects.sort(key=get_key)
|
objects.sort(key=get_key)
|
||||||
combo.clear()
|
combo.clear()
|
||||||
@ -352,7 +352,7 @@ class EditSongForm(QtWidgets.QDialog, Ui_EditSongDialog, RegistryProperties):
|
|||||||
def get_author_key(author):
|
def get_author_key(author):
|
||||||
"""Get the key to sort by"""
|
"""Get the key to sort by"""
|
||||||
return get_natural_key(author.display_name)
|
return get_natural_key(author.display_name)
|
||||||
|
|
||||||
authors = self.manager.get_all_objects(Author)
|
authors = self.manager.get_all_objects(Author)
|
||||||
authors.sort(key=get_author_key)
|
authors.sort(key=get_author_key)
|
||||||
self.authors_combo_box.clear()
|
self.authors_combo_box.clear()
|
||||||
@ -392,7 +392,7 @@ class EditSongForm(QtWidgets.QDialog, Ui_EditSongDialog, RegistryProperties):
|
|||||||
def get_theme_key(theme):
|
def get_theme_key(theme):
|
||||||
"""Get the key to sort by"""
|
"""Get the key to sort by"""
|
||||||
return get_natural_key(theme)
|
return get_natural_key(theme)
|
||||||
|
|
||||||
self.theme_combo_box.clear()
|
self.theme_combo_box.clear()
|
||||||
self.theme_combo_box.addItem('')
|
self.theme_combo_box.addItem('')
|
||||||
self.themes = theme_list
|
self.themes = theme_list
|
||||||
|
@ -206,7 +206,7 @@ class SongExportForm(OpenLPWizard):
|
|||||||
def get_song_key(song):
|
def get_song_key(song):
|
||||||
"""Get the key to sort by"""
|
"""Get the key to sort by"""
|
||||||
return song.sort_key
|
return song.sort_key
|
||||||
|
|
||||||
self.restart()
|
self.restart()
|
||||||
self.finish_button.setVisible(False)
|
self.finish_button.setVisible(False)
|
||||||
self.cancel_button.setVisible(True)
|
self.cancel_button.setVisible(True)
|
||||||
|
@ -124,7 +124,7 @@ class SongMaintenanceForm(QtWidgets.QDialog, Ui_SongMaintenanceDialog, RegistryP
|
|||||||
def get_author_key(author):
|
def get_author_key(author):
|
||||||
"""Get the key to sort by"""
|
"""Get the key to sort by"""
|
||||||
return get_natural_key(author.display_name)
|
return get_natural_key(author.display_name)
|
||||||
|
|
||||||
self.authors_list_widget.clear()
|
self.authors_list_widget.clear()
|
||||||
authors = self.manager.get_all_objects(Author)
|
authors = self.manager.get_all_objects(Author)
|
||||||
authors.sort(key=get_author_key)
|
authors.sort(key=get_author_key)
|
||||||
@ -143,7 +143,7 @@ class SongMaintenanceForm(QtWidgets.QDialog, Ui_SongMaintenanceDialog, RegistryP
|
|||||||
def get_topic_key(topic):
|
def get_topic_key(topic):
|
||||||
"""Get the key to sort by"""
|
"""Get the key to sort by"""
|
||||||
return get_natural_key(topic.name)
|
return get_natural_key(topic.name)
|
||||||
|
|
||||||
self.topics_list_widget.clear()
|
self.topics_list_widget.clear()
|
||||||
topics = self.manager.get_all_objects(Topic)
|
topics = self.manager.get_all_objects(Topic)
|
||||||
topics.sort(key=get_topic_key)
|
topics.sort(key=get_topic_key)
|
||||||
@ -159,7 +159,7 @@ class SongMaintenanceForm(QtWidgets.QDialog, Ui_SongMaintenanceDialog, RegistryP
|
|||||||
def get_book_key(book):
|
def get_book_key(book):
|
||||||
"""Get the key to sort by"""
|
"""Get the key to sort by"""
|
||||||
return get_natural_key(book.name)
|
return get_natural_key(book.name)
|
||||||
|
|
||||||
self.song_books_list_widget.clear()
|
self.song_books_list_widget.clear()
|
||||||
books = self.manager.get_all_objects(Book)
|
books = self.manager.get_all_objects(Book)
|
||||||
books.sort(key=get_book_key)
|
books.sort(key=get_book_key)
|
||||||
|
@ -261,7 +261,7 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
def get_song_key(song):
|
def get_song_key(song):
|
||||||
"""Get the key to sort by"""
|
"""Get the key to sort by"""
|
||||||
return song.sort_key
|
return song.sort_key
|
||||||
|
|
||||||
log.debug('display results Song')
|
log.debug('display results Song')
|
||||||
self.save_auto_select_id()
|
self.save_auto_select_id()
|
||||||
self.list_view.clear()
|
self.list_view.clear()
|
||||||
@ -290,11 +290,11 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
def get_author_key(author):
|
def get_author_key(author):
|
||||||
"""Get the key to sort by"""
|
"""Get the key to sort by"""
|
||||||
return get_natural_key(author.display_name)
|
return get_natural_key(author.display_name)
|
||||||
|
|
||||||
def get_song_key(song):
|
def get_song_key(song):
|
||||||
"""Get the key to sort by"""
|
"""Get the key to sort by"""
|
||||||
return song.sort_key
|
return song.sort_key
|
||||||
|
|
||||||
log.debug('display results Author')
|
log.debug('display results Author')
|
||||||
self.list_view.clear()
|
self.list_view.clear()
|
||||||
search_results.sort(key=get_author_key)
|
search_results.sort(key=get_author_key)
|
||||||
@ -319,7 +319,7 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
def get_songbook_key(songbook_entry):
|
def get_songbook_key(songbook_entry):
|
||||||
"""Get the key to sort by"""
|
"""Get the key to sort by"""
|
||||||
return (get_natural_key(songbook_entry.songbook.name), get_natural_key(songbook_entry.entry))
|
return (get_natural_key(songbook_entry.songbook.name), get_natural_key(songbook_entry.entry))
|
||||||
|
|
||||||
log.debug('display results Book')
|
log.debug('display results Book')
|
||||||
self.list_view.clear()
|
self.list_view.clear()
|
||||||
search_results.sort(key=get_songbook_key)
|
search_results.sort(key=get_songbook_key)
|
||||||
@ -342,11 +342,11 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
def get_topic_key(topic):
|
def get_topic_key(topic):
|
||||||
"""Get the key to sort by"""
|
"""Get the key to sort by"""
|
||||||
return get_natural_key(topic.name)
|
return get_natural_key(topic.name)
|
||||||
|
|
||||||
def get_song_key(song):
|
def get_song_key(song):
|
||||||
"""Get the key to sort by"""
|
"""Get the key to sort by"""
|
||||||
return song.sort_key
|
return song.sort_key
|
||||||
|
|
||||||
log.debug('display results Topic')
|
log.debug('display results Topic')
|
||||||
self.list_view.clear()
|
self.list_view.clear()
|
||||||
search_results.sort(key=get_topic_key)
|
search_results.sort(key=get_topic_key)
|
||||||
@ -371,7 +371,7 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
def get_theme_key(song):
|
def get_theme_key(song):
|
||||||
"""Get the key to sort by"""
|
"""Get the key to sort by"""
|
||||||
return (get_natural_key(song.theme_name), song.sort_key)
|
return (get_natural_key(song.theme_name), song.sort_key)
|
||||||
|
|
||||||
log.debug('display results Themes')
|
log.debug('display results Themes')
|
||||||
self.list_view.clear()
|
self.list_view.clear()
|
||||||
search_results.sort(key=get_theme_key)
|
search_results.sort(key=get_theme_key)
|
||||||
@ -394,7 +394,7 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
def get_cclinumber_key(song):
|
def get_cclinumber_key(song):
|
||||||
"""Get the key to sort by"""
|
"""Get the key to sort by"""
|
||||||
return (get_natural_key(song.ccli_number), song.sort_key)
|
return (get_natural_key(song.ccli_number), song.sort_key)
|
||||||
|
|
||||||
log.debug('display results CCLI number')
|
log.debug('display results CCLI number')
|
||||||
self.list_view.clear()
|
self.list_view.clear()
|
||||||
search_results.sort(key=get_cclinumber_key)
|
search_results.sort(key=get_cclinumber_key)
|
||||||
|
Loading…
Reference in New Issue
Block a user