.. _too-complex:

too-complex / R1260
===================

**Message emitted:**

%s is too complex. The McCabe rating is %d

**Description:**

*Used when a method or function is too complex based on McCabe Complexity Cyclomatic*


**Correct code:**

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

**Additional details:**

You can help us make the doc better `by contributing <https://github.com/PyCQA/pylint/issues/5953>`_ !



.. note::
  This message is emitted by the optional :ref:`'design'<pylint.extensions.mccabe>`
   checker which requires the ``pylint.extensions.mccabe`` plugin to be loaded.

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