Open
Description
Description of the false positive
Talk is cheap, show you the code.
class AbstractClass(abc.ABC):
def __init__(self):
self.a = None
class SuperClass(AbstractClass):
def __init__(self):
super().__init__()
self.b = None # <-- Hey, 'b' is here!
def __eq__(self, other):
return type(self) == type(other) and self.a == other.a and self.b == other.b
class SubClass(SuperClass):
def __init__(self):
super().__init__()
self.b = 'b' # <-- LGTM: The class 'SubClass' does not override '__eq__', but adds the new attribute 'b'.
URL to the alert on the project page on LGTM.com