Skip to content

ContributorStats.__init__ ignores new_contributor parameter #406

@zkoppert

Description

@zkoppert

Bug

ContributorStats.__init__ unconditionally sets new_contributor = False on line 51 of contributor_stats.py, overwriting the value passed by the caller:

def __init__(self, username, company, new_contributor, ...):
    new_contributor = False  # ← bug: overwrites the parameter
    ...
    self.new_contributor = new_contributor

This means any caller passing new_contributor=True will silently have it ignored.

Expected behavior

self.new_contributor should store the value passed by the caller.

Fix

Remove the new_contributor = False reassignment on line 51.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions