Skip to content

Warn if a class has multiple direct parents that each define a method name besides __init__ #6992

@socketpair

Description

@socketpair
class A:
   def close(self):
      print('A')

class B:
   def close(self):
      print('B')

class C(A, B):
   def close(self):
      print('C')
      super().close()


C().stop()

Obviously, B.close() is not called. Typically it is a bug. I think Pylint should report such kind of things.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancement ✨Improvement to a componentNeeds specification 🔐Accepted as a potential improvement, and needs to specify edge cases, message names, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions