Commit graph jw-python/src/python/jw/util/enum_helper.py
Author SHA1 Message Date
2d847b4ccd
jw.util, jwutils: Follow jw-pkg's move to isort
"make format", as defined by jw-pkg, now sorts the order or imports,
too. So do that and commit.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-12 23:10:13 +00:00
5a8dfab722
enum_helper: Add module
Add the module enum_helper, providing the following functions:

  def kebab_to_pascal(value: str) -> str
  def pascal_to_kebab(value: str) -> str
  def enum_from_kebab(enum_cls: type[EnumType], value: str) -> EnumType
  def enum_to_kebab(member: Enum) -> str

The intended use of these functions is to convert from configuration
strings to application enums and back.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-12 23:10:12 +00:00