Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename "obj" in parameter #514

Open
MizukiTemma opened this issue Feb 17, 2024 · 0 comments
Open

Rename "obj" in parameter #514

MizukiTemma opened this issue Feb 17, 2024 · 0 comments

Comments

@MizukiTemma
Copy link
Member

Motivation

"Obj" is often used as parameter name in Lunes. It's better and will be more self-explaining if they are renamed, for exmaple, to "document". See an exmaple below..

Proposed Solution

Rename parameters named "obj" to other names, like "document" or whatever more intuitive.

Alternatives

Additional Context

def creator_group(self, obj):
    """
    Include creator group of discipline in list display


    :param obj: Document object
    :type obj: models.Document
    :return: Either static admin group or user group
    :rtype: str
    """
    if obj.creator_is_admin:
        return Static.admin_group
    if obj.created_by:
        return obj.created_by
    return None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant