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

feat: Add value representer to enum.StrEnum type #839

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

Conversation

rapsealk
Copy link

@rapsealk rapsealk commented Dec 3, 2024

Hello pyyaml team!

This pull request resolves #722 by adding represent_str() representer to enum.StrEnum type, targeting python>=3.11.

Though this line can be refactored as:

if data_types[0] in self.yaml_representers:

for representer in self.yaml_representers:
    if isinstance(data_types[0], representer):
        ...

Thanks for the review in advance!

Refs

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.

Support for enum.StrEnum
1 participant