diff --git a/libs/community/scripts/check_pydantic.sh b/libs/community/scripts/check_pydantic.sh index f82aea7e7ec..1b091d0f4eb 100755 --- a/libs/community/scripts/check_pydantic.sh +++ b/libs/community/scripts/check_pydantic.sh @@ -53,7 +53,7 @@ fi # Forbid vanilla usage of @root_validator # This prevents the code from using either @root_validator or @root_validator() # Search for lines matching the pattern within the specified repository -result=$(git -C "$repository_path" grep -En '(@root_validator\s*$)|(@root_validator\(\))' -- '*.py') +result=$(git -C "$repository_path" grep -En '(@root_validator\s*$)|(@root_validator\(\)|@root_validator\(pre=False\))' -- '*.py') # Check if any matching lines were found if [ -n "$result" ]; then