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

Deduplicate choices #1994

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Deduplicate choices #1994

wants to merge 1 commit into from

Conversation

tempusfrangit
Copy link
Member

Ensure choices are not duplicated, as that makes StrEnum impossible to resolve. Each element should only exist once.

Ensure choices are not duplicated, as that makes StrEnum impossible to
resolve. Each element should only exist once.

The deduplicate must be done at the schema level and therefore a
decorator is utilized to mutate duplicated choices passed to Input().
@tempusfrangit
Copy link
Member Author

Not exactly sure why python 3.12 fails with pydantic 1.

Clearly something is super wonky since other python versions succeeded.

@tempusfrangit tempusfrangit marked this pull request as draft October 16, 2024 23:38
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.

2 participants