community[patch]: Make the pydantic linter stricter (#24897)

Stricter linting of deprecated pydantic features.
This commit is contained in:
Eugene Yurtsev 2024-07-31 14:57:37 -04:00 committed by GitHub
parent a4a444f73d
commit add16111b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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