some code-analysis reclamations fixed.
code-analysis OK up to: T100, S100, S101, C815, C812
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user