don't use magic methods directly
Try to avoid getting dunder attributes directly. Python provides helper functions for getting of of standard dunder attributes:
type(self)instead ofself.__class__inspect.getdoc(cls)instead ofcls.__doc__vars(obj)instead ofobj.__dict__cls.mro()instead ofcls.__mro__