Pylint `arguments-differ` not applicable to constructor of a child class
Consider this
class Base:
def __init__(self, bar: bool, **kwargs) -> None:
self.bar = bar
def foo(self, bar: bool, **kwargs):
...
class Child(Base):
def __init__(self, bar: bool, bar2: int, **kwargs) -> None:
super().__init__(bar, **kwargs)
self.bar2 = bar2
def foo(self, bar: bool, *, bar2: int, **kwargs):
super().foo(bar, **kwargs)
...
How come, pylint raises this only on the method foo and not on __init__?
W0221: Number of parameters was 3 in 'Base.foo' and is now 4 in overriding 'Child.foo' method (arguments-differ)