Skip to content
New issue

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

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

Already on GitHub? # to your account

update two classes to use StrEnum as their base class, when available. #11100

Merged
merged 3 commits into from
Dec 5, 2023

Conversation

tungol
Copy link
Contributor

@tungol tungol commented Dec 4, 2023

related to #3968

Creating StrEnum in _typeshed avoids needing to repeat the enum, nearly unchanged, in both branches of the version check. I hope I haven't missed something.

This comment has been minimized.

@tungol tungol marked this pull request as draft December 4, 2023 20:19

This comment has been minimized.

@tungol tungol marked this pull request as ready for review December 4, 2023 20:36
@tungol
Copy link
Contributor Author

tungol commented Dec 4, 2023

I didn't pass in the allowlist to stubtest when I found this issue, and if I had realized it was on the allowlist I probably would have left it alone. But now that we're here, I think this is still valid?

Copy link
Contributor

github-actions bot commented Dec 4, 2023

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thanks!

@srittau srittau merged commit fd7ff19 into python:main Dec 5, 2023
@tungol tungol deleted the strenum branch December 5, 2023 19:59
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants