-
-
Notifications
You must be signed in to change notification settings - Fork 494
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersstubsIssues in stubs files (.pyi)Issues in stubs files (.pyi)
Description
Bug report
What's wrong
The stubs package does not support the functional enum API for choice enums.
How is that should be
Enum classes like TextChoices
support the functional enum API (4th code block in that section).
System information
- OS:
python
version: 3.10.12django
version: 4.2.8mypy
version: 1.7.1django-stubs
version: 4.2.7django-stubs-ext
version: 4.2.7
Repro
from enum import Enum
from django.db.models import TextChoices
Enum("test", "A B C")
TextChoices("test", "A B C")
repro.py:5:1: error: Too many arguments for "TextChoices" [call-arg]
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersstubsIssues in stubs files (.pyi)Issues in stubs files (.pyi)