Open
Description
Accessing the .label
member for a models.TextChoices
enumeration type https://docs.djangoproject.com/en/3.0/ref/models/fields/#enumeration-types raises this pylint error: Instance of 'tuple' has no 'label' member (no-member)
. Is this something that would make sense to fix in pylint-django?
Repro:
class Student(models.Model):
class YearInSchool(models.TextChoices):
FRESHMAN = 'FR', _('Freshman')
SOPHOMORE = 'SO', _('Sophomore')
JUNIOR = 'JR', _('Junior')
SENIOR = 'SR', _('Senior')
GRADUATE = 'GR', _('Graduate')
YearInSchool.FRESHMAN.label
Metadata
Metadata
Assignees
Labels
No labels