.. _too-many-ancestors:

too-many-ancestors / R0901
==========================

**Message emitted:**

Too many ancestors (%s/%s)

**Description:**

*Used when class has too many parent classes, try to reduce this to get a simpler (and so easier to use) class.*

**Problematic code:**

.. literalinclude:: /data/messages/t/too-many-ancestors/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/t/too-many-ancestors/good.py
   :language: python



Created by the `design <https://github.com/PyCQA/pylint/blob/main/pylint/checkers/design_analysis.py>`__ checker.