def _userperms(item, request):
    r = []
    ps = ['read', 'edit', 'add_children']
    for p in ps:
        attr = p % "has_%s_permission"
        if hasattr(item, attr):
            x = getattr(item, attr)(request)
            if x:
                r.append(p)
    return r
dataset/ETHPy150Open django-leonardo/django-leonardo/leonardo/module/media/views.py/_userperms/swapped operands of `%`