Skip to content

Conversation

HomerusJa
Copy link
Contributor

When a user now changes the value for one of the values for the other settings sources in the model_config but doesn't add these sources via settings_customise_sources, he will receive a descriptive UserWarning.

I added unit tests, but I would love it if someone could review them, as this is one of the first times I've written proper unit tests.

Closes #660

@hramezani
Copy link
Member

Thanks @HomerusJa for the PR. I left some comments

@hramezani hramezani merged commit 1967d6f into pydantic:main Aug 1, 2025
19 checks passed
@hramezani
Copy link
Member

Thanks @HomerusJa

@HomerusJa HomerusJa deleted the warn-yaml-in-model-config branch August 1, 2025 12:36
@HomerusJa
Copy link
Contributor Author

Thanks for your help, @hramezani!

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.

🐛 YAML-related values in config dict are never used
2 participants