Skip to content

False positive for arguments-differ when collecting all arguments #1553

@benf-wspdigital

Description

@benf-wspdigital

The arguments-differ check will complain about this common pattern:

class Ipsum:
    def dolor(self, elit):
        pass


class LoremIpsum(Ipsum):
    def dolor(self, *args, **kwargs):
        super().dolor(*args, **kwargs)

PyLint reports:

$ python3 -m pylint --reports=n --enable=arguments-differ lorem.py 
************* Module lorem
lorem.py:7: [W0235(useless-super-delegation), LoremIpsum.dolor] Useless super delegation in method 'dolor'
lorem.py:7: [W0221(arguments-differ), LoremIpsum.dolor] Parameters differ from overridden 'dolor' method

That code should not trigger the arguments-differ check, because that pattern is explicitly just passing through the arguments to the superclass's method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueFriendly and approachable by new contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions