.. _class-variable-slots-conflict:

class-variable-slots-conflict / E0242
=====================================

**Message emitted:**

Value %r in slots conflicts with class variable

**Description:**

*Used when a value in __slots__ conflicts with a class variable, property or method.*

**Problematic code:**

.. literalinclude:: /data/messages/c/class-variable-slots-conflict/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/c/class-variable-slots-conflict/good.py
   :language: python



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