Disable pylint warning E1101 when using enums : <p>I recently came across <a href="http://anthonyfox.io/2017/02/choices-for-choices-in-django-charfields/#option-3" rel="noreferrer">this article</a> by Anthony Fox which shows how to use enums to create the choice set in django CharFields, which I thought was pretty neat.</p>

<p>Basically, you create a subclass of Enum:</p>

<pre><code>from enum import Enum

class ChoiceEnum(Enum):
    @classmethod
    def choices(cls):
        return tuple((x.name, x.value) for x in cls)
</code></pre>

<p>Which can then be used in your models like so:</p>

<pre><code>from .utils import ChoiceEnum

class Car(models.Model):
    class Colors(ChoiceEnum):
        RED = 'red'
        WHITE = 'white'
        BLUE = 'blue'

    color = models.CharField(max_length=5, choices=Colors.choices(), default=Colors.RED.value)

red_cars = Car.objects.filter(color=Car.Colors.RED.value)
</code></pre>

<p>However, pylint throws a warning whenever you try to access the enum value (<code>Colors.RED.value</code>)</p>

<p><code>E1101:Instance of 'str' has no 'value' member</code></p>

<p>Is there a way to avoid / disable this warning for every instance of ChoiceEnum?</p>

<p><a href="https://stackoverflow.com/questions/35990313/avoid-pylint-warning-e1101-instance-of-has-no-member-for-class-with-dyn">This answer</a> only works on the subclass of <code>ChoiceEnum</code>, not <code>ChoiceEnum</code> itself.</p>
