Skip to content

Confusing wording of arguments-differ? #7390

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

Closed
michalfabik opened this issue Aug 31, 2022 · 1 comment · Fixed by #7504
Closed

Confusing wording of arguments-differ? #7390

michalfabik opened this issue Aug 31, 2022 · 1 comment · Fixed by #7504
Labels
Documentation 📗 Good first issue Friendly and approachable by new contributors Hacktoberfest Needs PR This issue is accepted, sufficiently specified and now needs an implementation

Comments

@michalfabik
Copy link

Bug description

#pylint: disable=missing-docstring
class ParentClass():  #pylint: disable=too-few-public-methods
    def method(self):  #pylint: disable=no-self-use
        return 0

class ChildClass(ParentClass):  #pylint: disable=too-few-public-methods
    def method(self, extra_arg):
        return extra_arg  

ParentClass.method is an overridden method and ChildClass.method is an overriding method. The message for arguments-differ has it backwards when it's referring to ChildClass.method as "overridden method".

At least that's my understanding of the relation between overridden and overriding, though I do realize that there might have been a semantic shift in jargons/dialects/registers of English that I'm not familiar with.

Configuration

No response

Command used

pylint a.py
pylint-3 a.py

Pylint output

************* Module a
a.py:7:4: W0221: Number of parameters was 1 in 'ParentClass.method' and is now 2 in overridden 'ChildClass.method' method (arguments-differ)

Expected behavior

************* Module a
a.py:7:4: W0221: Number of parameters was 1 in 'ParentClass.method' and is now 2 in overriding 'ChildClass.method' method (arguments-differ)

Pylint version

$ pylint --version
pylint 2.13.7
astroid 2.11.6
Python 3.10.6 (main, Aug  2 2022, 00:00:00) [GCC 12.1.1 20220507 (Red Hat 12.1.1-1)]

OS / Environment

No response

Additional dependencies

No response

@michalfabik michalfabik added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Aug 31, 2022
@mbyrnepr2 mbyrnepr2 added Documentation 📗 and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Aug 31, 2022
@mbyrnepr2
Copy link
Member

mbyrnepr2 commented Aug 31, 2022

This makes perfect sense to me. Thank you for spotting & reporting this @michalfabik!

@mbyrnepr2 mbyrnepr2 added Needs PR This issue is accepted, sufficiently specified and now needs an implementation Good first issue Friendly and approachable by new contributors labels Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation 📗 Good first issue Friendly and approachable by new contributors Hacktoberfest Needs PR This issue is accepted, sufficiently specified and now needs an implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants