Skip to content

Commit

Permalink
✨ Replace Enum with StrEnum for case-insensitive enum handling in log…
Browse files Browse the repository at this point in the history
…ging configuration
  • Loading branch information
grelinfo committed Nov 26, 2024
1 parent 1d8ef77 commit 9bd34d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grelmicro/logging/config.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""Logging Configuration."""

from enum import Enum
from enum import StrEnum
from typing import Self

from pydantic import Field
from pydantic_settings import BaseSettings


class _CaseInsensitiveEnum(str, Enum):
class _CaseInsensitiveEnum(StrEnum):
@classmethod
def _missing_(cls, value: object) -> Self | None:
value = str(value).lower()
Expand Down

0 comments on commit 9bd34d6

Please sign in to comment.