-
-
Notifications
You must be signed in to change notification settings - Fork 624
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
📝 Add StrEnum example for python 3.11+ #745
base: master
Are you sure you want to change the base?
Conversation
📝 Docs preview for commit 7bd4597 at: https://af13581c.typertiangolo.pages.dev |
Thanks for the contribution! I'll update this with [UPDATE] something seems up with the docs-building part of the CI (unrelated to this PR) - we'll look into that first. [UPDATE 2] CI fixed 😎 |
…to upstream_ml_docs
📝 Docs preview for commit ec692a6 at: https://ac610b93.typertiangolo.pages.dev |
📝 Docs preview for commit 918563e at: https://a59ac027.typertiangolo.pages.dev |
Quick update: we'll pause this PR for a bit, as we want to put a mechanism in place first to have source examples for different Python versions, as well as corresponding tests that require specific Python versions too. We'll get back to this PR once we've taken care of that! |
Python 3.11 added StrEnum, that can replace using
MyEnum(str, Enum)
.This adds that usage to the Enum parameter type docs, while also keeping the old usage for users on older versions of Python.