See below for a silly example to illustrate my problem:
class Base():
def info(self, name, age=None, height=None, **kwargs):
print(f"Hi {name}, you are {age} years old and {height} cm")
class Derived(Base):
def info(self, name, **kwargs):
print(super().info(name, **kwargs))
Essentially, I want to call the method in the parent class from the child class with restricted arguments. I don't want age
and height
to be specified in the child class.
I stumbled upon this answer: https://stackoverflow.com/a/54155637/5859885, so I added the **kwargs
in to the functions as specified in the answer.
But, I keep getting pylint warnings: Unused argument 'kwargs'
and Parameters differ from overridden 'info' method
.
Why am I getting warnings here?