Skip to content

Conversation

@emirkmo
Copy link
Owner

@emirkmo emirkmo commented May 19, 2025

Only place we still use Literal is for tagged discriminators
in pydantic. This is because pydantic requires enum or literal
for the discriminator type. For these, we don't want case insensitive
behavior.

emirkmo added 6 commits May 19, 2025 22:20
- Add direct tests for the inner validator function from case_insensitive_literal_validator, including type and value error cases.
- Assert that the returned validator is a PlainValidator instance.
- Ensure all case-insensitive variants are tested for canonical value mapping.
- Add/clarify docstrings and comments for test clarity.
- Retain and verify Pydantic model integration and error handling.
Only place we still use Literal is for tagged discriminators
in pydantic. This is because pydantic requires enum or literal
for the discriminator type. For these, we don't want case insensitive
behavior.
@emirkmo emirkmo closed this May 19, 2025
@emirkmo emirkmo deleted the case-insensitive-literal branch May 19, 2025 23:19
@emirkmo emirkmo restored the case-insensitive-literal branch May 19, 2025 23:23
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