Skip to content

Keyword argument before variable positional arguments list in the definition of view_or_basicauth function #7

@jamercee

Description

@jamercee

The function view_or_basicauth() has a bug. realm cannot be declared as a keyword before the variable *args. I believe the simple solution is to drop the assignment, otherwise you need to re-write to two callers ie: logged_in_or_basicauth and has_perm_or_basicauth. Removing the assignment seems like a safe action as both of the callers provide a default value.

Suggested signature:

def view_or_basicauth(view, request, test_func, realm, *args, **kwargs):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions