-
-
Notifications
You must be signed in to change notification settings - Fork 814
📝 Add StrEnum example for python 3.11+
#745
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
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
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
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
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! |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
StrEnum example for python 3.11+
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this new format of supporting multiple versions of the same script in the docs with the {* *} syntax might not yet be supporting Python 3.11. Will look into this and get back to this PR afterwards.
Update: this needs tiangolo/markdown-include-variants#28 to be merged & released first.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
📝 Docs previewLast commit b20f925 at: https://5c5849f7.typertiangolo.pages.dev Modified Pages |

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.