.. _invalid-getnewargs-ex-returned:

invalid-getnewargs-ex-returned / E0313
======================================

**Message emitted:**

__getnewargs_ex__ does not return a tuple containing (tuple, dict)

**Description:**

*Used when a __getnewargs_ex__ method returns something which is not of the form tuple(tuple, dict)*


**Correct code:**

.. literalinclude:: /data/messages/i/invalid-getnewargs-ex-returned/good.py
   :language: python

**Additional details:**

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


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