.. _invalid-class-object:

invalid-class-object / E0243
============================

**Message emitted:**

Invalid __class__ object

**Description:**

*Used when an invalid object is assigned to a __class__ property. Only a class is permitted.*


**Correct code:**

.. literalinclude:: /data/messages/i/invalid-class-object/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/class_checker.py>`__ checker.