django-commons / django-commons/django-enum

Support dataclass enums.

Open
#58 2 comments 0 reactions 1 assignee View on GitHub

@bckohan is already working on this.

Since Jan 20, 2024.

enhancement
Dominant language
Python
Stars
110
Forks
6
Avg merge
1d 6h
Merged PRs (30d)
4

Description

https://docs.python.org/3/howto/enum.html#enum-dataclass-support

enum properties is still a better way to do this - but not being part of stdlib more folks will use dataclass enumerations so django-enum should support it.

This will require adding another kwarg to the EnumField constructor that allows developers to specify the 'value' field on the dataclass.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.