some code-analysis reclamations fixed.

code-analysis OK up to: T100, S100, S101, C815, C812
This commit is contained in:
Katja Süss
2017-07-29 11:35:15 +02:00
parent 100690ccdf
commit b08852baa0
5 changed files with 8 additions and 12 deletions
+1 -4
View File
@@ -77,10 +77,7 @@ def creator(object):
@indexer(IComment)
def description(object):
# Return the first 25 words of the comment text and append ' [...]'
text = join(
object.getText(targetMimetype='text/plain')
.split()[:MAX_DESCRIPTION]
)
text = join(object.getText(targetMimetype='text/plain').split()[:MAX_DESCRIPTION])
if len(object.getText().split()) > 25:
text += ' [...]'
return text