This commit is contained in:
Eugene Yurtsev 2024-09-30 21:43:53 -04:00
parent 5ef237cfb6
commit 5ab96e8dcb

View File

@ -20,7 +20,7 @@ count=$(git grep -E '(@root_validator)|(@validator)|(@field_validator)|(@pre_ini
# PRs that increase the current count will not be accepted.
# PRs that decrease update the code in the repository
# and allow decreasing the count of are welcome!
current_count=128
current_count=127
if [ "$count" -gt "$current_count" ]; then
echo "The PR seems to be introducing new usage of @root_validator and/or @field_validator."
@ -50,6 +50,6 @@ if [ "$count" -gt "$current_count" ]; then
echo "Please update the code to use Field(default_factory=from_env(..)) or Field(default_factory=secret_from_env(..))"
exit 1
elif [ "$count" -lt "$current_count" ]; then
echo "Please update the $current_count variable in ./scripts/check_pydantic.sh to $count"
exit 1
echo "Please update the $current_count variable in ./scripts/check_pydantic.sh to $count"
exit 1
fi