File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,21 @@ django.contrib.auth.views.UserModel
231231# Limited stubtest support for enums (https://github.com/python/mypy/issues/16806)
232232django.db.migrations.operations.base.OperationCategory.__new__
233233
234+ # The `label` parameter in __new__ is a deliberate stub-only addition:
235+ # Django's ChoicesType metaclass processes (value, label) tuples at class definition time,
236+ # but the runtime __new__ (from enum.Enum) only accepts (cls, value).
237+ # We keep the label overload so that defining enum members type-checks correctly.
238+ django.db.models.enums.IntegerChoices.__new__
239+ django.db.models.enums.TextChoices.__new__
240+ django.db.models.IntegerChoices.__new__
241+ django.db.models.TextChoices.__new__
242+ django.contrib.gis.db.models.IntegerChoices.__new__
243+ django.contrib.gis.db.models.TextChoices.__new__
244+ django.tasks.TaskResultStatus.__new__
245+ django.tasks.base.TaskResultStatus.__new__
246+ django.tasks.base.TextChoices.__new__
247+ django.tasks.signals.TaskResultStatus.__new__
248+
234249# These are dynamically added when using `save(commit=False)`
235250# See https://docs.djangoproject.com/en/stable/topics/forms/modelforms/#the-save-method
236251django.forms.BaseModelForm.save_m2m
You can’t perform that action at this time.
0 commit comments