PY3.W0246
Useless Parent Delegation
Used whenever we can detect that an overridden method is useless, relying on parent or super() delegation to do the same thing as another method from the MRO.
Noncompliant Code:
Copy
class Animal:
def eat(self, food):
print(f"Eating {food}")
class Human(Animal):
def eat(self, food): # [useless-parent-delegation]
super(Human, self).eat(food)
Compliant Code:
Copy
class Animal:
def eat(self, food):
print(f"Eating {food}")
class Human(Animal):
"""There is no need to override 'eat' it has the same signature as the implementation in Animal."""