Commit 2d68e4ee by Alexander Kryklia Committed by Vasyl Nakvasiuk

PEPifying

parent ecb9857b
...@@ -79,7 +79,6 @@ class WordCloudModule(WordCloudFields, XModule): ...@@ -79,7 +79,6 @@ class WordCloudModule(WordCloudFields, XModule):
"""Convert raw word to suitable word.""" """Convert raw word to suitable word."""
return word.strip().lower() return word.strip().lower()
def prepare_words(self, top_words, total_count): def prepare_words(self, top_words, total_count):
"""Convert words dictionary for client API.""" """Convert words dictionary for client API."""
list_to_return = [] list_to_return = []
...@@ -91,7 +90,7 @@ class WordCloudModule(WordCloudFields, XModule): ...@@ -91,7 +90,7 @@ class WordCloudModule(WordCloudFields, XModule):
else: else:
percent = round(100.0 * word_tuple[1] / total_count) percent = round(100.0 * word_tuple[1] / total_count)
percents += percent percents += percent
list_to_return.append({'text': word_tuple[0] , 'size': word_tuple[1], 'percent': percent}) list_to_return.append({'text': word_tuple[0], 'size': word_tuple[1], 'percent': percent})
return list_to_return return list_to_return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment