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

Define a pretty printer for enums #3561

Merged
merged 2 commits into from Jan 26, 2023
Merged

Conversation

DRMacIver
Copy link
Member

Enums are currently pretty-printed with their raw repr rather than a useful identifier than can be used in code.

This pull request updates the pretty printing code to fix that, so that where previously an enum member would be printed as e.g. <AnEnum.SOME_MEMBER: 1>, it is now printed as AnEnum.SOME_MEMBER.

@DRMacIver DRMacIver added the enhancement it's not broken, but we want it to be better label Jan 26, 2023
Copy link
Member

@Zac-HD Zac-HD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@Zac-HD Zac-HD merged commit 519ad35 into master Jan 26, 2023
@Zac-HD Zac-HD deleted the DRMacIver/pretty-print-enums branch January 26, 2023 13:13
JensHeinrich pushed a commit to JensHeinrich/hypothesis that referenced this pull request Feb 16, 2023
…r/pretty-print-enums

Define a pretty printer for enums
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement it's not broken, but we want it to be better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants