Enum Field A field representing an integer enumeration. The description of the field is set automatically if not specified to a multiline list of "name: value" pairs. **Note**: Valid int value of ``enum_type`` is acceptable. ``enum_type``: The enum class ``de
(
enum_type: type[IntEnumType],
description: str | None = None,
**kwargs: Any,
)
| 917 | |
| 918 | |
| 919 | def IntEnumField( |
| 920 | enum_type: type[IntEnumType], |
| 921 | description: str | None = None, |
| 922 | **kwargs: Any, |
| 923 | ) -> IntEnumType: |
| 924 | """ |
| 925 | Enum Field |
| 926 | |
| 927 | A field representing an integer enumeration. |
| 928 | |
| 929 | The description of the field is set automatically if not specified to a multiline list of |
| 930 | "name: value" pairs. |
| 931 | |
| 932 | **Note**: Valid int value of ``enum_type`` is acceptable. |
| 933 | |
| 934 | ``enum_type``: |
| 935 | The enum class |
| 936 | ``description``: |
| 937 | The description of the field. It is set automatically if not specified to a multiline list |
| 938 | of "name: value" pairs. |
| 939 | |
| 940 | """ |
| 941 | return IntEnumFieldInstance(enum_type, description, **kwargs) # type: ignore |
| 942 | |
| 943 | |
| 944 | class CharEnumFieldInstance(CharField): |
no test coverage detected
searching dependent graphs…