-
Notifications
You must be signed in to change notification settings - Fork 117
Instance of 'tuple' has no 'label' member (no-member) #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It could be done in pylint-django, the best thing to do I would say is to add a transform to convert properties of |
From the docs:
I guess that we'll have to apply the same transformation like Django does. FTR I also haven't used these fields before. Looks easy but will probably take a day of work. PRs are welcome. |
Why: - Test that the fields label and value are not marked as missing This change addresses the need by: - Adding a test to ensure that pylint does not mark these as errors
I've created a test case. Coule you give me a pointer where I would add the attirbute to the TextChoices tuples? |
Why: - Transform tuples to include value and label properties This change addresses the need by: - Adding the text_choices transform file - Integrating in the transforms init file - Focusing on the predicate for the rule to trigger the transform
Accessing the
.label
member for amodels.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:
The text was updated successfully, but these errors were encountered: