Open dagardner-nv opened 1 year ago
If I try and reproduce this with a method other than the constructor, I get the arguments-renamed
message bit not the invalid-name
message:
# pylint: disable=too-few-public-methods, missing-docstring
class Base:
def __init__(self, config):
print("Base.__init__")
self.config = config
def print_config(self, verbose=False):
print(self.config)
if verbose:
print("Verbose mode is on")
class Derived(Base):
def print_config(self, v=False):
super().print_config(verbose=v)
print("Derived.print_config")
$ pylint -v repro3.py
No config file found, using default configuration
************* Module repro3
repro3.py:14:4: W0237: Parameter 'verbose' has been renamed to 'v' in overriding 'Derived.print_config' method (arguments-renamed)
------------------------------------------------------------------
Your code has been rated at 9.17/10 (previous run: 8.33/10, +0.83)
Bug description
When a derived class has naming errors for a constructor argument the
invalid-name
andarguments-renamed
messages are not reported.Ex:
Configuration
No response
Command used
Pylint output
Expected behavior
The
c
argument in the constructor forDerived
on line 11 should trigger bothinvalid-name
andarguments-renamed
messages.Pylint version
OS / Environment
Debian 11.7 Conda
Additional dependencies
astroid @ file:///home/conda/feedstock_root/build_artifacts/astroid_1688921184010/work colorama @ file:///home/conda/feedstock_root/build_artifacts/colorama_1666700638685/work dill @ file:///home/conda/feedstock_root/build_artifacts/dill_1690101045195/work isort @ file:///home/conda/feedstock_root/build_artifacts/isort_1675033873689/work lazy-object-proxy @ file:///home/conda/feedstock_root/build_artifacts/lazy-object-proxy_1672877787898/work mccabe @ file:///home/conda/feedstock_root/build_artifacts/mccabe_1643049622439/work platformdirs @ file:///home/conda/feedstock_root/build_artifacts/platformdirs_1690813113769/work pylint @ file:///home/conda/feedstock_root/build_artifacts/pylint_1690375221593/work tomli @ file:///home/conda/feedstock_root/build_artifacts/tomli_1644342247877/work tomlkit @ file:///home/conda/feedstock_root/build_artifacts/tomlkit_1690472772788/work typing_extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1688315532570/work wrapt @ file:///home/conda/feedstock_root/build_artifacts/wrapt_1677485519705/work