pep8 fixes

This commit is contained in:
Tomas Groth 2016-03-13 19:37:08 +01:00
parent 1dfad12edc
commit faa434d937
2 changed files with 4 additions and 4 deletions

View File

@ -295,7 +295,7 @@ class SongMediaItem(MediaManagerItem):
:param search_keywords: A list of search keywords - book first, then number
:return: None
"""
log.debug('display results Book')
self.list_view.clear()
@ -700,7 +700,7 @@ class SongMediaItem(MediaManagerItem):
:param s: A string value from the list we want to sort.
"""
return [int(text) if text.isdecimal() else text.lower()
for text in re.split('(\d+)', s)]
for text in re.split('(\d+)', s)]
def search(self, string, show_error):
"""

View File

@ -422,10 +422,10 @@ class TestMediaItem(TestCase, TestMixin):
"""
# GIVEN: A string to be converted into a sort key
string_sort_key = 'A1B12C'
# WHEN: We attempt to create a sort key
sort_key_result = self.media_item._natural_sort_key(string_sort_key)
# THEN: We should get back a tuple split on integers
self.assertEqual(sort_key_result, ['a', 1, 'b', 12, 'c'])