-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
issue with whitespaces in sub configs when parsing CLI args #368
Labels
bug
Something isn't working
Comments
Thanks @AlessioM for raising the issue. It was even more broad than what was raised here. I have opened PR with fix 👍🏾 |
Thanks for resovling this so quickly! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Whitespaces in Json Lists cause issue when parsing CLI args
Tested in pydantic_settings version 2.4.0
Potential Fix
add a
.strip()
call at the end of the_consume_comma
call here:https://github.com/pydantic/pydantic-settings/blob/main/pydantic_settings/sources.py#L1178
Example
Good Case
(note: no whitespace around comma in json)
Broken Case
(note: single whitespace right of comma in json)
The text was updated successfully, but these errors were encountered: