@register.filter
# truncate after a certain number of characters
def truncatechar(text, length):
    if length <= len(text):
        return text
    else:
        return text[:length] + '...'
dataset/ETHPy150Open caseywstark/colab/colab/apps/issues/templatetags/issues_tags.py/truncatechar/swapped operands of `<=`