Closed
Description
Is your feature request related to a problem? Please describe
In the following example, Pylint flags the Derived
's __init__
method because it doesn't call Bases
's __init__
.
class Base:
def __init__(self, a: int, b: str):
raise NotImplementedError()
class Derived(Base):
def __init__(self, a: int, b: str):
self.a = a + 1
self.b = b[::-1]
This is discussed here: https://stackoverflow.com/questions/25072363/error-init-method-from-base-class-is-not-called-for-an-abstract-class
Describe the solution you'd like
Pylint could (should?) detect this case and not report an error.
Additional context
An easy fix is to remove the init in the base class, but it can be useful to have it there to define what signature __init__
should have.