Skip to content

Comments

feat: Add data representation support for enum.StrEnum type#839

Open
rapsealk wants to merge 5 commits intoyaml:mainfrom
rapsealk:feature/add-support-for-str-enum-to-dumper-representer
Open

feat: Add data representation support for enum.StrEnum type#839
rapsealk wants to merge 5 commits intoyaml:mainfrom
rapsealk:feature/add-support-for-str-enum-to-dumper-representer

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

@rapsealk
Copy link
Author

@nitzmahone Hi! Would you mind asking for a review? Thanks in advance!

@rapsealk rapsealk changed the title feat: Add value representer to enum.StrEnum type feat: Add data representation support for enum.StrEnum type May 30, 2025
@janw
Copy link

janw commented Jul 30, 2025

Bump. Would also love to see this merged. 🙏🏻

@ugomancz
Copy link

ugomancz commented Feb 2, 2026

@nitzmahone Hi, any updates on this? Would be really nice to have this.

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

3 participants