Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨 Use StrEnum #151

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

🎨 Use StrEnum #151

wants to merge 2 commits into from

Conversation

hf-krechan
Copy link
Collaborator

@hf-krechan hf-krechan commented Mar 27, 2024

mmh okay, StrEnum wurde erst mit Python 3.11 eingeführt ^^

@hf-kklein Brauchen wir die älteren Python Versionen?

@hf-kklein
Copy link
Contributor

hf-kklein commented Mar 27, 2024

@hf-krechan
wir hatten das selbe problem schon bei ahbicht: https://github.com/Hochfrequenz/ahbicht/blob/ac44e80b76d3a952ce14fb89b82e7b43e574876c/src/ahbicht/__init__.py#L17
das problem ist, dass das alte MyEnum(str, Enum) sich nicht gleich verhält wie das neue MyEnum(StrEnum) ab 3.11

der test verdeutlicht das problem:

E AssertionError: assert 'Epoch.CURRENT' == 'current'
E
E - current
E + Epoch.CURRENT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants