-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
False positive arguments-differ
when converting @staticmethod
to/from bound method
#6019
Comments
arguments-differ
when converting @staticmethod
to/from bound method
True, but the other way doesn't work. You can't replace a call to Btw. both pyright and mypy also emits an error here.
|
Ok, so is the guidance here just to disable the "no-self-use" warning in the base class if the intent is for it to be overridden in the child class and possibly needing the self reference? |
Exactly! IMO the |
Bug description
When changing a base class static method with the @staticmethod decorator to a bound method using self, the arguments-differ warning is being generated. I don't believe this should be the case as calling the child class method using self works correctly.
Command used
Pylint output
Expected behavior
No warnings generated
Pylint version
OS / Environment
Ubuntu 20.04
The text was updated successfully, but these errors were encountered: