pylint
pylint copied to clipboard
W0235 useless-super-delegation false positive for keyword arguments with different default values
Bug description
This issue is just one more Pylint regression (we introduced again the same bug).
Previously reported:
- https://github.com/PyCQA/pylint/issues/3934
- https://github.com/PyCQA/pylint/issues/3773
- https://github.com/PyCQA/pylint/issues/2270
- https://github.com/PyCQA/pylint/issues/1085
- https://github.com/PyCQA/pylint/issues/1085
It will be great to have a test for this check.
class Foo:
def __init__(*, bar = 10):
...
class Child(Foo):
def __init__(*, bar = 99999):
super().__init__(bar=bar)
Configuration
No response
Command used
pre-commit run pylint --all-files
Pylint output
W0235: Useless super delegation in method '__init__' (useless-super-delegation)
Expected behavior
No warnings
Pylint version
pylint 2.14.5
astroid 2.11.7
Python 3.10.6 (main, Aug 2 2022, 15:11:28) [GCC 9.4.0]
OS / Environment
No response
Additional dependencies
No response
Thank you for opening the issue. Do you want to contribute a fix ?
Hey all. It looks like the example provided is not a false positive since adding it to the functional tests yields a successful run. Perhaps the Pylint version which the pre-commit uses is a little out of date?
Right, I can't reproduce either.